org.alfresco.repo.admin.patch.impl
Class AbstractPermissionChangePatch

java.lang.Object
  extended by org.alfresco.repo.admin.patch.AbstractPatch
      extended by org.alfresco.repo.admin.patch.impl.AbstractPermissionChangePatch
All Implemented Interfaces:
Patch, org.springframework.context.ApplicationEventPublisherAware
Direct Known Subclasses:
AVMPermissionDataPatch

public abstract class AbstractPermissionChangePatch
extends AbstractPatch

Provides common functionality to change a permission type and/or name.


Field Summary
 
Fields inherited from class org.alfresco.repo.admin.patch.AbstractPatch
applicationEventPublisher, authenticationContext, ERR_PROPERTY_NOT_SET, namespaceService, nodeService, searchService, tenantAdminService, transactionHelper, transactionService
 
Constructor Summary
AbstractPermissionChangePatch()
           
 
Method Summary
protected  int renamePermission(org.alfresco.service.namespace.QName oldTypeQName, java.lang.String oldName, org.alfresco.service.namespace.QName newTypeQName, java.lang.String newName)
          Helper method to rename (move) a permission.
 void setAclCrudDAO(AclCrudDAO aclCrudDAO)
           
 
Methods inherited from class org.alfresco.repo.admin.patch.AbstractPatch
applies, apply, applyInternal, checkProperties, checkPropertyNotNull, getAlternatives, getDependsOn, getDescription, getFixesFromSchema, getFixesToSchema, getId, getTargetSchema, init, isForce, reportProgress, requiresTransaction, setAlternatives, setApplicationEventPublisher, setApplyToTenants, setAuthenticationContext, setDependsOn, setDescription, setFixesFromSchema, setFixesToSchema, setForce, setId, setNamespaceService, setNodeService, setPatchService, setRequiresTransaction, setSearchService, setTargetSchema, setTenantAdminService, setTransactionService, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

AbstractPermissionChangePatch

public AbstractPermissionChangePatch()
Method Detail

setAclCrudDAO

public void setAclCrudDAO(AclCrudDAO aclCrudDAO)

renamePermission

protected int renamePermission(org.alfresco.service.namespace.QName oldTypeQName,
                               java.lang.String oldName,
                               org.alfresco.service.namespace.QName newTypeQName,
                               java.lang.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 type
oldName - the old permission name
newTypeQName - the new permission type
newName - the new permission name
Returns:
Returns the number of permission entries modified


Copyright © 2005 - 2010 Alfresco Software, Inc. All Rights Reserved.