public final class SQLImporter extends GenericService implements atg.adapter.gsa.sqlimport.ImportLogger
| Modifier and Type | Field and Description | 
|---|---|
| static java.lang.String | CLASS_VERSIONClass version string | 
SERVICE_INFO_KEYDEFAULT_LOG_TRACE_STATUSDEFAULT_LOG_DEBUG_STATUS, DEFAULT_LOG_ERROR_STATUS, DEFAULT_LOG_INFO_STATUS, DEFAULT_LOG_WARNING_STATUS| Constructor and Description | 
|---|
| SQLImporter()Empty constructor | 
| Modifier and Type | Method and Description | 
|---|---|
| void | addImportListener(ImportListener pListener)Allows for a component which implements the ImportListener interface to
 be notified as various events occur. | 
| void | dbg(java.lang.Object pMsg,
   int pLevel) | 
| boolean | execute()Perform the data export or import. | 
| void | flushRepositoryCaches()Flush the caches of all the affected repositories. | 
| java.lang.String | getActivityId()Get property  activityId. | 
| java.lang.String | getBranchName()Get property  branchName. | 
| java.lang.String | getCheckinComment()Get property  checkinComment. | 
| boolean | getCheckinFlag()Get property  checkinFlag. | 
| ClientLockManager | getClientLockManager()Get property  clientLockManager. | 
| java.lang.String | getClientLockManagerName()Get property  clientLockManagerName. | 
| java.lang.String | getConfigPath()Get property  configPath. | 
| DataFeeder | getDataFeeder() | 
| java.io.File | getDataFile()Get property  dataFile. | 
| java.lang.String | getDataFileName()Get property  dataFileName. | 
| int | getDebugLevel()Get property  debugLevel. | 
| boolean | getDeleteAllFlag()Get property  deleteAllFlag. | 
| boolean | getFlushRepositoryCachesFlag()Get property  flushRepositoryCachesFlag. | 
| java.lang.String | getImportListenerNamesString()Set property  username. | 
| ImportListener[] | getImportListeners() | 
| int | getImportSQLQueueSize()Get property  ImportSQLQueueSize. | 
| int | getInfoLevel()Get property  infoLevel. | 
| java.lang.String | getInitialServiceName()Get property  InitialServiceName. | 
| protected java.io.InputStream | getInputStream() | 
| int | getMaxAddUpdateThreadCount()the maximum number of threads to use for add/update/remove operations. | 
| int | getMaxCheckoutThreadCount()the maximum number of threads to use for batch checkout operations. | 
| atg.adapter.gsa.sqlimport.ParserFactory | getParserFactory()Get property  ParserFactory. | 
| java.lang.String | getProcessName()Get property  processName. | 
| Repository | getRepository()Get property  repositories. | 
| java.lang.String | getRepositoryName()get property  repositoryName. | 
| atg.repository.nucleus.RepositoryRegistryService | getRepositoryRegistry()Get property  repositoryRegistry. | 
| java.lang.String | getRepositoryRegistryName()Get property  repositoryRegistryName. | 
| boolean | getReserveIdsFlag()Get property  reserveIdsFlag. | 
| boolean | getShowTimeFlag()Get property  showTimeFlag. | 
| boolean | getStandalone()Get property  standalone. | 
| int | getTransactionBatchSize()Get property  transactionBatchSize. | 
| javax.transaction.TransactionManager | getTransactionManager()Get property  transactionManager. | 
| java.lang.String | getTransactionManagerName()Get property  transactionManagerName. | 
| java.lang.String | getUsername()Get property  username. | 
| VersionManager | getVersionManager()Get property  versionManager. | 
| java.lang.String | getVersionManagerName()Get property  versionManagerName. | 
| java.lang.String | getWorkflowName()Get property  workflowName. | 
| java.lang.String | getWorkingDirectoryName()Get property  workingDirectoryName. | 
| java.lang.String | getWorkspaceName()Get property  workspaceName. | 
| void | info(java.lang.Object pMsg,
    int pLevel) | 
