com.ibm.di.api
Class ConfigurationRegistry
java.lang.Object
com.ibm.di.api.ConfigurationRegistry
public class ConfigurationRegistry extends Object
Method Summary
void
checkInAndLeaveCheckedOut (MetamergeConfig configuration,
String configToken,
Identity identity)
void
checkInConfiguration (MetamergeConfig configuration,
String configToken,
Identity identity)
void
checkInConfiguration (MetamergeConfig configuration,
String configToken,
Identity identity,
boolean encrypt)
MetamergeConfig
checkOutConfiguration (String configToken,
Identity identity)
MetamergeConfig
checkOutConfiguration (String configToken,
String password,
Identity identity)
ConfigInstance
checkOutConfigurationAndLoad (String configToken,
Identity identity,
SessionImpl session)
ConfigInstance
checkOutConfigurationAndLoad (String configToken,
String password,
Identity identity,
SessionImpl session)
MetamergeConfig
createNewConfiguration (String aRelativePath,
boolean aOverwrite,
Identity aIdentity)
ConfigInstance
createNewConfigurationAndLoad (String aRelativePath,
boolean aOverwrite,
Identity aIdentity,
SessionImpl aSession)
String
getConfigFilePath (String token)
Resolves a token to a configuration file path.
String
getConfigFolderPath ()
Returns the value of api.config.folder property.
String
getSolutionName (File configFile)
Retrieves the Solution Name of a TDI configuration file in the configuration
codebase folder.
boolean
isConfigurationCheckedOut (String configToken)
ArrayList
listAllConfigurations ()
ArrayList
listConfigurations (String aRelativePath)
ArrayList
listFolders (String aRelativePath)
boolean
releaseConfigurationLock (String configToken)
boolean
undoCheckOut (String configToken,
Identity identity)
void
updateLockTime (String aRelativePath)
boolean
userCanSetConfiguration (String aConfigId,
Identity aIdentity)
Methods inherited from class java.lang.Object
clone , equals , finalize , getClass , hashCode , notify , notifyAll , toString , wait , wait , wait
PROPERTY_ROOT_PATH
public static final String PROPERTY_ROOT_PATH
See Also: Constant Field Values
PROPERTY_LOCK_TIMEOUT
public static final String PROPERTY_LOCK_TIMEOUT
See Also: Constant Field Values
CM_PREFIX
public static final String CM_PREFIX
See Also: Constant Field Values
ConfigurationRegistry
public ConfigurationRegistry ()
throws DIException
Throws:
DIException
releaseConfigurationLock
public boolean releaseConfigurationLock (String configToken)
throws DIException
Throws:
DIException
undoCheckOut
public boolean undoCheckOut (String configToken,
Identity identity)
throws DIException
Throws:
DIException
listConfigurations
public ArrayList listConfigurations (String aRelativePath)
throws DIException
Throws:
DIException
listFolders
public ArrayList listFolders (String aRelativePath)
throws DIException
Throws:
DIException
listAllConfigurations
public ArrayList listAllConfigurations ()
throws DIException
Throws:
DIException
checkOutConfiguration
public MetamergeConfig checkOutConfiguration (String configToken,
Identity identity)
throws DIException
Throws:
DIException
checkOutConfiguration
public MetamergeConfig checkOutConfiguration (String configToken,
String password,
Identity identity)
throws DIException
Throws:
DIException
checkOutConfigurationAndLoad
public ConfigInstance checkOutConfigurationAndLoad (String configToken,
Identity identity,
SessionImpl session)
throws DIException
Throws:
DIException
checkOutConfigurationAndLoad
public ConfigInstance checkOutConfigurationAndLoad (String configToken,
String password,
Identity identity,
SessionImpl session)
throws DIException
Throws:
DIException
checkInConfiguration
public void checkInConfiguration (MetamergeConfig configuration,
String configToken,
Identity identity)
throws DIException
Throws:
DIException
checkInConfiguration
public void checkInConfiguration (MetamergeConfig configuration,
String configToken,
Identity identity,
boolean encrypt)
throws DIException
Throws:
DIException
checkInAndLeaveCheckedOut
public void checkInAndLeaveCheckedOut (MetamergeConfig configuration,
String configToken,
Identity identity)
throws DIException
Throws:
DIException
createNewConfiguration
public MetamergeConfig createNewConfiguration (String aRelativePath,
boolean aOverwrite,
Identity aIdentity)
throws DIException
Throws:
DIException
createNewConfigurationAndLoad
public ConfigInstance createNewConfigurationAndLoad (String aRelativePath,
boolean aOverwrite,
Identity aIdentity,
SessionImpl aSession)
throws DIException
Throws:
DIException
getConfigFolderPath
public String getConfigFolderPath ()
Returns the value of api.config.folder property.
Returns: The canonical path of the config folder. If api.config.folder is NOT
defined then return an empty string.
isConfigurationCheckedOut
public boolean isConfigurationCheckedOut (String configToken)
throws DIException
Throws:
DIException
updateLockTime
public void updateLockTime (String aRelativePath)
throws DIException
Throws:
DIException
userCanSetConfiguration
public boolean userCanSetConfiguration (String aConfigId,
Identity aIdentity)
throws DIException
Throws:
DIException
getSolutionName
public String getSolutionName (File configFile)
throws DIException
Retrieves the Solution Name of a TDI configuration file in the configuration
codebase folder. The Solution Name is looked up in the internal Solution Names
cache.
If the specified configuration file cannot be found in the cache, it is parsed
for its Solution Name. If the Solution Name is a duplicate, an exception is thrown,
otherwise the Solution Names cache is updated.
Parameters: configFile
- A TDI configuration file in the configuration codebase folder.
Returns: The Solution Name of the specified configuration file.
Throws:
Detected
- duplication of Solution Names or failed retrieval of the canonical
path of a file.
DIException
getConfigFilePath
public String getConfigFilePath (String token)
throws DIException
Resolves a token to a configuration file path.
The token can be either a Solution Name of a configuration file in the configuration
codebase folder or a configuration file path.
The method never returns null as long as the token is not null.
If the token is not a path of an existing file and is not a Solution Name of an
existing file, the method assumes the token is a path of a non-existing file and
returns it as it is.
Parameters: token
- A configuration file path or a Solution Name.
Returns: The configuration file path, which corresponds to the provided token.
Throws:
Detected
- duplication of Solution Names or failed retrieval of the canonical
path of a file or Solution Name coincides with the path of an existing file.
DIException
Since:
TDI 6.1.1