org.alfresco.cmis.acl
Class CMISAccessControlServiceImpl

java.lang.Object
  extended by org.alfresco.cmis.acl.CMISAccessControlServiceImpl
All Implemented Interfaces:
CMISAccessControlService

public class CMISAccessControlServiceImpl
extends java.lang.Object
implements CMISAccessControlService


Nested Class Summary
static class CMISAccessControlServiceImpl.AccessPermissionComparator
           
 
Field Summary
 
Fields inherited from interface org.alfresco.cmis.CMISAccessControlService
CMIS_ALL_PERMISSION, CMIS_READ_PERMISSION, CMIS_WRITE_PERMISSION
 
Constructor Summary
CMISAccessControlServiceImpl()
           
 
Method Summary
 CMISAccessControlReport applyAcl(org.alfresco.service.cmr.repository.NodeRef nodeRef, java.util.List acesToApply)
          Update the ACEs on a node.
 CMISAccessControlReport applyAcl(org.alfresco.service.cmr.repository.NodeRef nodeRef, java.util.List acesToRemove, java.util.List acesToAdd, CMISAclPropagationEnum propagation, org.alfresco.opencmis.CMISAccessControlFormatEnum format)
          Update the ACEs on a node.
 CMISAccessControlReport getAcl(org.alfresco.service.cmr.repository.NodeRef nodeRef, org.alfresco.opencmis.CMISAccessControlFormatEnum format)
          Get the ACLs set on a node.
 CMISAclCapabilityEnum getAclCapability()
          Get the ACL capability enum.
 CMISAclPropagationEnum getAclPropagation()
          Get the ACL propagation enum.
 java.util.List getPermissionMappings()
          Get the list of permission mappings.
 java.lang.String getPrincipalAnonymous()
          Gets the name of the principal who is used for anonymous access.
 java.lang.String getPrincipalAnyone()
          Gets the name of the principal who is used to indicate any authenticated user.
 java.util.List getRepositoryPermissions()
          Get all the permissions defined by the repository.
 CMISAclSupportedPermissionEnum getSupportedPermissions()
          Gets the supported permission types
 void setAclCapability(CMISAclCapabilityEnum aclCapabilityEnum)
          Set the acl capability enum.
 void setAclCapabilityEnum(CMISAclCapabilityEnum aclCapabilityEnum)
           
 void setAclPropagation(CMISAclPropagationEnum aclPropagationEnum)
          Set the acl propagation enum.
 void setAclPropagationEnum(CMISAclPropagationEnum aclPropagationEnum)
           
 void setAclSupportedPermissionEnum(CMISAclSupportedPermissionEnum aclSupportedPermissionEnum)
          Sets the acl supported permission enum.
 void setCMISDictionaryService(CMISDictionaryService cmisDictionaryService)
           
 void setCMISMapping(CMISMapping cmisMapping)
          Sets the cmis mapping.
 void setNodeService(org.alfresco.service.cmr.repository.NodeService nodeService)
           
 void setPermissionModelDao(ModelDAO permissionModelDao)
           
 void setPermissionService(org.alfresco.service.cmr.security.PermissionService permissionService)
           
 void setSupportedPermissions(CMISAclSupportedPermissionEnum aclSupportedPermissionEnum)
          Sets the supported permissions.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CMISAccessControlServiceImpl

public CMISAccessControlServiceImpl()
Method Detail

setAclCapabilityEnum

public void setAclCapabilityEnum(CMISAclCapabilityEnum aclCapabilityEnum)
Parameters:
aclCapabilityEnum - the aclCapabilityEnum to set

setAclSupportedPermissionEnum

public void setAclSupportedPermissionEnum(CMISAclSupportedPermissionEnum aclSupportedPermissionEnum)
Sets the acl supported permission enum.

Parameters:
aclSupportedPermissionEnum - the aclSupportedPermissionEnum to set

setAclPropagationEnum

public void setAclPropagationEnum(CMISAclPropagationEnum aclPropagationEnum)
Parameters:
aclPropagationEnum - the aclPropagationEnum to set

setPermissionModelDao

public void setPermissionModelDao(ModelDAO permissionModelDao)
Parameters:
permissionModelDao - the permissionModelDao to set

setPermissionService

public void setPermissionService(org.alfresco.service.cmr.security.PermissionService permissionService)
Parameters:
permissionService - the permissionService to set

setCMISMapping

public void setCMISMapping(CMISMapping cmisMapping)
Sets the cmis mapping.

Parameters:
cmisMapping - the cmis mapping