| void | initialize()Prepare for export or import. | 
| static void | main(java.lang.String[] argv)Main entry point for use as command line tool. | 
| void | parseArguments(java.lang.String[] pArgs)Parse the specified command line arguments. | 
| void | removeImportListener(ImportListener pListener)Removes a ImportListener from the deployment listener notification
 collection | 
| void | reportPercentComplete() | 
| void | setActivityId(java.lang.String pActivityId)Set property  activityId. | 
| void | setBranchName(java.lang.String pBranchName)Set property  branchName. | 
| void | setCheckinComment(java.lang.String pCheckinComment)Set property  checkinComment. | 
| void | setCheckinFlag(boolean pCheckinFlag)Set property  checkinFlag. | 
| void | setClientLockManager(ClientLockManager pClientLockManager)Set property  clientLockManager. | 
| void | setClientLockManagerName(java.lang.String pClientLockManagerName)Set property  clientLockManagerName. | 
| void | setConfigPath(java.lang.String pConfigPath)Set property  configPath. | 
| void | setDataFeeder(DataFeeder pDataFeeder) | 
| void | setDataFile(java.io.File pDataFile)Set property  dataFile. | 
| void | setDataFileName(java.lang.String pDataFileName)Set property  dataFileName. | 
| void | setDebugLevel(int pDebugLevel)Set property  debugLevel. | 
| void | setDeleteAllFlag(boolean pDeleteAllFlag)Set property  deleteAllFlag. | 
| void | setFlushRepositoryCachesFlag(boolean pFlushRepositoryCachesFlag)Set property  flushRepositoryCachesFlag. | 
| void | setImportListenerNamesString(java.lang.String pImportListenerNamesString)Set property  username. | 
| void | setImportListeners(ImportListener[] pImportListeners) | 
| void | setImportSQLQueueSize(int pImportSQLQueueSize)Set property  ImportSQLQueueSize. | 
| void | setInfoLevel(int pInfoLevel)Set property  infoLevel. | 
| void | setInitialServiceName(java.lang.String pInitialServiceName)Set property  InitialServiceName. | 
| void | setMaxAddUpdateThreadCount(int pMaxAddUpdateThreadCount)the maximum number of threads to use for add/update/remove operations. | 
| void | setMaxCheckoutThreadCount(int pMaxCheckoutThreadCount)the maximum number of threads to use for batch checkout operations. | 
| void | setParserFactory(atg.adapter.gsa.sqlimport.ParserFactory pParserFactory)Set property  ParserFactory. | 
| void | setProcessName(java.lang.String pProcessName)Set property  processName. | 
| void | setRepository(Repository pRepository)Set property  repositories. | 
| void | setRepositoryName(java.lang.String pRepositoryName)Set property  repositoryName. | 
| void | setRepositoryRegistry(atg.repository.nucleus.RepositoryRegistryService pRepositoryRegistry)Set property  repositoryRegistry. | 
| void | setRepositoryRegistryName(java.lang.String pRepositoryRegistryName)Set property  repositoryRegistryName. | 
| void | setReserveIdsFlag(boolean pReserveIdsFlag)Set property  reserveIdsFlag. | 
| void | setShowTimeFlag(boolean pShowTimeFlag)Set property  showTimeFlag. | 
| void | setTransactionBatchSize(int pTransactionBatchSize)Set property  transactionBatchSize. | 
| void | setTransactionManager(javax.transaction.TransactionManager pTransactionManager)Set property  transactionManager. | 
| void | setTransactionManagerName(java.lang.String pTransactionManagerName)Set property  transactionManagerName. | 
| void | setUsername(java.lang.String pUsername)Set property  username. | 
| void | setVersionManager(VersionManager pVersionManager)Set property  versionManager. | 
| void | setVersionManagerName(java.lang.String pVersionManagerName)Set property  versionManagerName. | 
| void | setWorkflowName(java.lang.String pWorkflowName)Set property  workflowName. | 
| void | setWorkingDirectoryName(java.lang.String pWorkingDirectoryName)Set property  workingDirectoryName. | 
| void | setWorkspaceName(java.lang.String pWorkspaceName)Set property  workspaceName. | 
| void | startNucleus()Start a Nucleus, for use in standalone operation. | 
| java.lang.String | toString()Get a string representation of this object. | 
| void | warn(java.lang.Object pMsg) | 
addLogListener, createAdminServlet, doStartService, doStopService, getAbsoluteName, getAdminServlet, getAdminServletOutputStreamEncoding, getLoggingForVlogging, getLogListenerCount, getLogListeners, getName, getNameContext, getNucleus, getRoot, getServiceConfiguration, getServiceInfo, isAdminServletUseServletOutputStream, isLoggingDebug, isLoggingError, isLoggingInfo, isLoggingTrace, isLoggingWarning, isRunning, logDebug, logDebug, logDebug, logError, logError, logError, logInfo, logInfo, logInfo, logTrace, logTrace, logTrace, logWarning, logWarning, logWarning, nameContextElementBound, nameContextElementUnbound, removeLogListener, reResolveThis, resolveName, resolveName, resolveName, resolveName, sendLogEvent, setAdminServletOutputStreamEncoding, setAdminServletUseServletOutputStream, setLoggingDebug, setLoggingError, setLoggingInfo, setLoggingTrace, setLoggingWarning, setNucleus, setServiceInfo, startService, stopServicevlogDebug, vlogDebug, vlogDebug, vlogDebug, vlogDebugTrace, vlogError, vlogError, vlogError, vlogError, vlogInfo, vlogInfo, vlogInfo, vlogInfo, vlogTrace, vlogTrace, vlogTrace, vlogTrace, vlogWarning, vlogWarning, vlogWarning, vlogWarningpublic boolean getStandalone()
standalone. This is a flag which, if
 true indicates that the data loader is running standalone.standalonepublic void setDebugLevel(int pDebugLevel)
