atg.adapter.gsa
Class InitializingVersionRepository

java.lang.Object
  extended by atg.nucleus.logging.VariableArgumentApplicationLoggingImpl
      extended by atg.nucleus.GenericService
          extended by atg.repository.RepositoryImpl
              extended by atg.adapter.gsa.GSARepository
                  extended by atg.adapter.version.VersionRepository
                      extended by atg.adapter.gsa.InitializingVersionRepository
All Implemented Interfaces:
atg.adapter.gsa.Constants, atg.adapter.gsa.event.GSAEventListener, atg.adapter.gsa.LoadBatchRepository, atg.adapter.version.RepositoryVersionContainer, atg.naming.NameContextBindingListener, atg.naming.NameContextElement, atg.naming.NameResolver, atg.nucleus.AdminableService, atg.nucleus.logging.ApplicationLogging, atg.nucleus.logging.ApplicationLoggingSender, atg.nucleus.logging.TraceApplicationLogging, atg.nucleus.logging.VariableArgumentApplicationLogging, atg.nucleus.naming.ComponentNameResolver, atg.nucleus.Service, atg.nucleus.ServiceListener, atg.repository.CompositeKeyRepository, atg.repository.content.ContentRepository, atg.repository.DisplayableRepository, atg.repository.MutableCompositeKeyRepository, atg.repository.MutableRepository, atg.repository.ProxyableRepository, atg.repository.Repository, atg.repository.RepositoryViewContainer, atg.service.jdbc.DataSourceShutdownListener, atg.service.jdbc.SwitchingDataSourceEventListener, atg.service.lockmanager.LockOwnershipListener, java.util.EventListener

public class InitializingVersionRepository
extends atg.adapter.version.VersionRepository

This class is an extension of atg.adapter.version.VersionRepository. Currently, it does not support to create or drop tables based on startSQLRepository SQL. It only support to create or drop tables through specified sql scripts. For example: sqlCreateFiles=oracle={atg.dynamo.root}/SystemTests/bizuiTest/sql/install/oracle/testrepver_ddl.sql sqlDropFiles=oracle={atg.dynamo.root}/SystemTests/bizuiTest/sql/install/oracle/drop_testrepver_ddl.sql Additionally, it uses the GSA's import facility to allow data to be loaded into the tables after creation. But you have to give relevant arguments. There are two set of arguments you can choose. 1. specify projectName, user and comment/doCheckin(=false) For example: importFiles={atg.dynamo.root}/SystemTests/BizuiTest/data/test-repository-data.xml projectName=newproject user=publishing comment=ImportDataWithProjectName 2. specify workspaceIdPrefix, branchId, comment/doCheckin(=false) For example: importFiles={atg.dynamo.root}/SystemTests/BizuiTest/data/test-repository-data.xml workspaceIdPrefix=TestRepImport branchId=main comment=hello doCheckin=true

Author:
adwivedi, qma Note: this class is modified from InitializingGSA.java. It has most properties of InitializingGSA. You can see the detail info from the following link: http://atlas.atg.com/mfrenzel/apiauto/APIAutoTest.html#initializinggsa

Field Summary
 java.lang.String DB2
           
 java.lang.String DEFAULT
           
 java.lang.String INFORMIX
           
 java.lang.String MICROSOFT
           
 boolean mRestartAfterTableCreation
           
 java.lang.String ORACLE
           
 java.lang.String SOLID
           
 java.lang.String SYBASE
           
 java.lang.String SYBASE2
           
 
