org.apache.portals.graffito.jcr.security
Class SimpleAccessManager

java.lang.Object
  extended by org.apache.portals.graffito.jcr.security.SimpleAccessManager
All Implemented Interfaces:
org.apache.jackrabbit.core.security.AccessManager

public class SimpleAccessManager
extends java.lang.Object
implements org.apache.jackrabbit.core.security.AccessManager

SimpleAccessManager ...


Field Summary
protected  boolean anonymous
           
protected  org.apache.jackrabbit.core.HierarchyManager hierMgr
          hierarchy manager used for ACL-based access control model
protected  javax.security.auth.Subject subject
          Subject whose access rights this AccessManager should reflect
protected  boolean system
           
 
Fields inherited from interface org.apache.jackrabbit.core.security.AccessManager
READ, REMOVE, WRITE
 
Constructor Summary
SimpleAccessManager()
          Empty constructor
 
Method Summary
 boolean canAccess(java.lang.String workspaceName)
          
 void checkPermission(org.apache.jackrabbit.core.ItemId id, int permissions)
          
 void close()
          
 void init(org.apache.jackrabbit.core.security.AMContext context)
          
 boolean isGranted(org.apache.jackrabbit.core.ItemId id, int permissions)
          
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

subject

protected javax.security.auth.Subject subject
Subject whose access rights this AccessManager should reflect


hierMgr

protected org.apache.jackrabbit.core.HierarchyManager hierMgr
hierarchy manager used for ACL-based access control model


system

protected boolean system

anonymous

protected boolean anonymous
Constructor Detail

SimpleAccessManager

public SimpleAccessManager()
Empty constructor

Method Detail

init

public void init(org.apache.jackrabbit.core.security.AMContext context)
          throws javax.jcr.AccessDeniedException,
                 java.lang.Exception

Specified by:
init in interface org.apache.jackrabbit.core.security.AccessManager
Throws:
javax.jcr.AccessDeniedException
java.lang.Exception

close

public void close()
           throws java.lang.Exception

Specified by:
close in interface org.apache.jackrabbit.core.security.AccessManager
Throws:
java.lang.Exception

checkPermission

public void checkPermission(org.apache.jackrabbit.core.ItemId id,
                            int permissions)
                     throws javax.jcr.AccessDeniedException,
                            javax.jcr.ItemNotFoundException,
                            javax.jcr.RepositoryException

Specified by:
checkPermission in interface org.apache.jackrabbit.core.security.AccessManager
Throws:
javax.jcr.AccessDeniedException
javax.jcr.ItemNotFoundException
javax.jcr.RepositoryException

isGranted

public boolean isGranted(org.apache.jackrabbit.core.ItemId id,
                         int permissions)
                  throws javax.jcr.ItemNotFoundException,
                         javax.jcr.RepositoryException

Specified by:
isGranted in interface org.apache.jackrabbit.core.security.AccessManager
Throws:
javax.jcr.ItemNotFoundException
javax.jcr.RepositoryException

canAccess

public boolean canAccess(java.lang.String workspaceName)
                  throws javax.jcr.NoSuchWorkspaceException,
                         javax.jcr.RepositoryException

Specified by:
canAccess in interface org.apache.jackrabbit.core.security.AccessManager
Throws:
javax.jcr.NoSuchWorkspaceException
javax.jcr.RepositoryException


Copyright © 2004-2006 The Apache Software Foundation. All Rights Reserved.