debugLevel. This is
 the level of detail to provide when printing debug messages.pDebugLevel - new value to setpublic int getDebugLevel()
debugLevel. This is
 the level of detail to provide when printing debug messages.debugLevelpublic void setShowTimeFlag(boolean pShowTimeFlag)
showTimeFlag. This is a flag which, if
 true, means that the current time in millis should be
 included in each info and dbg message. The default is
 false.pShowTimeFlag - new value to setpublic boolean getShowTimeFlag()
showTimeFlag. This is a flag which, if
 true, means that the current time in millis should be
 included in each info and dbg message. The default is
 false.showTimeFlagpublic void setInfoLevel(int pInfoLevel)
infoLevel. This is
 the level of detail to use for info messages. The default is 1.pInfoLevel - new value to setpublic int getInfoLevel()
infoLevel. This is
 the level of detail to use for info messages. The default is 1.infoLevelpublic void setDataFileName(java.lang.String pDataFileName)
dataFileName. This is
 the name of the data file to use.pDataFileName - new value to set, must not be nullpublic java.lang.String getDataFileName()
dataFileName. This is
 the name of the data file to use.dataFileNamepublic void setDataFile(java.io.File pDataFile)
dataFile. This is the data file to use. If not
 explicitly set the dataFileName and workingDirectoryName properties are used
 to get the data file.pDataFile - new value to setpublic java.io.File getDataFile()
dataFile. This is the data file to use. If not
 explicitly set the dataFileName and workingDirectoryName properties are used
 to get the data file.dataFile, never nullpublic void setWorkingDirectoryName(java.lang.String pWorkingDirectoryName)
workingDirectoryName. This is the name of the
 working directory to use. The data file name is resolved relative to the
 working directory. The default is null.pWorkingDirectoryName - new value to setpublic java.lang.String getWorkingDirectoryName()
workingDirectoryName. This is the name of the
 working directory to use. The data file name is resolved relative to the
 working directory. The default is null.workingDirectoryNamepublic void setConfigPath(java.lang.String pConfigPath)
