info.magnolia.cms.core
Class DefaultACLBasedPermissions

java.lang.Object
  extended by org.apache.jackrabbit.core.security.authorization.AbstractCompiledPermissions
      extended by info.magnolia.cms.core.DefaultACLBasedPermissions
All Implemented Interfaces:
org.apache.jackrabbit.core.security.authorization.CompiledPermissions
Direct Known Subclasses:
NodeTypeBasedPermissions, RootOnlyPermissions

public class DefaultACLBasedPermissions
extends org.apache.jackrabbit.core.security.authorization.AbstractCompiledPermissions

Permission based on user ACL for given workspace. Caches the result of resolving paths from ids, the caching implementation based org.apache.jackrabbit.core.security.authorization.principalbased.ACLProvider.CompiledPermissionImpl.


Nested Class Summary
 
Nested classes/interfaces inherited from class org.apache.jackrabbit.core.security.authorization.AbstractCompiledPermissions
org.apache.jackrabbit.core.security.authorization.AbstractCompiledPermissions.Result
 
Field Summary
protected  AccessManager ami
           
protected  Object monitor
           
protected  org.apache.jackrabbit.spi.commons.conversion.PathResolver pathResolver
          Used to convert a jackrabbit Path abstraction into a path string with slashes and no namespaces.
protected  long[][] permissionMapping
           
protected  Map<org.apache.jackrabbit.core.id.ItemId,Boolean> readCache
           
protected  org.apache.jackrabbit.core.SessionImpl session
           
 
Fields inherited from interface org.apache.jackrabbit.core.security.authorization.CompiledPermissions
NO_PERMISSION
 
Constructor Summary
DefaultACLBasedPermissions(List<Permission> permissions, org.apache.jackrabbit.core.SessionImpl systemSession, Map<?,?> configuration)
           
 
Method Summary
protected  org.apache.jackrabbit.core.security.authorization.AbstractCompiledPermissions.Result buildRepositoryResult()
           
protected  org.apache.jackrabbit.core.security.authorization.AbstractCompiledPermissions.Result buildResult(org.apache.jackrabbit.spi.Path absPath)
           
 boolean canRead(org.apache.jackrabbit.spi.Path itemPath, org.apache.jackrabbit.core.id.ItemId itemId)
           
protected  long convertJackrabbitPermissionsToMagnoliaPermissions(long jackRabbitPermissions)
           
protected  org.apache.jackrabbit.core.security.authorization.PrivilegeManagerImpl getPrivilegeManagerImpl()
           
 int getPrivileges(org.apache.jackrabbit.spi.Path absPath)
           
 org.apache.jackrabbit.core.security.authorization.AbstractCompiledPermissions.Result getResult(org.apache.jackrabbit.spi.Path absPath)
           
 boolean grants(org.apache.jackrabbit.spi.Path absPath, int permissions)
           
 
Methods inherited from class org.apache.jackrabbit.core.security.authorization.AbstractCompiledPermissions
canReadAll, clearCache, close, getPrivilegeSet, hasPrivileges
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ami

protected final AccessManager ami

readCache

protected final Map<org.apache.jackrabbit.core.id.ItemId,Boolean> readCache

monitor

protected final Object monitor

session

protected org.apache.jackrabbit.core.SessionImpl session

permissionMapping

protected final long[][] permissionMapping

pathResolver

protected final org.apache.jackrabbit.spi.commons.conversion.PathResolver pathResolver
Used to convert a jackrabbit Path abstraction into a path string with slashes and no namespaces.

Constructor Detail

DefaultACLBasedPermissions

public DefaultACLBasedPermissions(List<Permission> permissions,
                                  org.apache.jackrabbit.core.SessionImpl systemSession,
                                  Map<?,?> configuration)
Method Detail

convertJackrabbitPermissionsToMagnoliaPermissions

protected long convertJackrabbitPermissionsToMagnoliaPermissions(long jackRabbitPermissions)

canRead

public boolean canRead(org.apache.jackrabbit.spi.Path itemPath,
                       org.apache.jackrabbit.core.id.ItemId itemId)
                throws javax.jcr.RepositoryException
Throws:
javax.jcr.RepositoryException

buildResult

protected org.apache.jackrabbit.core.security.authorization.AbstractCompiledPermissions.Result buildResult(org.apache.jackrabbit.spi.Path absPath)
                                                                                                    throws javax.jcr.RepositoryException
Specified by:
buildResult in class org.apache.jackrabbit.core.security.authorization.AbstractCompiledPermissions
Throws:
javax.jcr.RepositoryException

getResult

public org.apache.jackrabbit.core.security.authorization.AbstractCompiledPermissions.Result getResult(org.apache.jackrabbit.spi.Path absPath)
                                                                                               throws javax.jcr.RepositoryException
Overrides:
getResult in class org.apache.jackrabbit.core.security.authorization.AbstractCompiledPermissions
Throws:
javax.jcr.RepositoryException

grants

public boolean grants(org.apache.jackrabbit.spi.Path absPath,
                      int permissions)
               throws javax.jcr.RepositoryException
Specified by:
grants in interface org.apache.jackrabbit.core.security.authorization.CompiledPermissions
Overrides:
grants in class org.apache.jackrabbit.core.security.authorization.AbstractCompiledPermissions
Throws:
javax.jcr.RepositoryException

getPrivileges

public int getPrivileges(org.apache.jackrabbit.spi.Path absPath)
                  throws javax.jcr.RepositoryException
Specified by:
getPrivileges in interface org.apache.jackrabbit.core.security.authorization.CompiledPermissions
Overrides:
getPrivileges in class org.apache.jackrabbit.core.security.authorization.AbstractCompiledPermissions
Throws:
javax.jcr.RepositoryException

buildRepositoryResult

protected org.apache.jackrabbit.core.security.authorization.AbstractCompiledPermissions.Result buildRepositoryResult()
                                                                                                              throws javax.jcr.RepositoryException
Specified by:
buildRepositoryResult in class org.apache.jackrabbit.core.security.authorization.AbstractCompiledPermissions
Throws:
javax.jcr.RepositoryException

getPrivilegeManagerImpl

protected org.apache.jackrabbit.core.security.authorization.PrivilegeManagerImpl getPrivilegeManagerImpl()
                                                                                                  throws javax.jcr.RepositoryException
Specified by:
getPrivilegeManagerImpl in class org.apache.jackrabbit.core.security.authorization.AbstractCompiledPermissions
Throws:
javax.jcr.RepositoryException


Copyright © 2003-2013 Magnolia International Ltd.. All Rights Reserved.