org.alfresco.repo.admin.patch.impl
Class AbstractPermissionChangePatch
java.lang.Object
org.alfresco.repo.admin.patch.AbstractPatch
org.alfresco.repo.admin.patch.impl.AbstractPermissionChangePatch
- All Implemented Interfaces:
- Patch, org.springframework.context.ApplicationEventPublisherAware
- Direct Known Subclasses:
- AVMPermissionDataPatch, ContentPermissionPatch, PermissionDataPatch, UpdateGuestPermissionPatch
public abstract class AbstractPermissionChangePatch
- extends AbstractPatch
Provides common functionality to change a permission type and/or name.
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, setAlternatives, setApplicationEventPublisher, setApplyToTenants, setAuthenticationContext, setDependsOn, setDescription, setFixesFromSchema, setFixesToSchema, setForce, setId, setNamespaceService, setNodeService, setPatchService, setSearchService, setTargetSchema, setTenantAdminService, setTransactionService, toString |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
AbstractPermissionChangePatch
public AbstractPermissionChangePatch()
setSessionFactory
public void setSessionFactory(org.hibernate.SessionFactory sessionFactory)
setQnameDAO
public void setQnameDAO(QNameDAO qnameDAO)
renamePermission
protected int renamePermission(QName oldTypeQName,
java.lang.String oldName,
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 typeoldName
- the old permission namenewTypeQName
- the new permission typenewName
- the new permission name
- Returns:
- Returns the number of permission entries modified
Copyright © 2005 - 2010 Alfresco Software, Inc. All Rights Reserved.