Fields inherited from class atg.adapter.version.VersionRepository
CLASS_VERSION, ERR_ADD_ITEM_DIFFLINE, ERR_ADD_ITEM_INVALID_TYPE, ERR_ADD_NONTRANSIENT, ERR_CHECKIN_DUPLICATE_HEAD_VERSIONS, ERR_CHECKIN_FAILED_WS, ERR_CHECKIN_NO_HOB, ERR_CHECKIN_NULL_WV, ERR_CHECKOUT_DUPLICATE_VERSIONS, ERR_CHECKOUT_IN_PROCESS, ERR_CHECKOUT_NO_LOCK, ERR_CHECKOUT_NO_VER, ERR_CHECKOUT_NO_WS, ERR_CHECKOUT_NULL_VER, ERR_CHECKOUT_ON_FROZEN_WS, ERR_CREATE_ITEM_CALLED_WITH_EXISTING_ID, ERR_DB_NOT_SUPPORTED_FOR_PURGE, ERR_DEVLINE_NOT_EDITABLE_WORKSPACE, ERR_DEVLINE_NOT_WORKSPACE, ERR_GWV_CHECKED_IN, ERR_GWV_NULL_WS, ERR_MERGE_FAILED, ERR_MERGE_NULL_SOURCE_VER, ERR_MERGE_NULL_TARGET_VER, ERR_MERGE_SAME_BRANCH, ERR_NO_TRANSACTION_DURING_LOCK_REQUEST, ERR_NULL_BRANCH, ERR_NULL_LINE, ERR_NULL_PARENT_BRANCH, ERR_NULL_SNAPSHOT, ERR_NULL_WORKSPACE, ERR_REMOVE_BRANCH_IS_MAIN, ERR_REMOVE_ITEM, ERR_RESOLVE_NO_HOB, ERR_RESOLVE_NO_WV, ERR_REVERT_NO_WS, ERR_REVERT_TO_WORKSPACE_FAILED, ERR_SPECIFIC_VERSION_QUERIED_ON_SNAPSHOT, ERR_TARGET_WORKSPACE_NOT_OPEN, ERR_TYPE_NOT_VERSIONED, ERR_UPDATE_ITEM_INVALID_TYPE, ERR_WORKSPACE_TO_REVERT_TO_OPEN, ERR_WORKVER_OF_TYPE_OUT_OF_DATE, ERR_WORKVER_OUT_OF_DATE, MSG_BRANCH_ITEM_TYPE, MSG_CHECKIN, MSG_CHECKIN_REPOSITORY, MSG_CHECKIN_TYPE, MSG_CHECKOUT, MSG_CHECKOUT_VERSION, MSG_CREATE_BRANCH, MSG_CREATE_SNAPSHOT, MSG_GET_ALL_VERSIONS_IN_LINE, MSG_GET_COUNT_ALL_VERSIONS_IN_LINE, MSG_GET_HISTORY, MSG_GET_VERSION_ITEM, MSG_GET_VERSION_ITEM_VER, MSG_GET_VERSIONS_IN_LINE, MSG_GET_VERSIONS_WORKSPACE, MSG_GET_WORK_VERSION_ITEM, MSG_GET_WORKING_VERS, MSG_GET_WORKING_VERS_TYPE, MSG_MERGE_TO_WORKSPACE, MSG_OPTIMIZED_REVERT, MSG_PURGE_VERSIONS, MSG_REMOVE_BRANCH, MSG_REMOVE_SNAPSHOT, MSG_RESOLVE, MSG_REVERT, MSG_SNAPSHOT_DIFF, MSG_SNAPSHOT_ITEM_TYPE, WARN_CHECKOUT_WORKING_EXISTS
 
Fields inherited from class atg.adapter.gsa.GSARepository
mDisableQueryCachesAtStartup, mForeignRepositoryMapper, mForeignRepositorySuffix, mKeepWeakItemReferencesOnItemCacheInvalidation, mLazyLoadItems, mLoadItemBatchSize, mUseCachedCountQueries, mUseCacheForDelete, mWaitFor_START_SERVICE_Event, mXMLToolsFactory, OJ_SUPPORT_INFORMIX, OJ_SUPPORT_JDBC, OJ_SUPPORT_NONE, OJ_SUPPORT_PLUS_EQUALS, OJ_SUPPORT_SQL92, OJ_SUPPORT_STAR_EQUALS, sResourceBundle
 
Fields inherited from class atg.nucleus.GenericService
SERVICE_INFO_KEY
 
Fields inherited from interface atg.adapter.version.RepositoryVersionContainer
UNOPTIMIZED_MERGE_PHASE_ONE, UNOPTIMIZED_MERGE_PHASE_TWO
 
