Package org.alfresco.repo.importer
Class ImporterBootstrap
java.lang.Object
org.springframework.extensions.surf.util.AbstractLifecycleBean
org.alfresco.repo.importer.ImporterBootstrap
- All Implemented Interfaces:
EventListener,org.springframework.beans.factory.Aware,org.springframework.context.ApplicationContextAware,org.springframework.context.ApplicationListener
public class ImporterBootstrap
extends org.springframework.extensions.surf.util.AbstractLifecycleBean
Bootstrap Repository store.
- Author:
- David Caruana
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final StringFields inherited from class org.springframework.extensions.surf.util.AbstractLifecycleBean
log -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddBootstrapViews(List<Properties> bootstrapViews) Sets the bootstrap viewsvoidBootstrap the RepositoryGets the Configuration values for binding place holdersstatic FileGet a File representation of an XML viewGet LocaleGets the Store ReferencebooleanDetermine if bootstrap was performed?protected voidonBootstrap(org.springframework.context.ApplicationEvent event) protected voidonShutdown(org.springframework.context.ApplicationEvent event) voidsetAllowWrite(boolean write) Set whether we write or notvoidsetAuthenticationContext(AuthenticationContext authenticationContext) Set the authentication componentvoidsetBootstrapViews(List<Properties> bootstrapViews) Sets the bootstrap viewsvoidsetConfiguration(Properties configuration) Sets the Configuration values for binding place holdersvoidsetImporterService(ImporterService importerService) Sets the importer servicevoidSets the LocalevoidsetLog(boolean logEnabled) Deprecated.Was never usedvoidsetMustNotExistStoreUrls(List<String> storeUrls) If any of the store urls exist, the bootstrap does not take placevoidsetNamespaceService(NamespaceService namespaceService) Sets the namespace servicevoidsetNodeService(NodeService nodeService) Sets the node servicevoidsetRetryingTransactionHelper(RetryingTransactionHelper retryingTransactionHelper) Sets the retrying transaction helper specific to the importer bootstrap.voidsetStoreUrl(String storeUrl) Sets the Store Ref to bootstrap intovoidsetTransactionService(TransactionService transactionService) Sets the Transaction ServicevoidsetUseExistingStore(boolean useExistingStore) Set whether the importer bootstrap should only perform an import if the store being referenced doesn't already exist.voidsetUuidBinding(ImporterBinding.UUID_BINDING uuidBinding) Set the behaviour for generating UUIDs in the import.Methods inherited from class org.springframework.extensions.surf.util.AbstractLifecycleBean
getApplicationContext, onApplicationEvent, setApplicationContextMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.springframework.context.ApplicationListener
supportsAsyncExecution
-
Field Details
-
VIEW_PATH_PROPERTY
- See Also:
-
VIEW_CHILDASSOCTYPE_PROPERTY
- See Also:
-
VIEW_MESSAGES_PROPERTY
- See Also:
-
VIEW_LOCATION_VIEW
- See Also:
-
VIEW_ENCODING
- See Also:
-
VIEW_UUID_BINDING
- See Also:
-
-
Constructor Details
-
ImporterBootstrap
public ImporterBootstrap()
-
-
Method Details
-
setAllowWrite
public void setAllowWrite(boolean write) Set whether we write or not- Parameters:
write- true (default) if the import must go ahead, otherwise no import will occur
-
setUseExistingStore
public void setUseExistingStore(boolean useExistingStore) Set whether the importer bootstrap should only perform an import if the store being referenced doesn't already exist.- Parameters:
useExistingStore- true to allow imports into an existing store, otherwise false (default) to only import if the store doesn't exist.
-
setUuidBinding
Set the behaviour for generating UUIDs in the import. Values are set by theImporterBinding.UUID_BINDINGenum and default toImporterBinding.UUID_BINDING.CREATE_NEW_WITH_UUID. This setting overrides the UUID binding behaviour specified in the view properties.- Parameters:
uuidBinding- the UUID generation behaviour
-
setTransactionService
Sets the Transaction Service- Parameters:
transactionService- the transaction service
-
setRetryingTransactionHelper
Sets the retrying transaction helper specific to the importer bootstrap. This transaction helper's parameters are tuned to the longer-running import transaction.- Parameters:
retryingTransactionHelper- the retrying transaction helper
-
setNamespaceService
Sets the namespace service- Parameters:
namespaceService- the namespace service
-
setNodeService
Sets the node service- Parameters:
nodeService- the node service
-
setImporterService
Sets the importer service- Parameters:
importerService- the importer service
-
setAuthenticationContext
Set the authentication component- Parameters:
authenticationContext- AuthenticationContext
-
setBootstrapViews
Sets the bootstrap views -
addBootstrapViews
Sets the bootstrap views -
setStoreUrl
Sets the Store Ref to bootstrap into- Parameters:
storeUrl- String
-
setMustNotExistStoreUrls
If any of the store urls exist, the bootstrap does not take place- Parameters:
storeUrls- the list of store urls to check
-
getStoreRef
Gets the Store Reference- Returns:
- store reference
-
setConfiguration
Sets the Configuration values for binding place holders- Parameters:
configuration- Properties
-
getConfiguration
Gets the Configuration values for binding place holders- Returns:
- configuration
-
setLocale
Sets the Locale- Parameters:
locale- (language_country_variant)
-
getLocale
Get Locale- Returns:
- locale
-
setLog
public void setLog(boolean logEnabled) Deprecated.Was never used -
hasPerformedBootstrap
public boolean hasPerformedBootstrap()Determine if bootstrap was performed?- Returns:
- true => bootstrap was performed
-
bootstrap
public void bootstrap()Bootstrap the Repository -
getFile
Get a File representation of an XML view- Parameters:
view- the view location- Returns:
- the file
-
onBootstrap
protected void onBootstrap(org.springframework.context.ApplicationEvent event) - Specified by:
onBootstrapin classorg.springframework.extensions.surf.util.AbstractLifecycleBean
-
onShutdown
protected void onShutdown(org.springframework.context.ApplicationEvent event) - Specified by:
onShutdownin classorg.springframework.extensions.surf.util.AbstractLifecycleBean
-