com.silverpeas.accesscontrol
Class NodeAccessController

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

@Named
public class NodeAccessController
extends AbstractAccessController<NodePK>

Check the access to a node for a user.

Author:
ehugonnet

Constructor Summary
NodeAccessController()
           
 
Method Summary
protected  void fillUserRoles(Set<SilverpeasRole> userRoles, AccessControlContext context, String userId, NodePK nodePK)
          This method must fill user roles into the given container by taking in account the other parameters.
protected  ComponentAccessController getComponentAccessController()
          Gets a controller of access on the components of a publication.
 NodeBm getNodeBm()
           
 boolean isUserAuthorized(Set<SilverpeasRole> nodeUserRoles)
           
 boolean isUserAuthorized(String userId, NodePK nodePK, AccessControlContext context)
          Checks if the specified user may access the specified object.
 
Methods inherited from class com.silverpeas.accesscontrol.AbstractAccessController
getUserRoles, isUserAuthorized
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NodeAccessController

public NodeAccessController()
Method Detail

isUserAuthorized

public boolean isUserAuthorized(String userId,
                                NodePK nodePK,
                                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.
nodePK - the object to be accessed.
context - the context in which the object is accessed.
Returns:
true if access is granted - false otherwise.

isUserAuthorized

public boolean isUserAuthorized(Set<SilverpeasRole> nodeUserRoles)

fillUserRoles

protected void fillUserRoles(Set<SilverpeasRole> userRoles,
                             AccessControlContext context,
                             String userId,
                             NodePK nodePK)
Description copied from class: AbstractAccessController
This method must fill user roles into the given container by taking in account the other parameters.

Overrides:
fillUserRoles in class AbstractAccessController<NodePK>

getNodeBm

public NodeBm getNodeBm()
                 throws Exception
Throws:
Exception

getComponentAccessController

protected ComponentAccessController getComponentAccessController()
Gets a controller of access on the components of a publication.

Returns:
a ComponentAccessController instance.


Copyright © 2016 Silverpeas. All Rights Reserved.