configPath. This is
 the configpath to pass to Nucleus.pConfigPath - new value to setpublic java.lang.String getConfigPath()
configPath. This is
 the configpath to pass to Nucleus.configPathpublic void setInitialServiceName(java.lang.String pInitialServiceName)
InitialServiceName. This is the name of the
 initial service to use. The default is "/atg/epub/InitialService".pInitialServiceName - new value to setpublic java.lang.String getInitialServiceName()
InitialServiceName. This is the name of the
 initial service to use. The default is "/atg/epub/InitialService".InitialServiceNamepublic void setTransactionManagerName(java.lang.String pTransactionManagerName)
transactionManagerName. This is the name of the
 transaction manager to use for import. The default is
 "/atg/dynamo/transaction/TransactionManager".pTransactionManagerName - new value to setpublic java.lang.String getTransactionManagerName()
transactionManagerName. This is the name of the
 transaction manager to use for import. The default is
 "/atg/dynamo/transaction/TransactionManager".transactionManagerNamepublic void setTransactionManager(javax.transaction.TransactionManager pTransactionManager)
transactionManager. This is
 the transaction manager to use for import.pTransactionManager - new value to setpublic javax.transaction.TransactionManager getTransactionManager()
transactionManager. This is
 the transaction manager to use for import.transactionManagerpublic void setClientLockManagerName(java.lang.String pClientLockManagerName)
clientLockManagerName. This is the name of the
 lock manager. The default is
 "/atg/dynamo/service/ClientLockManager".pClientLockManagerName - new value to setpublic java.lang.String getClientLockManagerName()
clientLockManagerName. This is the name of the
 transaction manager to use. The default is
 "/atg/dynamo/service/ClientLockManager".clientLockManagerNamepublic void setClientLockManager(ClientLockManager pClientLockManager)
clientLockManager. This is
 the transaction manager to use for import.pClientLockManager - new value to setpublic ClientLockManager getClientLockManager()
clientLockManager. This is
 the transaction manager to use for import.clientLockManagerpublic ImportListener[] getImportListeners()
public void setImportListeners(ImportListener[] pImportListeners)
pImportListeners - Sets the value of the ImportListeners
          property.public void addImportListener(ImportListener pListener)
pListener - a ImportListener to notifypublic void removeImportListener(ImportListener pListener)
pListener - the ImportListener to removepublic void setMaxCheckoutThreadCount(int pMaxCheckoutThreadCount)
pMaxCheckoutThreadCount - new value to setpublic int getMaxCheckoutThreadCount()
MaxCheckoutThreadCountpublic void setMaxAddUpdateThreadCount(int pMaxAddUpdateThreadCount)
pMaxAddUpdateThreadCount - new value to setpublic int getMaxAddUpdateThreadCount()
mMaxAddUpdateThreadCountpublic void setTransactionBatchSize(int pTransactionBatchSize)
transactionBatchSize. This is the maximum
 number of repository items to import in a single
 transaction. A value of 0 means perform all operations in a single
 transaction. The default is 1000.pTransactionBatchSize - new value to setpublic int getTransactionBatchSize()
transactionBatchSize. This is the maximum
 number of repository items to export or import in a single
 transaction. A value of 0 means perform all operations in a single
 transaction. The default is 1000.transactionBatchSizepublic void setImportSQLQueueSize(int pImportSQLQueueSize)
ImportSQLQueueSize. This is the maximum
 number of repository items to import in a single
 transaction. A value of 0 means perform all operations in a single
 transaction. The default is 1000.pImportSQLQueueSize - new value to setpublic int getImportSQLQueueSize()
ImportSQLQueueSize. This is the maximum
 number of repository items to export or import in a single
 transaction. A value of 0 means perform all operations in a single
 transaction. The default is 1000.ImportSQLQueueSizepublic void setDeleteAllFlag(boolean pDeleteAllFlag)
deleteAllFlag. This is a flag which, if
 true means that all items should be deleted in each
 affected repository before importing data. The items are only deleted
 for GSARepositories. The default is true.pDeleteAllFlag - new value to setpublic boolean getDeleteAllFlag()
deleteAllFlag. This is a flag which, if
 true means that all items should be deleted in each
 affected repository before importing data. The items are only deleted
 for GSARepositories. The default is false.deleteAllFlagpublic void setFlushRepositoryCachesFlag(boolean pFlushRepositoryCachesFlag)
flushRepositoryCachesFlag. This is a flag
 which, if true indicates that repository caches should be
 flushed when batches are committed. The default is falsepFlushRepositoryCachesFlag - new value to setpublic boolean getFlushRepositoryCachesFlag()
flushRepositoryCachesFlag. This is a flag
 which, if true indicates that repository caches should be
 flushed when batches are committed. The default is falseflushRepositoryCachesFlagpublic void setWorkspaceName(java.lang.String pWorkspaceName)
workspaceName. This is the name of the
 workspace to use for import. The workspace will be created if it does
 not already exist. A value of null means do the import
 without the version manager. The default is "import".pWorkspaceName - new value to setpublic java.lang.String getWorkspaceName()
workspaceName. This is the name of the
 workspace to use for import. The workspace will be created if it does
 not already exist. A value of null means do the import
 without the version manager. The default is "import".workspaceNamepublic void setProcessName(java.lang.String pProcessName)
processName. This is the name of a process
 to use for import. A value of null means do the import
 without creating a process. The default is null.pProcessName - new value to setpublic java.lang.String getProcessName()
processName. This is the name of a
 process to use for import. A value of null means
 do the import without creating a process. The default is null.processNamepublic void setWorkflowName(java.lang.String pWorkflowName)
workflowName. This is the name of a workflow
 to use for import. A value of null means do the import
 with the default project type. The default is "/Common/commonWorkflow.wdl".pWorkflowName - new value to setpublic java.lang.String getWorkflowName()
workflowName. This is the name of a
 workflow to use for import. A value of null means
 do the import with the default workflow. The default is "/Common/commonWorkflow.wdl".workflowNamepublic void setActivityId(java.lang.String pActivityId)
activityId. This is the ID of an activity to 
 associate with a project created by the loader for import. The default 
 value is null.pActivityId - The activity ID.public java.lang.String getActivityId()
activityId. This is the ID of an activity to 
 associate with a project created by the loader for import. The default 
 value is null.public void setBranchName(java.lang.String pBranchName)
branchName. This is the name of branch to use
 if creating a new workspace. The default is "main".pBranchName - new value to setpublic java.lang.String getBranchName()
branchName. This is the name of branch to use
 if creating a new workspace. The default is "main".branchNamepublic void setCheckinFlag(boolean pCheckinFlag)
checkinFlag. This is a flag which, if
 true, indicates that a version manager checkin should be
 performed for imports. The default is true.pCheckinFlag - new value to setpublic boolean getCheckinFlag()
checkinFlag. This is a flag which, if
 true, indicates that a version manager checkin should be
 performed for imports.  The default is true.checkinFlagpublic void setCheckinComment(java.lang.String pCheckinComment)
checkinComment. This is
 the checkin comment to use when importing data. The default is "import".pCheckinComment - new value to setpublic java.lang.String getCheckinComment()
checkinComment. This is
 the checkin comment to use when importing data. The default is "import".checkinCommentpublic void setUsername(java.lang.String pUsername)
username. This is
 the username to use when importing data. The default is "admin".pUsername - new value to setpublic java.lang.String getUsername()
username. This is
 the username to use when importing data. The default is "admin".usernamepublic void setImportListenerNamesString(java.lang.String pImportListenerNamesString)
username. Comma separated component path names 
 for ImportListeners to call.pImportListenerNamesString - new value to setpublic java.lang.String getImportListenerNamesString()
username. Comma separated component path names 
 for ImportListeners to call.importListenerNamesStringpublic void setVersionManagerName(java.lang.String pVersionManagerName)
