com.stratelia.webactiv.jaas
Class SilverpeasAccessManager

java.lang.Object
  extended by com.stratelia.webactiv.jaas.SilverpeasAccessManager
All Implemented Interfaces:
org.apache.jackrabbit.core.security.AccessManager

public class SilverpeasAccessManager
extends Object
implements org.apache.jackrabbit.core.security.AccessManager


Field Summary
 
Fields inherited from interface org.apache.jackrabbit.core.security.AccessManager
READ, REMOVE, WRITE
 
Constructor Summary
SilverpeasAccessManager()
           
 
Method Summary
 boolean canAccess(String workspaceName)
           
 boolean canRead(org.apache.jackrabbit.spi.Path path, org.apache.jackrabbit.core.id.ItemId itemid)
           
 void checkPermission(org.apache.jackrabbit.core.id.ItemId id, int permissions)
           
 void checkPermission(org.apache.jackrabbit.spi.Path absPath, int permissions)
           
 void checkRepositoryPermission(int permissions)
           
protected  boolean checkUserIsOwner(SilverpeasUserPrincipal principal, org.apache.jackrabbit.core.id.ItemId id)
          Rustine
protected  boolean checkUserIsOwner(SilverpeasUserPrincipal principal, org.apache.jackrabbit.spi.Path path)
          Rustine
 void close()
           
protected  boolean denotesNode(org.apache.jackrabbit.spi.Path path)
           
protected  javax.jcr.Node getNode(javax.jcr.Session session, org.apache.jackrabbit.core.id.ItemId id)
           
protected  javax.jcr.Node getNode(javax.jcr.Session session, org.apache.jackrabbit.spi.Path path)
           
protected  String getRelativePath(org.apache.jackrabbit.spi.Path path)
           
 void init(org.apache.jackrabbit.core.security.AMContext context)
           
 void init(org.apache.jackrabbit.core.security.AMContext context, org.apache.jackrabbit.core.security.authorization.AccessControlProvider acProvider, org.apache.jackrabbit.core.security.authorization.WorkspaceAccessManager wspAccessManager)
           
 boolean isGranted(org.apache.jackrabbit.core.id.ItemId id, int permissions)
           
 boolean isGranted(org.apache.jackrabbit.spi.Path path, int permissions)
           
 boolean isGranted(org.apache.jackrabbit.spi.Path path, org.apache.jackrabbit.spi.Name name, int permission)
           
protected  boolean isPathAutorized(org.apache.jackrabbit.spi.Path path)
           
 void setRepository(javax.jcr.Repository repository)
           
protected  boolean validateFileNode(org.apache.jackrabbit.core.id.ItemId id)
          Rustine pour bloquer l'acces au fichier webdav.
protected  boolean validateFileNode(javax.jcr.Node node)
           
protected  boolean validateFileNode(org.apache.jackrabbit.spi.Path path)
          Rustine pour bloquer l'acces au fichier webdav.
protected  boolean validateNode(javax.jcr.Node node)
           
protected  boolean validateNode(org.apache.jackrabbit.spi.Path path)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SilverpeasAccessManager

public SilverpeasAccessManager()
Method Detail

canAccess

public boolean canAccess(String workspaceName)
                  throws javax.jcr.RepositoryException
Specified by:
canAccess in interface org.apache.jackrabbit.core.security.AccessManager
Throws:
javax.jcr.RepositoryException

checkPermission

public void checkPermission(org.apache.jackrabbit.core.id.ItemId id,
                            int permissions)
                     throws javax.jcr.RepositoryException
Specified by:
checkPermission in interface org.apache.jackrabbit.core.security.AccessManager
Throws:
javax.jcr.RepositoryException

close

public void close()
           throws Exception
Specified by:
close in interface org.apache.jackrabbit.core.security.AccessManager
Throws:
Exception

init

public void init(org.apache.jackrabbit.core.security.AMContext context)
          throws Exception
Specified by:
init in interface org.apache.jackrabbit.core.security.AccessManager
Throws:
Exception

isGranted

public boolean isGranted(org.apache.jackrabbit.core.id.ItemId id,
                         int permissions)
                  throws javax.jcr.RepositoryException
Specified by:
isGranted in interface org.apache.jackrabbit.core.security.AccessManager
Throws:
javax.jcr.RepositoryException

checkUserIsOwner

protected boolean checkUserIsOwner(SilverpeasUserPrincipal principal,
                                   org.apache.jackrabbit.core.id.ItemId id)
                            throws javax.jcr.RepositoryException
Rustine

Parameters:
principal -
id -
Returns:
Throws:
javax.jcr.RepositoryException