Fields inherited from interface atg.adapter.gsa.Constants
ATTR_CASCADE_DELETE_ORDER, ATTR_CSW_PROPERTIES, ATTR_CSW_QUERIES, ATTR_CURRENT_ITEM_CACHE_SIZE, ATTR_CURRENT_ITEM_CACHE_TIMEOUT, ATTR_DEFAULT_UNCACHED_ITEM_QUERIES, ATTR_HEAD_OF_LINE_CACHE_SIZE, ATTR_HEAD_OF_LINE_CACHE_TIMEOUT, ATTR_LOADING_STRATEGY, ATTR_SPLIT_QUERIES, ATTR_TEXT_HANDLE_COLUMN, ATTR_TEXT_INDEX_TABLE, ATTR_UPDATE_LAST_MODIFIED, CASCADE_DELETE_AFTER_AUX_BEFORE_PRI, CASCADE_DELETE_FIRST, CASCADE_DELETE_LAST, CASCADE_DELETE_ORDER_NAMES, DEFAULT_EVENT_SERVER, DEFAULT_GSA_CACHE_CLIENT_MANAGER, DEFAULT_INVALIDATOR_SERVICE, ERR_ADD_MISSING_PROPERTIES, ERR_ADD_NON_TRANSIENT, ERR_ARGS_FOR_NON_PARAMETER_QUERY, ERR_BAD_EVENT_DATA, ERR_BAD_TABLE, ERR_CIRCULAR_REFERENCE, ERR_CLASS_NOT_FOUND, ERR_COMPARE_MULTI, ERR_COMPARE_NONCOMPARABLE, ERR_CONTENT_PROPERTIES_NOT_DEFINED, ERR_COULD_NOT_UNSUBSCRIBE, ERR_DEPENDENT_PROP_NOT_EXISTS, ERR_DEPENDENT_PROP_NULL, ERR_DS_PREPARE, ERR_DS_SWITCH, ERR_FOLDER_PROPERTIES_NOT_DEFINED, ERR_HANDLING_INVALIDATE_CACHE_ENTRY, ERR_ID_SPACE_CONFIGURATION, ERR_ILLEGAL_PARAM_TYPE, ERR_INITIALIZING_ID_GENERATOR, ERR_INVALID_COMPARISON_QUERY, ERR_INVALID_DATA_TYPE_NAME, ERR_INVALID_ITEM, ERR_INVALID_ITEM_DESCRIPTOR_NAME, ERR_INVALID_KEY, ERR_INVALID_KEY_ELEMENT, ERR_INVALID_KEY_ENCODING, ERR_INVALID_KEY_VALUES, ERR_INVALID_LIST_INDEX, ERR_INVALID_PATTERNMATCH_QUERY, ERR_INVALID_PROPERTY, ERR_INVALID_QUERY, ERR_INVALID_QUERY_ELEMENT, ERR_INVALID_TEXT_SEARCH_QUERY, ERR_INVALID_TM_DS_COMBO, ERR_ITEM_NOT_EXIST, ERR_LOAD_COLUMN_INFO, ERR_MISSING_ID_SPACE, ERR_NO_ARGS_FOR_QUERY, ERR_NO_DATABASE_TABLE_INFO, ERR_NO_DATATYPE_FOR_PROPERTY, ERR_NO_DB2_HANDLE, ERR_NO_DEFAULT_SEARCH_PROPERTIES, ERR_NO_EVENT_SERVER, ERR_NO_IDS, ERR_NO_LOWER_FUNCTION, ERR_NO_PARAMETER_EXPRESSION, ERR_NO_PARSER, ERR_NO_PRIMARY_TABLE, ERR_NO_SUB_PROPERTIES, ERR_NO_SUBSCRIBER_ITEM_DESCRIPTOR, ERR_NO_SYB_TEXT_INDEX, ERR_NO_TEMPLATE_FILES, ERR_NO_TRANSACTION, ERR_NO_TRANSIENT_QUERIES, ERR_NOT_DISTRIBUTED_MODE, ERR_NULL_ARGUMENT, ERR_NULL_ID, ERR_NULL_ITEM, ERR_NULL_QUERY_OPTIONS, ERR_PARSING_TEMPLATE, ERR_PROCEDURE_HELPER_INIT, ERR_PROPERTY_NOT_QUERYABLE, ERR_RETURN_PROP_NOT_EXISTS, ERR_RETURN_PROP_NOT_GSA, ERR_RETURN_PROP_NOT_READ, ERR_RETURN_PROP_NULL, ERR_RQL_FILTER, ERR_SQL_STRING_NULL, ERR_SUB_TYPE_PROPERTY_ON_NON_ROOT_TYPE, ERR_TABLE_KEY_UNMATCHED, ERR_TRANSACTION, ERR_TYPE_MATCHING, ERR_UNABLE_TO_READ_TEMPLATE_FILE, ERR_UNKNOWN_EVENT_TYPE, ERR_VERSION_PROPERTY_INVALID_TYPE, ERR_VIEW_IS_TRANSIENT, ERR_WRONG_NUMBER_ARGS_FOR_QUERY, FTS_LANG_DB2, FTS_LANG_MSSQL, FTS_LANG_MSSQL_INLINE, FTS_LANG_ORACLE, FTS_LANG_SYBASE, INFO_STARTUP_BEGIN, INFO_STARTUP_END, ISOLATION_LEVEL_NAMES, LOADING_STRATEGY_DEFAULT, LOADING_STRATEGY_EAGER, LOADING_STRATEGY_LAZY, READ_COMMITTED, REPEATABLE_READ, REPOSITORY_COMPONENT_NAME, RESOURCE_BUNDLE_NAME, SERIALIZABLE, SUBSCRIBER_ADDRESS_PROPERTY, SUBSCRIBER_ITEM_DESCRIPTOR_NAME, SUBSCRIBER_ITEM_DESCRIPTOR_PROPERTY, SUBSCRIBER_PORT_PROPERTY, SUBSCRIBER_REPOSITORY_PROPERTY, WARN_PROBLEM_SENDING_EVENT, WARN_RETURN_PROP_MULTI, WARN_RETURN_PROP_TRANSIENT
 
Fields inherited from interface atg.nucleus.logging.ApplicationLogging
DEFAULT_LOG_DEBUG_STATUS, DEFAULT_LOG_ERROR_STATUS, DEFAULT_LOG_INFO_STATUS, DEFAULT_LOG_WARNING_STATUS
 
Fields inherited from interface atg.nucleus.logging.TraceApplicationLogging
DEFAULT_LOG_TRACE_STATUS
 
Constructor Summary
InitializingVersionRepository()
           
 
Method Summary
 void doStartService()
          Overrides doStartService from VersionRepository to make the repository optionally create required tables by specified sql scripts and load data using the TemplateParser -import flag.
 void doStopService()
          This method is called when the repository is shutdown.
 void dropTables()
          This method drops all tables required by the GSARepository.
 java.lang.String getBranchId()
           
 java.lang.String getComment()
           
 boolean getDoCheckin()
           
 java.io.File[] getImportFiles()
           
 java.lang.String[] getImportFilesAsStrings()
           
 java.lang.String getProjectName()
           
 java.lang.String getProjectType()
           
 java.util.Properties getSqlCreateFiles()
          returns optional mapping of user-specified sql files that should be executed instead of the SQL generated by startSQLRepository.
 java.util.Properties getSqlDropFiles()
          returns optional mapping of user-specified sql files that should be executed during 'tear-down' instead of basing it on the SQL generated by startSQLRepository.
 SQLProcessorEngine getSQLProcessor()
           
 java.lang.String getUser()
           
 java.lang.String getWorkspaceIdPrefix()
           
 boolean isCreateTables()
           
 boolean isDoCheckin()
           
 boolean isDropTablesAtShutdown()
           
 boolean isDropTablesIfExist()
           
 boolean isExecuteCreateAndDropScripts()
          returns true if create and drop scripts mapped through properties 'setSqlCreateFiles' and 'getSqlCreateFiles' should be executed at startup.
 boolean isImportEveryStartup()
           
 boolean isImportWithTransaction()
           
 boolean isLoadColumnInfosAtInitialStartup()
          returns true if the GSA should load JDBC metadata when starting the initial instantiation of the component.
 boolean isLoggingCreateTables()
           
 boolean isRestartingAfterTableCreation()
          Returns true if this repository will attempt to "restart" after creating tables.
 boolean isStripReferences()
           
 boolean restart()
          Restarts the repository.
 void setBranchId(java.lang.String pBranchId)
           
 void setComment(java.lang.String pComment)
           
 void setCreateTables(boolean pCreate)
           
 void setDoCheckin(boolean pDoCheckin)
           
 void setDropTablesAtShutdown(boolean pDrop)
           
 void setDropTablesIfExist(boolean pDrop)
           
 void setExecuteCreateAndDropScripts(boolean pExec)
          if set to true then create and drop scripts mapped through properties 'setSqlCreateFiles' and 'getSqlCreateFiles' will be executed.
 void setImportEveryStartup(boolean pImport)
           
 void setImportFiles(java.io.File[] pFiles)
           
 void setImportWithTransaction(boolean pTran)
           
 void setIsTemporaryInstantiation(boolean pTemp)
           
 void setLoadColumnInfosAtInitialStartup(boolean pLoad)
          set to true if the GSA should load JDBC metadata when starting the initial instantiation of the component.
 void setloggingCreateTables(boolean pLog)
           
 void setProjectName(java.lang.String pProjectName)
           
 void setProjectType(java.lang.String pProjectType)
           
 void setRestartingAfterTableCreation(boolean pRestart)
          Sets if this repository will attempt to "restart" after creating tables.
 void setSqlCreateFiles(java.util.Properties pFiles)
          Optional mapping of user-specified sql files that should be executed instead of the SQL generated by startSQLRepository.
 void setSqlDropFiles(java.util.Properties pFiles)
          returns optional mapping of user-specified sql files that should be executed during 'tear-down' instead of basing it on the SQL generated by startSQLRepository.
 void setSQLProcessor(SQLProcessorEngine pEngine)
           
 void setStripReferences(boolean pStrip)
           
 void setUser(java.lang.String pUser)
           
 void setWorkspaceIdPrefix(java.lang.String pWorkspaceIdPrefix)
           
 
Methods inherited from class atg.adapter.version.VersionRepository
addItem, addItem, addItemOnCommit, addTableInvalidationListeners, addVersionBatchEventListener, addWrapperListeners, checkIn, checkIn, checkOut, checkOut, checkOut, createBranch, createItem, createItem, createItem, createSnapshot, formatMsg, formatMsg, formatMsg, formatMsg, formatMsg, generateSQL, getAssertBranchHeadCount, getAssertCheckout, getAssetVersionColumnName, getBranchColumnName, getBranchingBatchSize, getCheckinDateColumnName, getCurrentDevelopmentLine, getCurrentMutableDevelopmentLine, getCurrentVersionItemsInLine, getDefaultViewName, getDependentItems, getDeployableTypeNames, getFilterDeleted, getFolder, getFolderByPath, getFolders, getFoldersByPath, getHistoryIdPropertyName, getIsBranchHeadColumnName, getItem, getItem, getItem, getItemByPath, getItemDescriptor, getItemDescriptorNames, getItemForUpdate, getItemForUpdate, getItemForUpdate, getItems, getItems, getItems, getItems, getItems, getItemsByPath, getItemsForUpdate, getItemsForUpdate, getItemsForUpdate, getMaxCurrentVersionItemCacheTimeout, getMaxHeadOfLineCacheTimeout, getNonVersionTypeNames, getPathSeparator, getPredecessorColumnName, getRootFolder, getSecondAssetVersionColumnName, getSnapshotDiff, getVersionDeletedColumnName, getVersionEditableColumnName, getVersionHistory, getVersionItem, getVersionItem, getVersionItemCountInLine, getVersionItemsByDefault, getVersionItemsInLine, getVersionItemsInLine, getVersionItemsInLine, getVersionManager, getVersionTypeNames, getView, getViewNames, getWorkingVersionItem, getWorkingVersions, getWorkspaceColumnName, getWrappedRepository, isAssertBranchHeadCount, isAssertCheckout, isPreloadItemTypeProperties, isRemoveReferencesToItemBeforeRemoveItem, isSortWorkspaceAndBranchSeparately, isUpToDate, isUseNotExistsCountQuery, isVersionItemsByDefault, loadBatch, merge, merge, purge, removeBranch, removeItem, removeItem, removeItem, removeSnapshot, removeTableInvalidationListeners, removeVersionBatchEventListener, removeWrapperListeners, resolve, revert, revertToWorkspace, setAssertBranchHeadCount, setAssertCheckout, setAssetVersionColumnName, setAutoCommitInitialization, setAutoUpdateSubscribers, setBranchColumnName, setBranchingBatchSize, setCheckinDateColumnName, setCheckTables, setDataSource, setDebugLevel, setDefaultTextSearchStringFormat, setDisableItemCachesAtStartup, setDisableQueryCachesAtStartup, setEnforceRequiredProperties, setEscapeWildcards, setEventServer, setFilterDeleted, setHandleRangesInMemory, setHistoryIdPropertyName, setIsBranchHeadColumnName, setLazyBatchLoadTimeout, setLazyLoadItems, setLoadItemBatchSize, setLocaleSensitiveSorting, setLocalTransactionModeInitialization, setLockTimeout, setLoggingDebug, setLoggingError, setLoggingInfo, setLoggingWarning, setMaxCurrentVersionItemCacheTimeout, setMaxHeadOfLineCacheTimeout, setMaxTableNameLength, setMetaDataCatalogName, setMetaDataSchemaPattern, setOuterJoinSupport, setPathSeparator, setPredecessorColumnName, setPreloadItemTypeProperties, setRemoveReferencesToItemBeforeRemoveItem, setSafeSQLTypes, setSecondAssetVersionColumnName, setSetAutoCommit, setSimulateTextSearchQueries, setSimulateTextSearchQueriesMatchingOperation, setSkipNullProperties, setSortWorkspaceAndBranchSeparately, setSQLLowerFunction, setStoreTransientItems, setUseCacheForDelete, setUseDatabaseQueries, setUseNotExistsCountQuery, setUseSetAsciiStream, setUseSetBinaryStream, setUseSetObject, setUseSetUnicodeStream, setUseTransactionsForCachedReads, setVersionDeletedColumnName, setVersionEditableColumnName, setVersionItemsByDefault, setVersionManager, setWildcardEscapeCharacter, setWorkspaceColumnName, setWrappedRepository, supportsOptimizedAssetReplication, updateItem
 
Methods inherited from class atg.adapter.gsa.GSARepository
addContentItemDescriptor, addItemDescriptor, addItemToCache, checkInvalidationService, checkSubscriptions, clearWeakTables, copyFromOtherRepository, createAdminServlet, currentTransaction, dataSourceShutdown, dumpCaches, dumpCachesForReload, findItemToUndelete, format, format, format, format, generateItemDescriptorId, generatePropertyDescriptorId, generateTableId, getAutoCommitInitialization, getAutoUpdateSubscribers, getBundle, getCachedIds, getCacheRestoreFile, getCacheSwitchHot, getCheckItemAmbiguousExistence, getCheckTables, getComputeChecksumAndLength, getContentItemDescriptors, getContentRootPathProvider, getDatabaseName, getDatabaseTableInfo, getDatabaseTableInfo, getDatabaseTableInfos, getDatabaseVersion, getDataSource, getDefaultItemDescriptor, getDefaultTextSearchStringFormat, getDefinitionFiles, getDisableItemCachesAtStartup, getDisableQueryCachesAtStartup, getEnforceRequiredProperties, getEscapeWildcards, getEventServer, getFolderItemDescriptor, getForeignRepositoryMapper, getForeignRepositorySuffix, getGroupContainer, getGroupContainerPath, getGSACacheClientManager, getHandleRangesInMemory, getIdGenerator, getInvalidationAbsoluteName, getInvalidatorService, getItemDescriptor, getItemDescriptorAliases, getKeepWeakItemReferencesOnItemCacheInvalidation, getLazyBatchLoadTimeout, getLazyLoadItems, getLoadItemBatchSize, getLocaleSensitiveSorting, getLocalTransactionModeInitialization, getLockManager, getLockTimeout, getLoggingContext, getMaxTableNameLength, getMetaDataCatalogName, getMetaDataSchemaPattern, getOuterJoinSupport, getParsedFirstPass, getPreparedStatementPutter, getPrintNull, getQueryTransactionCacheCutoffSize, getResourceBundleName, getRestoreCacheOnRestart, getSafeSQLTypes, getSetAutoCommit, getSimulateTextSearchQueries, getSimulateTextSearchQueriesMatchingOperation, getSkipNullProperties, getSQLLowerFunction, getSQLMaxFunction, getSQLMinFunction, getStoredProcedureHelper, getStoreTransientItems, getSubscriberRepository, getSynchronousInvalidationEvents, getTablePrefix, getTruncateRepositorySQLFile, getTruncateTableSQL, getUpdateSchemaInfoCache, getUseCachedCountQueries, getUseCacheForDelete, getUseDatabaseQueries, getUsedCacheModes, getUseDistinctForIncludesAnyQueries, getUseDistinctForIncludesItemQueries, getUseDistinctForIncludesQueries, getUserPropertyDescriptors, getUseSetAsciiStream, getUseSetBinaryStream, getUseSetCharacterStream, getUseSetObject, getUseSetUnicodeStream, getUseTransactionsForCachedReads, getValidItemDescriptor, getVersionRepositoryWrapper, getWildcardEscapeCharacter, getXMLToDOMParser, getXMLToolsFactory, initialize, initializeTransactionally, initSubscribers, invalidateCaches, invalidateCaches, isAutoCommitInitialization, isAutoRemoveUnderscoreSuffixForInvalidationAbsoluteName, isAutoUpdateSubscribers, isCacheSwitchHot, isCheckItemAmbiguousExistence, isCheckTables, isEnforceRequiredProperties, isEscapeWildcards, isHandleRangesInMemory, isLoadColumnInfosAtStartup, isLoadColumnInfosInSeparateThread, isLocaleSensitiveSorting, isLocalTransactionModeInitialization, isLoggingDebug, isLogNullableTimestampWarning, isSetAutoCommit, isShuttingDown, isSimulateTextSearchQueries, isSkipNullProperties, isStartBeforeSwitchingDataSource, isSynchronousInvalidationEvents, isUseCacheForDelete, isUseSetAsciiStream, isUseSetBinaryStream, isUseSetCharacterStream, isUseSetObject, isUseSetUnicodeStream, outputSQL, readOwnershipReleased, readXMLFiles, receiveEvent, registerBatchSelectorForExpirationChecks, registerBatchSelectorWithTransaction, removeItem, removeItem, resolveName, restoreCache, sendEvent, setAutoRemoveUnderscoreSuffixForInvalidationAbsoluteName, setCacheRestoreFile, setCacheSwitchHot, setCheckItemAmbiguousExistence, setComputeChecksumAndLength, setContentItemDescriptors, setContentRootPathProvider, setDatabaseName, setDatabaseTableInfos, setDefaultItemDescriptor, setDefinitionFiles, setFolderItemDescriptor, setForeignRepositoryMapper, setForeignRepositorySuffix, setGroupContainerPath, setGSACacheClientManager, setIdGenerator, setInvalidationAbsoluteName, setInvalidatorService, setItemDescriptorAliases, setKeepWeakItemReferencesOnItemCacheInvalidation, setLoadColumnInfosAtStartup, setLoadColumnInfosInSeparateThread, setLockManager, setLogNullableTimestampWarning, setParsedFirstPass, setPreparedStatementPutter, setPrintNull, setQueryTransactionCacheCutoffSize, setRestoreCacheOnRestart, setSQLMaxFunction, setSQLMinFunction, setSubscriberRepository, setSynchronousInvalidationEvents, setTablePrefix, setTruncateRepositorySQLFile, setTruncateTableSQL, setUpdateSchemaInfoCache, setUseCachedCountQueries, setUseDistinctForIncludesAnyQueries, setUseDistinctForIncludesItemQueries, setUseDistinctForIncludesQueries, setUserPropertyDescriptors, setUseSetCharacterStream, setVersionRepositoryWrapper, setXMLToolsFactory, sortItemDescriptorsForOutput, toString, updateInvalidationAbsoluteName, writeCacheForRestore, writeOwnershipReleased
 
Methods inherited from class atg.repository.RepositoryImpl
addView, debug, getComponentResourceBundleName, getDebugLevel, getExposedRepository, getGroupProperties, getRepositoryDisplayName, getRepositoryDisplayNameResource, getRepositoryName, getTransactionManager, getView, isDisableRepositoryGroupsCache, setComponentResourceBundleName, setDefaultViewName, setDisableRepositoryGroupsCache, setExposedRepository, setGroupContainer, setGroupProperties, setRepositoryDisplayNameResource, setRepositoryName, setTransactionManager
 
Methods inherited from class atg.nucleus.GenericService
addLogListener, getAbsoluteName, getAdminServlet, getLoggingForVlogging, getLogListenerCount, getLogListeners, getName, getNameContext, getNucleus, getRoot, getServiceConfiguration, getServiceInfo, isLoggingError, isLoggingInfo, isLoggingTrace, isLoggingWarning, isRunning, logDebug, logDebug, logDebug, logError, logError, logError, logInfo, logInfo, logInfo, logTrace, logTrace, logTrace, logWarning, logWarning, logWarning, nameContextElementBound, nameContextElementUnbound, removeLogListener, resolveName, resolveName, resolveName, sendLogEvent, setLoggingTrace, setNucleus, setServiceInfo, startService, stopService
 
Methods inherited from class atg.nucleus.logging.VariableArgumentApplicationLoggingImpl
vlogDebug, vlogDebug, vlogDebug, vlogDebug, vlogError, vlogError, vlogError, vlogError, vlogInfo, vlogInfo, vlogInfo, vlogInfo, vlogTrace, vlogTrace, vlogTrace, vlogTrace, vlogWarning, vlogWarning, vlogWarning, vlogWarning
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface atg.repository.Repository
getItemDescriptor, getRepositoryName, getView
 
Methods inherited from interface atg.nucleus.logging.ApplicationLogging
isLoggingError, isLoggingInfo, isLoggingWarning, logDebug, logDebug, logDebug, logError, logError, logError, logInfo, logInfo, logInfo, logWarning, logWarning, logWarning
 

Field Detail

mRestartAfterTableCreation

public boolean mRestartAfterTableCreation

SOLID

public java.lang.String SOLID

ORACLE

public java.lang.String ORACLE

MICROSOFT

public java.lang.String MICROSOFT

INFORMIX

public java.lang.String INFORMIX

DB2

public java.lang.String DB2

SYBASE

public java.lang.String SYBASE

SYBASE2

public java.lang.String SYBASE2

DEFAULT

public java.lang.String DEFAULT
Constructor Detail

InitializingVersionRepository

public InitializingVersionRepository()
Method Detail

setCreateTables

public void setCreateTables(boolean pCreate)

isCreateTables

public boolean isCreateTables()

setDropTablesIfExist

public void setDropTablesIfExist(boolean pDrop)

isDropTablesIfExist

public boolean isDropTablesIfExist()

setImportFiles

public void setImportFiles(java.io.File[] pFiles)

getImportFiles

public java.io.File[] getImportFiles()

getImportFilesAsStrings

public java.lang.String[] getImportFilesAsStrings()

setStripReferences

public void setStripReferences(boolean pStrip)

isStripReferences

public boolean isStripReferences()

setloggingCreateTables

public void setloggingCreateTables(boolean pLog)

isLoggingCreateTables

public boolean isLoggingCreateTables()

setSQLProcessor

public void setSQLProcessor(SQLProcessorEngine pEngine)

getSQLProcessor

public SQLProcessorEngine getSQLProcessor()

setImportEveryStartup

public void setImportEveryStartup(boolean pImport)

isImportEveryStartup

public boolean isImportEveryStartup()

setDropTablesAtShutdown

public void setDropTablesAtShutdown(boolean pDrop)

isDropTablesAtShutdown

public boolean isDropTablesAtShutdown()

setImportWithTransaction

public void setImportWithTransaction(boolean pTran)

isImportWithTransaction

public boolean isImportWithTransaction()

setSqlCreateFiles

public void setSqlCreateFiles(java.util.Properties pFiles)
Optional mapping of user-specified sql files that should be executed instead of the SQL generated by startSQLRepository. Key values must be one of (case sensitive): default, oracle, solid, informix, microsoft, sybase, or db2. Mapped values should be a colon (:) separated ordered list of files to execute for that database type.
Specified files may use
{....}
notation to indicate a System variable that should be substituted at runtime, such as
{atg.dynamo.root}
.

The following behavior is observed:

          a) database meta data is used to determine specific database type
          b) when default not specified
            - if mapping exists for specific db type, those files are executed
            - otherwise, output from startSQLRepository is executed
          c) when default is specified
            - if mapping exists for specific db type, those files are executed
            - otherwise, files mapped under default are executed
          d) if a mapping exists for a db type in 'sqlCreateFiles' then a corresponding
             entry (to the specific db type, or to default) must exist.  Otherwise an exception
             is thrown at starup.
  

Also, when a file specified in the property 'sqlCreateFiles' is used (i.e. output from startSQLRepository is not being used) then the initializingGSA will always do the following at startup, unless property 'executeCreateAndDropScripts' is set to false:

          a) execute the appropriate dropSqlFile(s)
          b) execute the appropriate createSqlFile(s)
  
If 'executeCreateAndDropScripts' is false then in the case where scripts normally would be run they will instead be skipped and no SQL (from scripts or startSQLRepository) will be executed. The reason for this restriction is that it's too difficult to know whether a database has been properly reset for the 'createSqlFile(s)' to run properly, so we err on the conservative side and always reset it.


getSqlCreateFiles

