|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.ibm.di.api.ConfigurationRegistry
public final class ConfigurationRegistry
This class represents the repository used for manipulating configInstances.
Field Summary | |
---|---|
static String |
CM_PREFIX
This is the prefix used when creating a temporary config instances. |
static String |
PROPERTY_LOCK_TIMEOUT
Property name used to specify the timeout in minutes for configuration locks. |
static String |
PROPERTY_ROOT_PATH
Property name which value is used as the configurations root directory. |
Constructor Summary | |
---|---|
ConfigurationRegistry()
Default constructor used for creation and initialization of the configuration registry. |
Method Summary | |
---|---|
void |
checkInAndLeaveCheckedOut(MetamergeConfig configuration,
String configToken,
Identity identity)
Checks in the specified configuration and leaves it checked out. |
void |
checkInConfiguration(MetamergeConfig configuration,
String configToken,
Identity identity)
Saves the specified configuration and releases the lock. |
void |
checkInConfiguration(MetamergeConfig configuration,
String configToken,
Identity identity,
boolean encrypt)
Encrypts and saves the specified configuration and releases the lock. |
MetamergeConfig |
checkOutConfiguration(String configToken,
Identity identity)
Checks out the specified configuration. |
MetamergeConfig |
checkOutConfiguration(String configToken,
String password,
Identity identity)
Checks out the specified password protected configuration. |
ConfigInstance |
checkOutConfigurationAndLoad(String configToken,
Identity identity,
SessionImpl session)
Checks out the specified configuration and starts a temporary Config Instance on the Server. |
ConfigInstance |
checkOutConfigurationAndLoad(String configToken,
String password,
Identity identity,
SessionImpl session)
Checks out the specified configuration and starts a temporary Config Instance on the Server. |
MetamergeConfig |
createNewConfiguration(String aRelativePath,
boolean aOverwrite,
Identity aIdentity)
Creates a new empty configuration and immediately checks it out. |
ConfigInstance |
createNewConfigurationAndLoad(String aRelativePath,
boolean aOverwrite,
Identity aIdentity,
SessionImpl aSession)
Creates a new empty configuration, immediately checks it out and loads a temporary Config Instance on the Server. |
void |
deleteConfiguration(String relativePathOrSolutionName)
Delete a file from the configuration codebase folder. |
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)
Checks if the specified configuration is checked out on the Server. |
ArrayList<String> |
listAllConfigurations()
Returns a list all configurations in the directory subtree of the Server configuration codebase folder. |
ArrayList<String> |
listConfigurations(String aRelativePath)
Returns a list of all configurations in the specified folder. |
ArrayList<String> |
listFolders(String aRelativePath)
Returns a list of the child folders of the specified folder. |
boolean |
releaseConfigurationLock(String configToken)
This method is used to release the lock of a configuration file. |
void |
startAutoUnlock()
Starts a new thread that on a given interval unlock configurations checked out for a long time |
boolean |
undoCheckOut(String configToken,
Identity identity)
This method is used to release the lock of a previously checked out configuration file. |
void |
updateLockTime(String path)
Updates the time the configuration is checked out. |
boolean |
userCanSetConfiguration(String configId,
Identity identity)
Check that the specified user can set the configuration. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String PROPERTY_ROOT_PATH
public static final String PROPERTY_LOCK_TIMEOUT
public static final String CM_PREFIX
Constructor Detail |
---|
public ConfigurationRegistry() throws DIException
DIException
- if an error occurs.Method Detail |
---|
public void startAutoUnlock()
public boolean releaseConfigurationLock(String configToken) throws DIException
configToken
- a configuration file path relative to the configuration
codebase folder or a Solution Name.
DIException
- if an error occurs.public boolean undoCheckOut(String configToken, Identity identity) throws DIException
configToken
- a configuration file path relative to the configuration
codebase folder or a Solution Name.identity
- the user Identity
object used to verify the user that
have checked out the configuration.
DIException
- if an error occurs.public ArrayList<String> listConfigurations(String aRelativePath) throws DIException
aRelativePath
- A folder relative to the Server configuration codebase folder.
DIException
- If an error occurs while retrieving configurations.public ArrayList<String> listFolders(String aRelativePath) throws DIException
aRelativePath
- A folder relative to the Server configuration codebase folder.
DIException
- If an error occurs while retrieving child folder.public ArrayList<String> listAllConfigurations() throws DIException
DIException
- If an error occurs while retrieving configurations.public MetamergeConfig checkOutConfiguration(String configToken, Identity identity) throws DIException
configToken
- The path to the configuration relative to the Server
configuration codebase folder or the Solution Name of the
configuration (the configuration must be inside the
configuration codebase folder).identity
- the Identity
object used to verify the user's
authorities.
DIException
- If an error occurs while checking out the configuration.public MetamergeConfig checkOutConfiguration(String configToken, String password, Identity identity) throws DIException
configToken
- The path to the configuration relative to the Server
configuration codebase folder or the Solution Name of the
configuration (the configuration must be inside the
configuration codebase folder).password
- Specify the password for password protected configurations.identity
- the Identity
object used to verify the user's
authorities.
DIException
- If an error occurs while checking out the configuration.public ConfigInstance checkOutConfigurationAndLoad(String configToken, Identity identity, SessionImpl session) throws DIException
configToken
- The path to the configuration relative to the Server
configuration codebase folder or the Solution Name of the
configuration (the configuration must be inside the
configuration codebase folder).identity
- the Identity
object used to verify the user's
authorities.session
- this is the reference to the Session
object used to
start the confiInstance object.
DIException
- If an error occurs while checking out the configuration.public ConfigInstance checkOutConfigurationAndLoad(String configToken, String password, Identity identity, SessionImpl session) throws DIException
configToken
- The path to the configuration relative to the Server
configuration codebase folder or the Solution Name of the
configuration (the configuration must be inside the
configuration codebase folder).password
- Specify the password for password protected configurations.identity
- the Identity
object used to verify the user's
authorities.session
- this is the reference to the Session
object used to
start the confiInstance object.
DIException
- If an error occurs while checking out the configuration.public void checkInConfiguration(MetamergeConfig configuration, String configToken, Identity identity) throws DIException
configuration
- The MetamergeConfig object representing the configuration to
be checked in.configToken
- The path to the configuration relative to the Server
configuration codebase folder or the Solution Name of the
configuration (the configuration must be inside the
configuration codebase folder).identity
- the Identity
object used to verify the user's
authorities.
DIException
- If an error occurs while checking in the configuration.public void checkInConfiguration(MetamergeConfig configuration, String configToken, Identity identity, boolean encrypt) throws DIException
configuration
- The MetamergeConfig object representing the configuration to
be checked in.configToken
- The path to the configuration relative to the Server
configuration codebase folder or the Solution Name of the
configuration (the configuration must be inside the
configuration codebase folder).identity
- the Identity
object used to verify the user's
authorities.encrypt
- If set to true, the configuration will be encrypted on the
Server.
DIException
- If an error occurs while checking in the configuration.public void checkInAndLeaveCheckedOut(MetamergeConfig configuration, String configToken, Identity identity) throws DIException
configuration
- The MetamergeConfig object representing the configuration to
be checked in.configToken
- The path to the configuration relative to the Server
configuration codebase folder or the Solution Name of the
configuration (the configuration must be inside the
configuration codebase folder).identity
- the Identity
object used to verify the user's
authorities.
DIException
- If an error occurs while checking in the configuration.public MetamergeConfig createNewConfiguration(String aRelativePath, boolean aOverwrite, Identity aIdentity) throws DIException
aRelativePath
- The path of the new configuration file relative to the Server
configuration codebase folder.aOverwrite
- Specify whether to overwrite or not an already exising
configuration file.aIdentity
- the Identity
object used to verify the user's
authorities.
DIException
- If an error occurs while creating the new configuration.public ConfigInstance createNewConfigurationAndLoad(String aRelativePath, boolean aOverwrite, Identity aIdentity, SessionImpl aSession) throws DIException
aRelativePath
- The path of the new configuration file relative to the Server
configuration codebase folder.aOverwrite
- Specify whether to overwrite or not an already existing
configuration file.aIdentity
- the Identity
object used to verify the user's
authorities.aSession
- the Session
object used to start the configInstance.
DIException
- If an error occurs while creating the new configuration.public String getConfigFolderPath()
public boolean isConfigurationCheckedOut(String configToken) throws DIException
configToken
- The path to the configuration relative to the Server
configuration codebase folder or the Solution Name of the
configuration (the configuration must be inside the
configuration codebase folder).
DIException
- If an error occurs while checking the configuration.public void updateLockTime(String path) throws DIException
path
parameter. This time is set to the
current time as if the configuration was just checked out.
path
- the configuration path.
DIException
- if an error occurs.public boolean userCanSetConfiguration(String configId, Identity identity) throws DIException
configId
- the configuration id used to identify the configInstanceidentity
- the Identity
object used to verify the user's rights.
DIException
- if an error occurs.public String getSolutionName(File configFile) throws DIException
configFile
- A TDI configuration file in the configuration codebase folder.
DIException
- if detected a duplication of Solution Names or failed
retrieval of the canonical path of a file.public String getConfigFilePath(String token) throws DIException
token
- A configuration file path or a Solution Name.
DIException
- if detected a 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.public void deleteConfiguration(String relativePathOrSolutionName) throws DIException
relativePathOrSolutionName
- The path to the configuration relative to the Server
configuration codebase folder or the Solution Name of the
configuration (the configuration must be inside the
configuration codebase folder).
DIException
- The file is currently checked-out or deletion failed (e.g.
the file does not exist).
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |