org.alfresco.repo.security.permissions.impl.model
Class Permission

java.lang.Object
  extended by org.alfresco.repo.security.permissions.impl.AbstractPermissionReference
      extended by org.alfresco.repo.security.permissions.impl.model.AbstractPermission
          extended by org.alfresco.repo.security.permissions.impl.model.Permission
All Implemented Interfaces:
java.io.Serializable, XMLModelInitialisable, PermissionReference

public class Permission
extends AbstractPermission
implements XMLModelInitialisable

Support to read and store the definition of a permission.

See Also:
Serialized Form

Constructor Summary
Permission(org.alfresco.service.namespace.QName typeQName)
          A permission for the given type
 
Method Summary
 org.alfresco.service.cmr.security.AccessStatus getDefaultPermission()
          Default deny/allow for this permission
 java.util.Set getGrantedToGroups()
          Get the groups for which this permission is granted (by definition - filled in by the model API)
 void initialise(org.dom4j.Element element, org.alfresco.service.namespace.NamespacePrefixResolver nspr, PermissionModel permissionModel)
           
 boolean isExposed()
          Should this permission be shown to the UI?
 boolean isTypeRequired()
          Does a node have to have the type/aspect for the permission to apply?
 
Methods inherited from class org.alfresco.repo.security.permissions.impl.model.AbstractPermission
getName, getQName, getRequiredPermissions, getTypeQName
 
Methods inherited from class org.alfresco.repo.security.permissions.impl.AbstractPermissionReference
equals, hashCode, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Permission

public Permission(org.alfresco.service.namespace.QName typeQName)
A permission for the given type

Parameters:
typeQName -
Method Detail

initialise

public void initialise(org.dom4j.Element element,
                       org.alfresco.service.namespace.NamespacePrefixResolver nspr,
                       PermissionModel permissionModel)
Specified by:
initialise in interface XMLModelInitialisable
Overrides:
initialise in class AbstractPermission

getDefaultPermission

public org.alfresco.service.cmr.security.AccessStatus getDefaultPermission()
Default deny/allow for this permission

Returns:
the access status

getGrantedToGroups

public java.util.Set getGrantedToGroups()
Get the groups for which this permission is granted (by definition - filled in by the model API)

Returns:
the specifed groups

isExposed

public boolean isExposed()
Should this permission be shown to the UI?

Returns:
return true if the permission be shown in the UI.

isTypeRequired

public boolean isTypeRequired()
Does a node have to have the type/aspect for the permission to apply?

Returns:
true if a node must have the type/aspect for the permission to apply.


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