public java.util.Properties getSqlCreateFiles()
returns optional mapping of user-specified sql files that should be executed instead of the SQL generated by startSQLRepository. see 'setSqlCreateFiles' for detailed explanation of this property.


setSqlDropFiles

public void setSqlDropFiles(java.util.Properties pFiles)
returns optional mapping of user-specified sql files that should be executed during 'tear-down' instead of basing it on the SQL generated by startSQLRepository. see 'setSqlCreateFiles' for detailed explanation of this property.


getSqlDropFiles

public java.util.Properties getSqlDropFiles()
returns optional mapping of user-specified sql files that should be executed during 'tear-down' instead of basing it on the SQL generated by startSQLRepository. see 'setSqlCreateFiles' for detailed explanation of this property.


setExecuteCreateAndDropScripts

public void setExecuteCreateAndDropScripts(boolean pExec)
if set to true then create and drop scripts mapped through properties 'setSqlCreateFiles' and 'getSqlCreateFiles' will be executed. otherwise the scripts will not be executed at startup.


isExecuteCreateAndDropScripts

public boolean isExecuteCreateAndDropScripts()
returns true if create and drop scripts mapped through properties 'setSqlCreateFiles' and 'getSqlCreateFiles' should be executed at startup.


isLoadColumnInfosAtInitialStartup

public boolean isLoadColumnInfosAtInitialStartup()
returns true if the GSA should load JDBC metadata when starting the initial instantiation of the component. default: false


setLoadColumnInfosAtInitialStartup

public void setLoadColumnInfosAtInitialStartup(boolean pLoad)
set to true if the GSA should load JDBC metadata when starting the initial instantiation of the component. the default is false b/c the initial instantiation is only used to create tables and loading the metadata before the tables are created is unnecessary overhead which slows the startup process. When the component is restarted after the tables are created it uses the value of 'loadColumnInfosAtStartup' to determine whether to load the metadata on the restart.


setProjectName

public void setProjectName(java.lang.String pProjectName)

getProjectName

public java.lang.String getProjectName()

setProjectType

public void setProjectType(java.lang.String pProjectType)

getProjectType

public java.lang.String getProjectType()

setUser

public void setUser(java.lang.String pUser)

getUser

public java.lang.String getUser()

setWorkspaceIdPrefix

public void setWorkspaceIdPrefix(java.lang.String pWorkspaceIdPrefix)

getWorkspaceIdPrefix

public java.lang.String getWorkspaceIdPrefix()

setBranchId

public void setBranchId(java.lang.String pBranchId)

getBranchId

public java.lang.String getBranchId()

setComment

public void setComment(java.lang.String pComment)

getComment

public java.lang.String getComment()

setDoCheckin

public void setDoCheckin(boolean pDoCheckin)

getDoCheckin

public boolean getDoCheckin()

isDoCheckin

public boolean isDoCheckin()

isRestartingAfterTableCreation

public boolean isRestartingAfterTableCreation()
Returns true if this repository will attempt to "restart" after creating tables.

Returns:

setRestartingAfterTableCreation

public void setRestartingAfterTableCreation(boolean pRestart)
Sets if this repository will attempt to "restart" after creating tables. A value of true means that it should restart.


setIsTemporaryInstantiation

public void setIsTemporaryInstantiation(boolean pTemp)

doStartService

public void doStartService()
Overrides doStartService from VersionRepository to make the repository optionally create required tables by specified sql scripts and load data using the TemplateParser -import flag.

Overrides:
doStartService in class atg.adapter.version.VersionRepository
Throws:
atg.repository.RepositoryException - (?)

restart

public boolean restart()
                throws atg.nucleus.ServiceException
Restarts the repository. This involves re-reading nucleus properties, reloading definition files, and invalidating all cache entries. This method is a convenience for development purposes (to avoid restarting dynamo when a template has changed), and should not be used on a live site. This method is modified slightly from the restart method of GSARepository because it sets mTemporaryInstantiation to true so that the doStartService method of the new instance does not reload import files or try to recreate tables

Overrides:
restart in class atg.adapter.gsa.GSARepository
Throws:
atg.nucleus.ServiceException

doStopService

public void doStopService()
This method is called when the repository is shutdown. If dropTablesAtShutdown is true, it will attempt to drop all the tables. IMPORTANT: There is an optional property that can be set to indicate that all tables should be dropped at shutdown (dropTablesAtShutdown). Because of the order in which Nucleus shuts down the components, this may or may not work. It just depends on whether the datasource is shutdown before the repository. If you want to guarantee that your tables are dropped, manually invoke the doStopService method from the HTML admin pages.

Overrides:
doStopService in class atg.adapter.version.VersionRepository

dropTables

public void dropTables()
                throws atg.repository.RepositoryException,
                       SQLProcessorException
This method drops all tables required by the GSARepository.

Throws:
atg.repository.RepositoryException - if an error occurs while retrieving a list of the tables associated with the repository
SQLProcessorException - if an error occured trying to drop the tables


Copyright © 2009. All Rights Reserved.