setNodeService

public void setNodeService(org.alfresco.service.cmr.repository.NodeService nodeService)
Parameters:
nodeService - the nodeService to set

setCMISDictionaryService

public void setCMISDictionaryService(CMISDictionaryService cmisDictionaryService)
Parameters:
cmisDictionaryService - the cmisDictionaryService to set

applyAcl

public CMISAccessControlReport applyAcl(org.alfresco.service.cmr.repository.NodeRef nodeRef,
                                        java.util.List acesToApply)
                                 throws CMISConstraintException
Description copied from interface: CMISAccessControlService
Update the ACEs on a node. Those already existing, are preserved, those new are added and those missing are removed.

Specified by:
applyAcl in interface CMISAccessControlService
Returns:
an access control report of the final state
Throws:
CMISConstraintException

applyAcl

public CMISAccessControlReport applyAcl(org.alfresco.service.cmr.repository.NodeRef nodeRef,
                                        java.util.List acesToRemove,
                                        java.util.List acesToAdd,
                                        CMISAclPropagationEnum propagation,
                                        org.alfresco.opencmis.CMISAccessControlFormatEnum format)
                                 throws CMISConstraintException
Description copied from interface: CMISAccessControlService
Update the ACEs on a node. The deletions are applied before the additions. Existing ACEs not deleted or added remain unchanged.

Specified by:
applyAcl in interface CMISAccessControlService
Returns:
an access control report of the final state
Throws:
CMISConstraintException

getAcl

public CMISAccessControlReport getAcl(org.alfresco.service.cmr.repository.NodeRef nodeRef,
                                      org.alfresco.opencmis.CMISAccessControlFormatEnum format)
Description copied from interface: CMISAccessControlService
Get the ACLs set on a node.

Specified by:
getAcl in interface CMISAccessControlService
Returns:
an access control report

getAclCapability

public CMISAclCapabilityEnum getAclCapability()
Description copied from interface: CMISAccessControlService
Get the ACL capability enum.

Specified by:
getAclCapability in interface CMISAccessControlService
Returns:
the ACL capability enum.

setAclCapability

public void setAclCapability(CMISAclCapabilityEnum aclCapabilityEnum)
Set the acl capability enum.

Parameters:
aclCapabilityEnum -

getSupportedPermissions

public CMISAclSupportedPermissionEnum getSupportedPermissions()
Description copied from interface: CMISAccessControlService
Gets the supported permission types

Specified by:
getSupportedPermissions in interface CMISAccessControlService
Returns:
the supported permission types

setSupportedPermissions

public void setSupportedPermissions(CMISAclSupportedPermissionEnum aclSupportedPermissionEnum)
Sets the supported permissions.

Parameters:
aclSupportedPermissionEnum - the supported permissions

getAclPropagation

public CMISAclPropagationEnum getAclPropagation()
Description copied from interface: CMISAccessControlService
Get the ACL propagation enum.

Specified by:
getAclPropagation in interface CMISAccessControlService
Returns:
the ACL propagation enum.

setAclPropagation

public void setAclPropagation(CMISAclPropagationEnum aclPropagationEnum)
Set the acl propagation enum.

Parameters:
aclPropagationEnum -

getPermissionMappings

public java.util.List getPermissionMappings()
Description copied from interface: CMISAccessControlService
Get the list of permission mappings.

Specified by:
getPermissionMappings in interface CMISAccessControlService
Returns:
get the permission mapping as defined by the CMIS specification.

getRepositoryPermissions

public java.util.List getRepositoryPermissions()
Description copied from interface: CMISAccessControlService
Get all the permissions defined by the repository.

Specified by:
getRepositoryPermissions in interface CMISAccessControlService
Returns:
a list of permissions

getPrincipalAnonymous

public java.lang.String getPrincipalAnonymous()
Description copied from interface: CMISAccessControlService
Gets the name of the principal who is used for anonymous access. This principal can then be passed to the ACL services to specify what permissions anonymous users should have.

Specified by:
getPrincipalAnonymous in interface CMISAccessControlService
Returns:
name of the principal who is used for anonymous access

getPrincipalAnyone

public java.lang.String getPrincipalAnyone()
Description copied from interface: CMISAccessControlService
Gets the name of the principal who is used to indicate any authenticated user. This principal can then be passed to the ACL services to specify what permissions any authenticated user should have.

Specified by:
getPrincipalAnyone in interface CMISAccessControlService
Returns:
name of the principal who is used to indicate any authenticated user


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