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

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

public class MoveWCMToGroupBasedPermissionsPatch
extends AbstractPatch

Remove ACLs on all but staging area stores On staging area stores, set ACls according to the users and roles as set on the web site Note: runs as the system user


Field Summary
static java.lang.String[] PERMISSIONS
           
protected static java.lang.String WCM_STORE_SEPARATOR
           
 
Fields inherited from class org.alfresco.repo.admin.patch.AbstractPatch
applicationEventPublisher, authenticationContext, ERR_PROPERTY_NOT_SET, namespaceService, nodeService, searchService, tenantAdminService, transactionHelper, transactionService
 
Constructor Summary
MoveWCMToGroupBasedPermissionsPatch()
           
 
Method Summary
protected  void addToGroupIfRequired(java.lang.String stagingStoreName, java.lang.String user, java.lang.String permission)
           
protected  java.lang.String applyInternal()
          This method does the work.
protected  java.lang.String extractStagingAreaName(java.lang.String name)
           
 void setAuthorityService(AuthorityService authorityService)
           
 void setAvmService(AVMService avmService)
           
 void setAvmSnapShotTriggeredIndexingMethodInterceptor(AVMSnapShotTriggeredIndexingMethodInterceptor avmSnapShotTriggeredIndexingMethodInterceptor)
           
 void setPermissionService(org.alfresco.service.cmr.security.PermissionService permissionService)
           
 void setReplaceAllWith(java.lang.String replaceAllWith)
           
protected  void setSandBoxMasks(AVMStoreDescriptor sandBoxStore)
           
protected  void setStagingAreaMasks(AVMStoreDescriptor store)
           
protected  void setStagingAreaPermissions(AVMStoreDescriptor store)
           
 
Methods inherited from class org.alfresco.repo.admin.patch.AbstractPatch
applies, apply, 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
 

Field Detail

PERMISSIONS

public static final java.lang.String[] PERMISSIONS

WCM_STORE_SEPARATOR

protected static final java.lang.String WCM_STORE_SEPARATOR
See Also:
Constant Field Values
Constructor Detail

MoveWCMToGroupBasedPermissionsPatch

public MoveWCMToGroupBasedPermissionsPatch()
Method Detail

setAvmService

public void setAvmService(AVMService avmService)

setAvmSnapShotTriggeredIndexingMethodInterceptor

public void setAvmSnapShotTriggeredIndexingMethodInterceptor(AVMSnapShotTriggeredIndexingMethodInterceptor avmSnapShotTriggeredIndexingMethodInterceptor)

setPermissionService

public void setPermissionService(org.alfresco.service.cmr.security.PermissionService permissionService)

setAuthorityService

public void setAuthorityService(AuthorityService authorityService)

setReplaceAllWith

public void setReplaceAllWith(java.lang.String replaceAllWith)

applyInternal

protected java.lang.String applyInternal()
                                  throws java.lang.Exception
Description copied from class: AbstractPatch
This 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:
applyInternal in class AbstractPatch
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()

addToGroupIfRequired

protected void addToGroupIfRequired(java.lang.String stagingStoreName,
                                    java.lang.String user,
                                    java.lang.String permission)

setStagingAreaPermissions

protected void setStagingAreaPermissions(AVMStoreDescriptor store)
                                  throws java.lang.Exception
Throws:
java.lang.Exception

setStagingAreaMasks

protected void setStagingAreaMasks(AVMStoreDescriptor store)

setSandBoxMasks

protected void setSandBoxMasks(AVMStoreDescriptor sandBoxStore)

extractStagingAreaName

protected java.lang.String extractStagingAreaName(java.lang.String name)


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