Package fr.becpg.repo.admin.patch
Class AddSitePermissionPatch
java.lang.Object
org.alfresco.repo.admin.patch.AbstractPatch
fr.becpg.repo.admin.patch.AbstractBeCPGPatch
fr.becpg.repo.admin.patch.AddSitePermissionPatch
- All Implemented Interfaces:
org.alfresco.repo.admin.patch.Patch,org.springframework.beans.factory.Aware,org.springframework.context.ApplicationEventPublisherAware
AddSitePermissionPatch class.
- Version:
- $Id: $Id
- Author:
- matthieu
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final Stringprivate org.alfresco.service.cmr.security.AuthorityServiceprivate static final org.apache.commons.logging.Logprivate static final Stringprivate org.alfresco.service.cmr.security.PermissionServiceprivate static final Stringprivate org.alfresco.service.cmr.site.SiteServiceFields inherited from class fr.becpg.repo.admin.patch.AbstractBeCPGPatch
BATCH_SIZE, BATCH_THREADS, contentHelper, entitySystemService, INC, nodeDAO, patchDAO, qnameDAO, repoService, repositoryFields 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 StringgetSiteGroup(String shortName, boolean withGroupPrefix) Helper method to get the name of the site groupgetSiteRoleGroup(String shortName, String permission, boolean withGroupPrefix) Helper method to get the name of the site permission groupvoidsetAuthorityService(org.alfresco.service.cmr.security.AuthorityService authorityService) Setter for the fieldauthorityService.voidsetPermissionService(org.alfresco.service.cmr.security.PermissionService permissionService) Setter for the fieldpermissionService.voidsetSiteService(org.alfresco.service.cmr.site.SiteService siteService) Setter for the fieldsiteService.Methods inherited from class fr.becpg.repo.admin.patch.AbstractBeCPGPatch
createBatchAspectProcessor, createBatchTypeProcessor, createBatchTypeProcessor, formatTenantNodeRef, getBaseName, getCharactDataList, getFolder, getNodeDAO, getPatchDAO, getQnameDAO, getSystemCharactsEntity, getSystemHierachiesEntity, getSystemListValuesEntity, searchFolder, setContentHelper, setEntitySystemService, setNodeDAO, setPatchDAO, setQnameDAO, setRepoService, setRepository, updateResourceMethods inherited from class org.alfresco.repo.admin.patch.AbstractPatch
applies, apply, applyAsync, checkProperties, 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
-
logger
private static final org.apache.commons.logging.Log logger -
MSG_SUCCESS
- See Also:
-
ARCHIVED_SITE_ID
- See Also:
-
siteService
private org.alfresco.service.cmr.site.SiteService siteService -
permissionService
private org.alfresco.service.cmr.security.PermissionService permissionService -
authorityService
private org.alfresco.service.cmr.security.AuthorityService authorityService -
SITE_PREFIX
- See Also:
-
-
Constructor Details
-
AddSitePermissionPatch
public AddSitePermissionPatch()
-
-
Method Details
-
setSiteService
public void setSiteService(org.alfresco.service.cmr.site.SiteService siteService) Setter for the field
siteService.- Parameters:
siteService- aSiteServiceobject.
-
setAuthorityService
public void setAuthorityService(org.alfresco.service.cmr.security.AuthorityService authorityService) Setter for the field
authorityService.- Parameters:
authorityService- aAuthorityServiceobject.
-
setPermissionService
public void setPermissionService(org.alfresco.service.cmr.security.PermissionService permissionService) Setter for the field
permissionService.- Parameters:
permissionService- aPermissionServiceobject.
-
applyInternal
- Specified by:
applyInternalin classorg.alfresco.repo.admin.patch.AbstractPatch- Throws:
Exception
-
getSiteGroup
Helper method to get the name of the site group- Parameters:
shortName- site short namewithGroupPrefix- a boolean.- Returns:
- String site group name
-
getSiteRoleGroup
Helper method to get the name of the site permission group- Parameters:
shortName- site short namepermission- permission namewithGroupPrefix- - should the name have the GROUP_ prefix?- Returns:
- String site permission group name
-