atg.adapter.gsa
Class InitializingGSA

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.gsa.InitializingGSA
All Implemented Interfaces:
atg.adapter.gsa.Constants, atg.adapter.gsa.event.GSAEventListener, atg.adapter.gsa.LoadBatchRepository, 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 InitializingGSA
extends atg.adapter.gsa.GSARepository

This class is an extension of atg.adapter.gsa.GSARepository. It's purpose is to create tables and initial data required for starting a given repository.

Version:
1.0
Author:
mfrenzel

Field Summary
static java.lang.String CLASS_VERSION
          Class version string
 java.lang.String DB2
           
 java.lang.String DEFAULT
           
 java.lang.String INFORMIX
           
 boolean mAllowNoDrop
           
 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.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.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
InitializingGSA()
           
 
Method Summary
 void doStartService()
          Overrides doStartService from GSARepository to make the repository optionally create required tables 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.io.File[] getImportFiles()
           
 java.lang.String[] getImportFilesAsStrings()
           
 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()
           
 boolean isAllowNoDrop()
          If true, one may specify create scripts, but no drop scripts.
 boolean isCreateTables()
           
 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 isUseDDLUtils()
          If true then Apache DDLUtils will be used to generate the schema.
 boolean restart()
          Restarts the repository.
 void setAllowNotDrop(boolean pDrop)
           
 void setCreateTables(boolean pCreate)
           
 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 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 setUseDDLUtils(boolean pUseDDLUtils)
          If true then Apache DDLUtils will be used to generate the schema.
 
Methods inherited from class atg.adapter.gsa.GSARepository
addContentItemDescriptor, addItem, addItem, addItemDescriptor, addItemOnCommit, addItemToCache, addTableInvalidationListeners, checkInvalidationService, checkSubscriptions, clearWeakTables, copyFromOtherRepository, createAdminServlet, createItem, createItem, createItem, currentTransaction, dataSourceShutdown, dumpCaches, dumpCachesForReload, findItemToUndelete, format, format, format, format, generateItemDescriptorId, generatePropertyDescriptorId, generateSQL, 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, getFolder, getFolderByPath, getFolderItemDescriptor, getFolders, getFoldersByPath, getForeignRepositoryMapper, getForeignRepositorySuffix, getGroupContainer, getGroupContainerPath, getGSACacheClientManager, getHandleRangesInMemory, getIdGenerator, getInvalidationAbsoluteName, getInvalidatorService, getItem, getItem, getItem, getItemByPath, getItemDescriptor, getItemDescriptor, getItemDescriptorAliases, getItemForUpdate, getItemForUpdate, getItemForUpdate, getItems, getItems, getItems, getItems, getItems, getItemsByPath, getItemsForUpdate, getItemsForUpdate, getItemsForUpdate, getKeepWeakItemReferencesOnItemCacheInvalidation, getLazyBatchLoadTimeout, getLazyLoadItems, getLoadItemBatchSize, getLocaleSensitiveSorting, getLocalTransactionModeInitialization, getLockManager, getLockTimeout, getLoggingContext, getMaxTableNameLength, getMetaDataCatalogName, getMetaDataSchemaPattern, getOuterJoinSupport, getParsedFirstPass, getPathSeparator, getPreparedStatementPutter, getPrintNull, getQueryTransactionCacheCutoffSize, getResourceBundleName, getRestoreCacheOnRestart, getRootFolder, 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, getView, 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, loadBatch, outputSQL, readOwnershipReleased, readXMLFiles, receiveEvent, registerBatchSelectorForExpirationChecks, registerBatchSelectorWithTransaction, removeItem, removeItem, removeItem, removeItem, removeItem, removeTableInvalidationListeners, resolveName, restoreCache, sendEvent, setAutoCommitInitialization, setAutoRemoveUnderscoreSuffixForInvalidationAbsoluteName, setAutoUpdateSubscribers, setCacheRestoreFile, setCacheSwitchHot, setCheckItemAmbiguousExistence, setCheckTables, setComputeChecksumAndLength, setContentItemDescriptors, setContentRootPathProvider, setDatabaseName, setDatabaseTableInfos, setDataSource, setDebugLevel, setDefaultItemDescriptor, setDefaultTextSearchStringFormat, setDefinitionFiles, setDisableItemCachesAtStartup, setDisableQueryCachesAtStartup, setEnforceRequiredProperties, setEscapeWildcards, setEventServer, setFolderItemDescriptor, setForeignRepositoryMapper, setForeignRepositorySuffix, setGroupContainerPath, setGSACacheClientManager, setHandleRangesInMemory, setIdGenerator, setInvalidationAbsoluteName, setInvalidatorService, setItemDescriptorAliases, setKeepWeakItemReferencesOnItemCacheInvalidation, setLazyBatchLoadTimeout, setLazyLoadItems, setLoadColumnInfosAtStartup, setLoadColumnInfosInSeparateThread, setLoadItemBatchSize, setLocaleSensitiveSorting, setLocalTransactionModeInitialization, setLockManager, setLockTimeout, setLoggingDebug, setLogNullableTimestampWarning, setMaxTableNameLength, setMetaDataCatalogName, setMetaDataSchemaPattern, setOuterJoinSupport, setParsedFirstPass, setPathSeparator, setPreparedStatementPutter, setPrintNull, setQueryTransactionCacheCutoffSize, setRestoreCacheOnRestart, setSafeSQLTypes, setSetAutoCommit, setSimulateTextSearchQueries, setSimulateTextSearchQueriesMatchingOperation, setSkipNullProperties, setSQLLowerFunction, setSQLMaxFunction, setSQLMinFunction, setStoreTransientItems, setSubscriberRepository, setSynchronousInvalidationEvents, setTablePrefix, setTruncateRepositorySQLFile, setTruncateTableSQL, setUpdateSchemaInfoCache, setUseCachedCountQueries, setUseCacheForDelete, setUseDatabaseQueries, setUseDistinctForIncludesAnyQueries, setUseDistinctForIncludesItemQueries, setUseDistinctForIncludesQueries, setUserPropertyDescriptors, setUseSetAsciiStream, setUseSetBinaryStream, setUseSetCharacterStream, setUseSetObject, setUseSetUnicodeStream, setUseTransactionsForCachedReads, setVersionRepositoryWrapper, setWildcardEscapeCharacter, setXMLToolsFactory, sortItemDescriptorsForOutput, toString, updateInvalidationAbsoluteName, updateItem, writeCacheForRestore, writeOwnershipReleased
 
Methods inherited from class atg.repository.RepositoryImpl
addView, debug, getComponentResourceBundleName, getDebugLevel, getDefaultViewName, getExposedRepository, getGroupProperties, getItemDescriptorNames, getRepositoryDisplayName, getRepositoryDisplayNameResource, getRepositoryName, getTransactionManager, getView, getViewNames, 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, setLoggingError, setLoggingInfo, setLoggingTrace, setLoggingWarning, 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
getDefaultViewName, getItemDescriptorNames, getRepositoryName, getView, getViewNames
 
Methods inherited from interface atg.nucleus.logging.ApplicationLogging
isLoggingError, isLoggingInfo, isLoggingWarning, logDebug, logDebug, logDebug, logError, logError, logError, logInfo, logInfo, logInfo, logWarning, logWarning, logWarning, setLoggingError, setLoggingInfo, setLoggingWarning
 

Field Detail

CLASS_VERSION

public static java.lang.String CLASS_VERSION
Class version string


mAllowNoDrop

public boolean mAllowNoDrop

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

InitializingGSA

public InitializingGSA()
Method Detail

isUseDDLUtils

public boolean isUseDDLUtils()
If true then Apache DDLUtils will be used to generate the schema. Otherwise the GSA generated SQL will be used.

Returns:
the useDDLUtils

setUseDDLUtils

public void setUseDDLUtils(boolean pUseDDLUtils)
If true then Apache DDLUtils will be used to generate the schema. Otherwise the GSA generated SQL will be used.

Parameters:
pUseDDLUtils - the useDDLUtils to set

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 <b>default</b> not specified
             - if mapping exists for specific db type, those files are executed
             - otherwise, output from startSQLRepository is executed
           c) when <b>default</b> 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.


isAllowNoDrop

public boolean isAllowNoDrop()
If true, one may specify create scripts, but no drop scripts. Otherwise it is an error to specify a create script but no drop script

Returns:

setAllowNotDrop

public void setAllowNotDrop(boolean pDrop)

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.


setIsTemporaryInstantiation

public void setIsTemporaryInstantiation(boolean pTemp)

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.


doStartService

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

Overrides:
doStartService in class atg.adapter.gsa.GSARepository
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.gsa.GSARepository

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.