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
public class SiteLoadPatch extends AbstractPatch
A Patch based importer which creates and populates a site based on the supplied data- Author:
- Nick Burch
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringPROPERTIES_CONTENTSstatic java.lang.StringPROPERTIES_GROUPSstatic java.lang.StringPROPERTIES_PEOPLEstatic java.lang.StringPROPERTIES_USERS-
Fields 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 Constructor Description SiteLoadPatch()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected java.lang.StringapplyInternal()This method does the work.protected voidcheckProperties()Check that the schema version properties have been set appropriately.booleanisDisabled()voidsetAuthorityService(AuthorityService authorityService)Sets the Authority Service to be used for groups and peoplevoidsetBehaviourFilter(BehaviourFilter behaviourFilter)voidsetBootstrapViews(java.util.Map<java.lang.String,java.util.Properties> bootstrapViews)Sets the details of the bootstraps to performvoidsetDescriptorService(DescriptorService descriptorService)voidsetDisabled(boolean disabled)voidsetSiteName(java.lang.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 Detail
-
PROPERTIES_USERS
public static final java.lang.String PROPERTIES_USERS
- See Also:
- Constant Field Values
-
PROPERTIES_PEOPLE
public static final java.lang.String PROPERTIES_PEOPLE
- See Also:
- Constant Field Values
-
PROPERTIES_GROUPS
public static final java.lang.String PROPERTIES_GROUPS
- See Also:
- Constant Field Values
-
PROPERTIES_CONTENTS
public static final java.lang.String PROPERTIES_CONTENTS
- See Also:
- Constant Field Values
-
-
Method Detail
-
setSiteName
public void setSiteName(java.lang.String siteName)
Sets the name of the site to be bootstrapped.- Parameters:
siteName- The short name of the site
-
setSpacesBootstrap
public void setSpacesBootstrap(ImporterBootstrap spacesBootstrap)
-
setUsersBootstrap
public void setUsersBootstrap(ImporterBootstrap usersBootstrap)
-
setBootstrapViews
public void setBootstrapViews(java.util.Map<java.lang.String,java.util.Properties> bootstrapViews)
Sets the details of the bootstraps to perform
-
setSiteService
public void setSiteService(SiteService siteService)
Sets the Site Service to be used for importing into- Parameters:
siteService- The Site Service
-
setAuthorityService
public void setAuthorityService(AuthorityService authorityService)
Sets the Authority Service to be used for groups and people- Parameters:
authorityService- The Authority Service
-
setDescriptorService
public void setDescriptorService(DescriptorService descriptorService)
- Parameters:
descriptorService- the descriptorService to set
-
setBehaviourFilter
public void setBehaviourFilter(BehaviourFilter behaviourFilter)
-
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
protected java.lang.String applyInternal() throws java.lang.ExceptionDescription 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:
java.lang.Exception- anything can be thrown. This must be used for all failures.- See Also:
AbstractPatch.apply()
-
-