|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.hyperion.lcm.clu.LCMClient
This is a class designed for providing API to execute LCM Migrations. The execute method reads the migration definition file and executes the file in memory. On execution completion, an LCM handle is returned that has methods to track migration status. A successful migration is implied by "Success" status message and a status message of "Completed With Failures" indicates that the migration was completed with failures.
Sample use of API:
try{
LCMHandle handle = LCMClient.execute("C:/packagexmlfiles/MigrationDefinitionfile.xml","");
System.out.println("Migration status: " +handle.getMessage());
}catch(LCMException e)
{
//check error message for failure info
}
Execution setup: Copy libraries folder (lib) and configuration folder (conf) from CLU Command Line Utility distribution. Update CLASSPATH in the run time environment to include conf folder location, and all files under lib. For example, if the files have been copied on your machine as:
C:/LCMAdmin/CLU/lib/lcm-clu.jar /audit-client.jar .. ..
C:/LCMAdmin/CLU/conf/migration.properties /log.xml .. ..
The CLASSPATH would need to be updated as CLASSPATH=%CLASSPATH%:C:/LCMAdmin/CLU/conf:C:/LCMAdmin/CLU/lib/lcm-clu.jar:C:/LCMAdmin/CLU/lib/audit-client.jar
Constructor Summary | |
LCMClient()
The constructor creates a new LCMClient instance. |
Method Summary | |
static LCMHandle |
execute(java.lang.String migDefFilePath,
java.lang.String basePath)
This method will execute the migration specified by the definition located at migDefFilePath. |
static LCMHandle |
execute(java.lang.String username,
java.lang.String password,
java.lang.String migDefFilePath,
java.lang.String basePath)
This method will execute the migration specified by the definition located at migDefFilePath. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public LCMClient()
Method Detail |
public static LCMHandle execute(java.lang.String migDefFilePath, java.lang.String basePath) throws com.hyperion.lcm.common.LCMException
To export/import from a file system, the migration definition file should contain a file system connection. The folder parameter in the connection could either specify an aboslute path or a relative path. If the parameter is a relative path, the absolute path would be determined using the basePath parameter.
The following exercepts migration definition showing a FileSystem connection with absolute path:
ConnectionInfo name="FSConnection1" type="FileSystem" description="File System Location" filePath="file:/c:/lcmstorage/out"
Sample API usage: LCMClient.execute("c:/packagexmlfiles/MDF.xml", "")
The following exercepts migration definition showing a FileSystem connection with relative path:
ConnectionInfo name="FSConnection1" type="FileSystem" description="File System Location" filePath="/out"
Sample API usage: LCMClient.execute("c:/packagexmlfiles/MDF.xml","c:/lcmStorage")
migDefFilePath
- a String to migration definition file filepathbasePath
- a String Root folder of export import contents, valid only if the file system connection uses a relative path
com.hyperion.lcm.common.LCMException
public static LCMHandle execute(java.lang.String username, java.lang.String password, java.lang.String migDefFilePath, java.lang.String basePath) throws com.hyperion.lcm.common.LCMException
To export/import from a file system, the migration definition file should contain a file system connection. The folder parameter in the connection could either specify an aboslute path or a relative path. If the parameter is a relative path, the absolute path would be determined using the basePath parameter.
The following exercepts migration definition showing a FileSystem connection with absolute path:
ConnectionInfo name="FSConnection1" type="FileSystem" description="File System Location" filePath="file:/c:/lcmstorage/out"
Sample API usage: LCMClient.execute("admin","password",c:/packagexmlfiles/MDF.xml", "")
The following exercepts migration definition showing a FileSystem connection with relative path:
ConnectionInfo name="FSConnection1" type="FileSystem" description="File System Location" filePath="/out"
Sample API usage: LCMClient.execute("admin","password",c:/packagexmlfiles/MDF.xml","c:/lcmStorage")
username
- a String containing the usernamepassword
- a String containing the passwordmigDefFilePath
- a String to migration definition file filepathbasePath
- a String Root folder of export import contents, valid only if the file system connection uses a relative path
com.hyperion.lcm.common.LCMException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |