com.silverpeas.accesscontrol
Class PublicationAccessController

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

@Named
public class PublicationAccessController
extends AbstractAccessController<PublicationPK>

Check the access to a publication for a user.

Author:
neysseric

Field Summary
static String PUBLICATION_DETAIL_KEY
           
 
Constructor Summary
PublicationAccessController()
           
 
Method Summary
protected  void fillUserRoles(Set<SilverpeasRole> userRoles, AccessControlContext context, String userId, PublicationPK publicationPK)
          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.
protected  NodeAccessController getNodeAccessController()
          Gets a controller of access on the nodes of a publication.
protected  PublicationBm getPublicationBm()
           
 boolean isUserAuthorized(String userId, PublicationPK pubPk, 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
 

Field Detail

PUBLICATION_DETAIL_KEY

public static final String PUBLICATION_DETAIL_KEY
See Also:
Constant Field Values
Constructor Detail

PublicationAccessController

public PublicationAccessController()
Method Detail

isUserAuthorized

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

fillUserRoles

protected void fillUserRoles(Set<SilverpeasRole> userRoles,
                             AccessControlContext context,
                             String userId,
                             PublicationPK publicationPK)
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<PublicationPK>

getPublicationBm

protected PublicationBm getPublicationBm()
                                  throws Exception
Throws:
Exception

getComponentAccessController

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

Returns:
a ComponentAccessController instance.

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.