com.silverpeas.accesscontrol
Class DocumentAccessController

java.lang.Object
  extended by com.silverpeas.accesscontrol.AbstractAccessController<Document>
      extended by com.silverpeas.accesscontrol.DocumentAccessController
All Implemented Interfaces:
AccessController<Document>

@Named(value="documentAccessController")
public class DocumentAccessController
extends AbstractAccessController<Document>

Check the access to a document for a user.

Author:
ehugonnet

Constructor Summary
DocumentAccessController()
           
 
Method Summary
protected  NodeAccessController getNodeAccessController()
          Gets a controller of access on the nodes of a publication.
protected  PublicationBm getPublicationBm()
           
 boolean isUserAuthorized(String userId, Document object, AccessControlContext context)
          Checks if the specified user may access the specified object.
 
Methods inherited from class com.silverpeas.accesscontrol.AbstractAccessController
fillUserRoles, getUserRoles, isUserAuthorized
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DocumentAccessController

public DocumentAccessController()
Method Detail

isUserAuthorized

public boolean isUserAuthorized(String userId,
                                Document object,
                                AccessControlContext context)
Description copied from interface: AccessController
Checks if the specified user may access the specified object.

Parameters:
userId - the unique identifier of the user.
object - the object to be accessed.
context - the context in which the object is accessed.
Returns:
true if access is granted - false otherwise.

getPublicationBm

protected PublicationBm getPublicationBm()
                                  throws Exception
Throws:
Exception

getNodeAccessController

protected NodeAccessController getNodeAccessController()
Gets a controller of access on the nodes of a publication.

Returns:
a NodeAccessController instance.


Copyright © 2016 Silverpeas. All Rights Reserved.