Class SiteLoadPatch
java.lang.Object
org.alfresco.repo.admin.patch.AbstractPatch
org.alfresco.repo.admin.patch.impl.SiteLoadPatch
- All Implemented Interfaces:
Patch,org.springframework.beans.factory.Aware,org.springframework.context.ApplicationEventPublisherAware
A Patch based importer which creates and populates a site based on the supplied data
- Author:
- Nick Burch
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Stringstatic final Stringstatic final Stringstatic final StringFields inherited from class org.alfresco.repo.admin.patch.AbstractPatch
applicationEventPublisher, authenticationContext, ERR_PROPERTY_NOT_SET, namespaceService, nodeService, patchService, searchService, tenantAdminService, transactionHelper, transactionService -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected StringThis method does the work.protected voidCheck that the schema version properties have been set appropriately.booleanvoidsetAuthorityService(AuthorityService authorityService) Sets the Authority Service to be used for groups and peoplevoidsetBehaviourFilter(BehaviourFilter behaviourFilter) voidsetBootstrapViews(Map<String, Properties> bootstrapViews) Sets the details of the bootstraps to performvoidsetDescriptorService(DescriptorService descriptorService) voidsetDisabled(boolean disabled) voidsetSiteName(String siteName) Sets the name of the site to be bootstrapped.voidsetSiteService(SiteService siteService) Sets the Site Service to be used for importing intovoidsetSpacesBootstrap(ImporterBootstrap spacesBootstrap) voidsetUsersBootstrap(ImporterBootstrap usersBootstrap) Methods inherited from class org.alfresco.repo.admin.patch.AbstractPatch
applies, apply, applyAsync, checkPropertyNotNull, getAlternatives, getDependsOn, getDescription, getFixesFromSchema, getFixesToSchema, getId, getTargetSchema, init, isDeferred, isForce, isIgnored, reportProgress, requiresTransaction, setAlternatives, setApplicationEventPublisher, setApplyToTenants, setAuthenticationContext, setDeferred, setDependsOn, setDescription, setFixesFromSchema, setFixesToSchema, setForce, setId, setIgnored, setNamespaceService, setNodeService, setPatchService, setRequiresTransaction, setSearchService, setTargetSchema, setTenantAdminService, setTransactionService, toString
-
Field Details
-
PROPERTIES_USERS
- See Also:
-
PROPERTIES_PEOPLE
- See Also:
-
PROPERTIES_GROUPS
- See Also:
-
PROPERTIES_CONTENTS
- See Also:
-
-
Constructor Details
-
SiteLoadPatch
public SiteLoadPatch()
-
-
Method Details
-
setSiteName
Sets the name of the site to be bootstrapped.- Parameters:
siteName- The short name of the site
-
setSpacesBootstrap
-
setUsersBootstrap
-
setBootstrapViews
Sets the details of the bootstraps to perform -
setSiteService
Sets the Site Service to be used for importing into- Parameters:
siteService- The Site Service
-
setAuthorityService
Sets the Authority Service to be used for groups and people- Parameters:
authorityService- The Authority Service
-
setDescriptorService
- Parameters:
descriptorService- the descriptorService to set
-
setBehaviourFilter
-
setDisabled
public void setDisabled(boolean disabled) -
isDisabled
public boolean isDisabled() -
checkProperties
protected void checkProperties()Description copied from class:AbstractPatchCheck that the schema version properties have been set appropriately. Derived classes can override this method to perform their own validation provided that this method is called by the derived class.- Overrides:
checkPropertiesin classAbstractPatch
-
applyInternal
Description copied from class:AbstractPatchThis method does the work. All transactions and thread-safety will be taken care of by this class. Any exception will result in the transaction being rolled back. Integrity checks are downgraded for the duration of the transaction.- Specified by:
applyInternalin classAbstractPatch- Returns:
- Returns the report (only success messages).
- Throws:
Exception- anything can be thrown. This must be used for all failures.- See Also:
-