checkUserIsOwner

protected boolean checkUserIsOwner(SilverpeasUserPrincipal principal,
                                   org.apache.jackrabbit.spi.Path path)
                            throws javax.jcr.RepositoryException
Rustine

Parameters:
principal -
path -
Returns:
Throws:
javax.jcr.RepositoryException

isPathAutorized

protected boolean isPathAutorized(org.apache.jackrabbit.spi.Path path)

validateFileNode

protected boolean validateFileNode(org.apache.jackrabbit.core.id.ItemId id)
                            throws javax.jcr.RepositoryException
Rustine pour bloquer l'acces au fichier webdav. Attention

Parameters:
id -
Returns:
Throws:
javax.jcr.LoginException
javax.jcr.ItemNotFoundException
javax.jcr.RepositoryException

validateNode

protected boolean validateNode(org.apache.jackrabbit.spi.Path path)
                        throws javax.jcr.RepositoryException
Throws:
javax.jcr.RepositoryException

validateNode

protected boolean validateNode(javax.jcr.Node node)
                        throws javax.jcr.RepositoryException
Throws:
javax.jcr.RepositoryException

validateFileNode

protected boolean validateFileNode(org.apache.jackrabbit.spi.Path path)
                            throws javax.jcr.RepositoryException
Rustine pour bloquer l'acces au fichier webdav. Attention

Parameters:
path -
Returns:
Throws:
javax.jcr.LoginException
javax.jcr.ItemNotFoundException
javax.jcr.RepositoryException

validateFileNode

protected boolean validateFileNode(javax.jcr.Node node)
                            throws javax.jcr.RepositoryException
Throws:
javax.jcr.RepositoryException

setRepository

public void setRepository(javax.jcr.Repository repository)

init

public void init(org.apache.jackrabbit.core.security.AMContext context,
                 org.apache.jackrabbit.core.security.authorization.AccessControlProvider acProvider,
                 org.apache.jackrabbit.core.security.authorization.WorkspaceAccessManager wspAccessManager)
          throws Exception
Specified by:
init in interface org.apache.jackrabbit.core.security.AccessManager
Throws:
Exception

checkPermission

public void checkPermission(org.apache.jackrabbit.spi.Path absPath,
                            int permissions)
                     throws javax.jcr.RepositoryException
Specified by:
checkPermission in interface org.apache.jackrabbit.core.security.AccessManager
Throws:
javax.jcr.RepositoryException

isGranted

public boolean isGranted(org.apache.jackrabbit.spi.Path path,
                         int permissions)
                  throws javax.jcr.RepositoryException
Specified by:
isGranted in interface org.apache.jackrabbit.core.security.AccessManager
Throws:
javax.jcr.RepositoryException

denotesNode

protected boolean denotesNode(org.apache.jackrabbit.spi.Path path)
                       throws javax.jcr.NamespaceException
Throws:
javax.jcr.NamespaceException

getNode

protected javax.jcr.Node getNode(javax.jcr.Session session,
                                 org.apache.jackrabbit.spi.Path path)
                          throws javax.jcr.RepositoryException
Throws:
javax.jcr.RepositoryException

getNode

protected javax.jcr.Node getNode(javax.jcr.Session session,
                                 org.apache.jackrabbit.core.id.ItemId id)
                          throws javax.jcr.RepositoryException
Throws:
javax.jcr.RepositoryException

getRelativePath

protected String getRelativePath(org.apache.jackrabbit.spi.Path path)
                          throws javax.jcr.NamespaceException
Throws:
javax.jcr.NamespaceException

isGranted

public boolean isGranted(org.apache.jackrabbit.spi.Path path,
                         org.apache.jackrabbit.spi.Name name,
                         int permission)
                  throws javax.jcr.RepositoryException
Specified by:
isGranted in interface org.apache.jackrabbit.core.security.AccessManager
Throws:
javax.jcr.RepositoryException

canRead

public boolean canRead(org.apache.jackrabbit.spi.Path path,
                       org.apache.jackrabbit.core.id.ItemId itemid)
                throws javax.jcr.RepositoryException
Specified by:
canRead in interface org.apache.jackrabbit.core.security.AccessManager
Throws:
javax.jcr.RepositoryException

checkRepositoryPermission

public void checkRepositoryPermission(int permissions)
                               throws javax.jcr.RepositoryException
Specified by:
checkRepositoryPermission in interface org.apache.jackrabbit.core.security.AccessManager
Throws:
javax.jcr.RepositoryException


Copyright © 2016 Silverpeas. All Rights Reserved.