info.magnolia.cms.core
Class MagnoliaAccessProvider

java.lang.Object
  extended by org.apache.jackrabbit.core.security.authorization.AbstractAccessControlProvider
      extended by org.apache.jackrabbit.core.security.authorization.combined.CombinedProvider
          extended by info.magnolia.cms.core.MagnoliaAccessProvider
All Implemented Interfaces:
org.apache.jackrabbit.core.security.authorization.AccessControlConstants, org.apache.jackrabbit.core.security.authorization.AccessControlProvider, org.apache.jackrabbit.core.security.authorization.AccessControlUtils

public class MagnoliaAccessProvider
extends org.apache.jackrabbit.core.security.authorization.combined.CombinedProvider

Magnolia specific ACL provider. This code depends on JR specific API rather then on JCR API. That's why it'll be moved out from core (SCRUM-636).

Version:
$Id$

Field Summary
 
Fields inherited from class org.apache.jackrabbit.core.security.authorization.AbstractAccessControlProvider
observationMgr, PARAM_OMIT_DEFAULT_PERMISSIONS, privilegeManager, session
 
Fields inherited from interface org.apache.jackrabbit.core.security.authorization.AccessControlConstants
N_ACCESSCONTROL, N_POLICY, N_REPO_POLICY, NT_REP_ACCESS_CONTROL, NT_REP_ACCESS_CONTROLLABLE, NT_REP_ACE, NT_REP_ACL, NT_REP_DENY_ACE, NT_REP_GRANT_ACE, NT_REP_PRINCIPAL_ACCESS_CONTROL, NT_REP_REPO_ACCESS_CONTROLLABLE, P_GLOB, P_PRINCIPAL_NAME, P_PRIVILEGES
 
Constructor Summary
MagnoliaAccessProvider()
           
 
Method Summary
 boolean canAccessRoot(Set<Principal> principals)
           
 void close()
           
 org.apache.jackrabbit.core.security.authorization.CompiledPermissions compilePermissions(Set<Principal> principals)
           
 org.apache.jackrabbit.core.security.authorization.AccessControlEditor getEditor(javax.jcr.Session editingSession)
           
 javax.jcr.security.AccessControlPolicy[] getEffectivePolicies(org.apache.jackrabbit.spi.Path absPath, org.apache.jackrabbit.core.security.authorization.CompiledPermissions permissions)
           
 javax.jcr.security.AccessControlPolicy[] getEffectivePolicies(Set<Principal> principals, org.apache.jackrabbit.core.security.authorization.CompiledPermissions permissions)
           
 void init(javax.jcr.Session systemSession, Map configuration)
           
 boolean isAcItem(org.apache.jackrabbit.core.ItemImpl item)
           
 boolean isAcItem(org.apache.jackrabbit.spi.Path absPath)
           
 
Methods inherited from class org.apache.jackrabbit.core.security.authorization.AbstractAccessControlProvider
checkInitialized, getAdminPermissions, getPrivilegeManagerImpl, getReadOnlyPermissions, isAdminOrSystem, isLive, isReadOnly
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MagnoliaAccessProvider

public MagnoliaAccessProvider()
Method Detail

canAccessRoot

public boolean canAccessRoot(Set<Principal> principals)
                      throws javax.jcr.RepositoryException
Specified by:
canAccessRoot in interface org.apache.jackrabbit.core.security.authorization.AccessControlProvider
Overrides:
canAccessRoot in class org.apache.jackrabbit.core.security.authorization.combined.CombinedProvider
Throws:
javax.jcr.RepositoryException

close

public void close()
Specified by:
close in interface org.apache.jackrabbit.core.security.authorization.AccessControlProvider
Overrides:
close in class org.apache.jackrabbit.core.security.authorization.combined.CombinedProvider

compilePermissions

public org.apache.jackrabbit.core.security.authorization.CompiledPermissions compilePermissions(Set<Principal> principals)
                                                                                         throws javax.jcr.RepositoryException
Specified by:
compilePermissions in interface org.apache.jackrabbit.core.security.authorization.AccessControlProvider
Overrides:
compilePermissions in class org.apache.jackrabbit.core.security.authorization.combined.CombinedProvider
Throws:
javax.jcr.RepositoryException

getEditor

public org.apache.jackrabbit.core.security.authorization.AccessControlEditor getEditor(javax.jcr.Session editingSession)
Specified by:
getEditor in interface org.apache.jackrabbit.core.security.authorization.AccessControlProvider
Overrides:
getEditor in class org.apache.jackrabbit.core.security.authorization.combined.CombinedProvider

getEffectivePolicies

public javax.jcr.security.AccessControlPolicy[] getEffectivePolicies(org.apache.jackrabbit.spi.Path absPath,
                                                                     org.apache.jackrabbit.core.security.authorization.CompiledPermissions permissions)
                                                              throws javax.jcr.ItemNotFoundException,
                                                                     javax.jcr.RepositoryException
Specified by:
getEffectivePolicies in interface org.apache.jackrabbit.core.security.authorization.AccessControlProvider
Overrides:
getEffectivePolicies in class org.apache.jackrabbit.core.security.authorization.combined.CombinedProvider
Throws:
javax.jcr.ItemNotFoundException
javax.jcr.RepositoryException

getEffectivePolicies

public javax.jcr.security.AccessControlPolicy[] getEffectivePolicies(Set<Principal> principals,
                                                                     org.apache.jackrabbit.core.security.authorization.CompiledPermissions permissions)
                                                              throws javax.jcr.RepositoryException
Specified by:
getEffectivePolicies in interface org.apache.jackrabbit.core.security.authorization.AccessControlProvider
Overrides:
getEffectivePolicies in class org.apache.jackrabbit.core.security.authorization.combined.CombinedProvider
Throws:
javax.jcr.RepositoryException

init

public void init(javax.jcr.Session systemSession,
                 Map configuration)
          throws javax.jcr.RepositoryException
Specified by:
init in interface org.apache.jackrabbit.core.security.authorization.AccessControlProvider
Overrides:
init in class org.apache.jackrabbit.core.security.authorization.combined.CombinedProvider
Throws:
javax.jcr.RepositoryException

isAcItem

public boolean isAcItem(org.apache.jackrabbit.core.ItemImpl item)
                 throws javax.jcr.RepositoryException
Specified by:
isAcItem in interface org.apache.jackrabbit.core.security.authorization.AccessControlUtils
Overrides:
isAcItem in class org.apache.jackrabbit.core.security.authorization.combined.CombinedProvider
Throws:
javax.jcr.RepositoryException

isAcItem

public boolean isAcItem(org.apache.jackrabbit.spi.Path absPath)
                 throws javax.jcr.RepositoryException
Specified by:
isAcItem in interface org.apache.jackrabbit.core.security.authorization.AccessControlUtils
Overrides:
isAcItem in class org.apache.jackrabbit.core.security.authorization.combined.CombinedProvider
Throws:
javax.jcr.RepositoryException


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