versionManagerName. This is the name of the
 version manager to use for imports. The default is
 "/atg/epub/version/VersionManagerService".pVersionManagerName - new value to setpublic java.lang.String getVersionManagerName()
versionManagerName. This is the name of the
 version manager to use for imports. The default is
 "/atg/epub/version/VersionManagerService".versionManagerNamepublic void setVersionManager(VersionManager pVersionManager)
versionManager. This is
 the version manager to use for imports.pVersionManager - new value to setpublic VersionManager getVersionManager()
versionManager. This is
 the version manager to use for imports.versionManagerpublic void setRepositoryName(java.lang.String pRepositoryName)
repositoryName. This is
 the name of the repository to be imported into 
 if the XML does not have repository path specified.pRepositoryName - new value to setpublic java.lang.String getRepositoryName()
repositoryName. This is
 the names of the repository to be imported into 
 if the XML does not have repository path specified.public void setRepository(Repository pRepository)
repositories. This is
 the repository to be imported into.pRepository - new value to setpublic Repository getRepository()
repositories. This is
 the repository to be imported into.public void setRepositoryRegistryName(java.lang.String pRepositoryRegistryName)
repositoryRegistryName. This is the name of
 the registry service to use when exporting all repositories. The default
 is "/atg/registry/ContentRepositories".pRepositoryRegistryName - new value to setpublic java.lang.String getRepositoryRegistryName()
repositoryRegistryName. This is the name of
 the registry service to use when exporting all repositories. The default
 is "/atg/registry/ContentRepositories".repositoryRegistryNamepublic void setRepositoryRegistry(atg.repository.nucleus.RepositoryRegistryService pRepositoryRegistry)
repositoryRegistry. This is
 the repository registry service to use when exporting all repositories.pRepositoryRegistry - new value to setpublic atg.repository.nucleus.RepositoryRegistryService getRepositoryRegistry()
repositoryRegistry. This is
 the repository registry service to use when exporting all repositories.repositoryRegistrypublic void setReserveIdsFlag(boolean pReserveIdsFlag)
reserveIdsFlag. This is a flag which, if
 true indicates that the ids of imported repository items
 should be reserved with the appropriate id generator. The default is
 true.pReserveIdsFlag - new value to setpublic boolean getReserveIdsFlag()
reserveIdsFlag. This is a flag which, if
 true indicates that the ids of imported repository items
 should be reserved with the appropriate id generator. The default is
 true.reserveIdsFlagpublic DataFeeder getDataFeeder()
public void setDataFeeder(DataFeeder pDataFeeder)
public void setParserFactory(atg.adapter.gsa.sqlimport.ParserFactory pParserFactory)
ParserFactory.pParserFactory - new value to setpublic atg.adapter.gsa.sqlimport.ParserFactory getParserFactory()
ParserFactory.ParserFactorypublic static void main(java.lang.String[] argv)
public boolean execute()
                throws atg.adapter.gsa.sqlimport.ImportException
true if successful, else falseImportException - if there is a problempublic void initialize()
                throws atg.adapter.gsa.sqlimport.ImportException
ImportException - if there is deployment troublepublic void parseArguments(java.lang.String[] pArgs)
pArgs - arguments to parsepublic void startNucleus()
protected java.io.InputStream getInputStream()
                                      throws java.io.FileNotFoundException
java.io.FileNotFoundExceptionpublic void flushRepositoryCaches()
public void reportPercentComplete()
reportPercentComplete in interface atg.adapter.gsa.sqlimport.ImportLoggerpublic void info(java.lang.Object pMsg,
        int pLevel)
info in interface atg.adapter.gsa.sqlimport.ImportLoggerpublic void warn(java.lang.Object pMsg)
warn in interface atg.adapter.gsa.sqlimport.ImportLoggerpublic void dbg(java.lang.Object pMsg,
       int pLevel)
dbg in interface atg.adapter.gsa.sqlimport.ImportLoggerpublic java.lang.String toString()
toString in class java.lang.Object