|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.centrasite.importexport.ImportOperation
public class ImportOperation
The import processes an export archive, produced by ExportOperation and adds the content into CentraSite. The repository items will be copied into the CentraSite repository and the other items will be loaded into the CentraSite registry. Internally the items of the zip-archive will be distributed in 4 separate lists:
Moreover it is possible to import only particular object(s) out from an archive
(@see addImportKey(String)
for more information).
Nested Class Summary | |
---|---|
static class |
ImportOperation.Timing
|
Constructor Summary | |
---|---|
ImportOperation(com.centrasite.jaxr.CentraSiteConnection connection,
java.lang.String zipFileName)
Constructs a CentraSite import instance out from given connection. |
|
ImportOperation(java.lang.String centraSiteUrl,
java.lang.String user,
java.lang.String password,
java.lang.String zipFileName)
Constructs a CentraSite import instance. |
|
ImportOperation(java.lang.String centraSiteUrl,
java.lang.String user,
java.lang.String password,
java.lang.String zipFileName,
java.util.Properties sslProperties)
Constructs a CentraSite import instance. |
Method Summary | |
---|---|
void |
addImportKey(java.lang.String uddiKey)
Add a key to import. |
void |
addImportKeys(java.util.Collection<java.lang.String> uddiKeys)
Add keys to import. |
void |
execute()
Import execution. |
java.util.Locale |
getErrorMessageLocale()
Return the error message locale. |
java.lang.String |
getZipFileName()
|
boolean |
isClustered()
|
static boolean |
isObjectToLog(javax.xml.registry.infomodel.RegistryObject registryObject)
Check if given registry object is supposed to log via event-logging. |
static void |
main(java.lang.String[] args)
main entry point. |
void |
setErrorMessageLocale(java.util.Locale locale)
Set the error message locale. |
void |
setEventCallback(com.centrasite.jaxr.importexport.IEventCallback eventCallback)
Sets a callback class which is called for messages (errors, warnings, informational). |
void |
setEventCallback(com.centrasite.importexport.IEventCallback eventCallback)
Deprecated. please use setEventCallback(com.centrasite.jaxr.importexport.IEventCallback) |
void |
setImportGroup(boolean importGroup)
Indicate whether to replace objects if the objects in the zip-archive are older than the ones in the registry. |
void |
setImportOrganizationKey(java.lang.String importOrganizationKey)
Set the organization the objects should be imported into. |
void |
setImportOrganizationName(java.lang.String importOrganizationName)
Set the organization the objects should be imported into. |
void |
setKeepLCMState(boolean keepLCMState)
Indicate if after import the lifecycle state should be kept. |
void |
setKeepOrganization(boolean keepOrganization)
Indicate whether to keep the original organization of all the importing objects. |
void |
setKeepOwner(boolean keepOwner)
Indicate whether to keep the original owner of all the importing objects. |
void |
setNewOwner(javax.xml.registry.infomodel.User newOwner)
Set the given as owner of all the importing objects |
void |
setNewOwnerName(java.lang.String newOwnerName)
Set the given user as owner of all the importing objects. |
void |
setRemoveAllMissingReferences(boolean removeAllMissingReferences)
Indicate if during import all missing associations are to removed from the object. |
void |
setReplace(boolean replaceOption)
Indicate whether to replace objects if the objects in the zip-archive are older than the ones in the registry. |
void |
setRepositoryRoot(java.lang.String repositoryRoot)
Deprecated. |
void |
setSimulate(boolean simulate)
Indicate if the import should simulate; this means no records will be updated to the registry but the log and also the error messages get written. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ImportOperation(com.centrasite.jaxr.CentraSiteConnection connection, java.lang.String zipFileName) throws java.lang.Exception
connection
- active registry connection (null: working without connection)zipFileName
- the name of the zip-archive to import
java.lang.Exception
- error connecting to CentraSitepublic ImportOperation(java.lang.String centraSiteUrl, java.lang.String user, java.lang.String password, java.lang.String zipFileName, java.util.Properties sslProperties) throws java.lang.Exception
centraSiteUrl
- the URL of the CentraSite databaseuser
- the user namepassword
- the password of the userzipFileName
- the name of the zip-archive to importsslProperties
- thw ssl properties for https communication (null: no https)
java.lang.Exception
- error connecting to CentraSitepublic ImportOperation(java.lang.String centraSiteUrl, java.lang.String user, java.lang.String password, java.lang.String zipFileName) throws java.lang.Exception
centraSiteUrl
- the URL of the CentraSite databaseuser
- the user namepassword
- the password of the userzipFileName
- the name of the zip-archive to import
java.lang.Exception
- error connecting to CentraSiteMethod Detail |
---|
public void setReplace(boolean replaceOption)
replaceOption
- true: replace objects, no matter of their timestamp;
false: reject older objects (default)public void setImportGroup(boolean importGroup)
replaceOption
- true: replace objects, no matter of their timestamp;
false: reject older objects (default)public void setKeepOwner(boolean keepOwner)
keepOwner
- true: keep the original owner; false: set owner to importing user (default)public void setNewOwner(javax.xml.registry.infomodel.User newOwner)
newOwner
- CentraSite login userpublic void setNewOwnerName(java.lang.String newOwnerName) throws javax.xml.registry.JAXRException, com.centrasite.jaxr.importexport.ExportException
newOwnerName
- the name of the new owner (syntax: "domain\name", default domain: "INTERNAL")
javax.xml.registry.JAXRException
- internal jaxr error
com.centrasite.jaxr.importexport.ExportException
- user not foundpublic void setKeepOrganization(boolean keepOrganization) throws com.centrasite.jaxr.importexport.ExportException
keepOrganization
- true: keep the original organization;
false: set organization of importing user (default)
com.centrasite.jaxr.importexport.ExportException
public final void setKeepLCMState(boolean keepLCMState)
keepLCMState
- true: keep lifecycle state at importpublic final void setRemoveAllMissingReferences(boolean removeAllMissingReferences)
removeAllMissingReferences
- true: remove all missing associationspublic final void setSimulate(boolean simulate)
simulate
- true: simulate the importpublic final void addImportKey(java.lang.String uddiKey)
uddiKey
- "uddi:..."public final void addImportKeys(java.util.Collection<java.lang.String> uddiKeys)
uddiKey
- list of "uddi:..."public void setRepositoryRoot(java.lang.String repositoryRoot)
public final void setEventCallback(com.centrasite.jaxr.importexport.IEventCallback eventCallback)
eventCallback
- the instance of the message callback class;
null: no message callback (default)public final void setEventCallback(com.centrasite.importexport.IEventCallback eventCallback)
public void setImportOrganizationKey(java.lang.String importOrganizationKey) throws com.centrasite.jaxr.importexport.ExportException
importOrganizationKey
- the key of a organization;
null: take the user's organization
com.centrasite.jaxr.importexport.ExportException
public void setImportOrganizationName(java.lang.String importOrganizationName) throws com.centrasite.jaxr.importexport.ExportException, javax.xml.registry.JAXRException
importOrganizationName
- name of the organization
com.centrasite.jaxr.importexport.ExportException
javax.xml.registry.JAXRException
public java.lang.String getZipFileName()
public boolean isClustered() throws java.lang.IllegalArgumentException, java.io.IOException
java.lang.IllegalArgumentException
java.io.IOException
public void execute() throws com.centrasite.jaxr.importexport.ExportException
com.centrasite.jaxr.importexport.ExportException
public static boolean isObjectToLog(javax.xml.registry.infomodel.RegistryObject registryObject)
registryObject
-
public final java.util.Locale getErrorMessageLocale()
public void setErrorMessageLocale(java.util.Locale locale)
locale
- the localepublic static void main(java.lang.String[] args)
usage:
ImportOperation [options] < CentraSite URL > < export filename >
< user > < password >
Options:
-setreplace | replace objects if already present in the registry |
-keepowner | keep the object owner instead of assiging the importing user |
-setowner < username > | all imported object will be set to specified user |
-keeporganization | keep the organization instead of assigning the active one |
-keeplcmstate | keep the lcm state of the object which is set at export |
-importorg < org-key > | import the objects into the given organization by key |
-importorgname < orgname > | import the objects into the given organization by name |
-simulate | simulate the import, no updates to the registry but message logging |
-removemissingreferences | remove all missing associations causing dangling references |
-importkeys uddi[,uddi...] | import only those object(s) given by key(s) |
args
- program arguments
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |