Class AbstractPermissionChangePatch
java.lang.Object
org.alfresco.repo.admin.patch.AbstractPatch
org.alfresco.repo.admin.patch.impl.AbstractPermissionChangePatch
- All Implemented Interfaces:
Patch,org.springframework.beans.factory.Aware,org.springframework.context.ApplicationEventPublisherAware
Provides common functionality to change a permission type and/or name.
- Author:
- Derek Hulley
-
Field Summary
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 -
Method Summary
Modifier and TypeMethodDescriptionprotected intrenamePermission(QName oldTypeQName, String oldName, QName newTypeQName, String newName) Helper method to rename (move) a permission.voidsetAclCrudDAO(AclCrudDAO aclCrudDAO) Methods inherited from class org.alfresco.repo.admin.patch.AbstractPatch
applies, apply, applyAsync, applyInternal, 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
-
Constructor Details
-
AbstractPermissionChangePatch
public AbstractPermissionChangePatch()
-
-
Method Details
-
setAclCrudDAO
-
renamePermission
protected int renamePermission(QName oldTypeQName, String oldName, QName newTypeQName, String newName) Helper method to rename (move) a permission. This involves checking for the existence of the new permission and then moving all the entries to point to the new permission.- Parameters:
oldTypeQName- the old permission typeoldName- the old permission namenewTypeQName- the new permission typenewName- the new permission name- Returns:
- Returns the number of permission entries modified
-