com.silverpeas.util.security
Interface ComponentSecurity


public interface ComponentSecurity

Component security provides a way to check a user have enough rights to access a given object in a Silverpeas component instance. Each Silverpeas component should implements this interface according to the objects or resources it manages.


Method Summary
 void disableCache()
           
 void enableCache()
           
 boolean isAccessAuthorized(String componentId, String userId, String objectId)
          Check if a user is authorized to access to a given object in a defined component.
 boolean isAccessAuthorized(String componentId, String userId, String objectId, String objectType)
          Check if a user is authorized to access to a given object in a defined component.
 boolean isObjectAvailable(String componentId, String userId, String objectId, String objectType)
          Check if a user is authorized to access to a given object in a defined component.
 

Method Detail

isAccessAuthorized

boolean isAccessAuthorized(String componentId,
                           String userId,
                           String objectId)
Check if a user is authorized to access to a given object in a defined component.

Parameters:
componentId - - id of the component
userId - - id of the user
objectId - - id of the object
Returns:
true if user is authorized to access to component's object, false otherwise.

isAccessAuthorized

boolean isAccessAuthorized(String componentId,
                           String userId,
                           String objectId,
                           String objectType)
Check if a user is authorized to access to a given object in a defined component. Usefull if component uses several objects.

Parameters:
componentId - - id of the component
userId - - id of the user
objectId - - id of the object
objectType - - type of the object (ex : PublicationDetail, NodeDetail...)
Returns:
true if user is authorized to access to component's object, false otherwise.

isObjectAvailable

boolean isObjectAvailable(String componentId,
                          String userId,
                          String objectId,
                          String objectType)
Check if a user is authorized to access to a given object in a defined component. Usefull if component uses several objects.

Parameters:
componentId - - id of the component
userId - - id of the user
objectId - - id of the object
objectType - - type of the object (ex : PublicationDetail, NodeDetail...)
Returns:
true if user is authorized to access to component's object, false otherwise.

enableCache

void enableCache()

disableCache

void disableCache()


Copyright © 2016 Silverpeas. All Rights Reserved.