com.ibm.commerce.accesscontrol.policymanager

Interface PolicyManager



  • public interface PolicyManager
    This interface dictates the set of methods for any class that implements the run time behaviour of PolicyManager.
    • Field Summary

      Fields 
      Modifier and Type Field and Description
      static java.lang.String COPYRIGHT 
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method and Description
      AccessClause getAccessClause(CommandContext context, java.lang.String action, java.lang.String resouceClass)
      Implement this method to generate the query based on the metadata information available for the resource class and the policies based on the given action.
      boolean isAllowed(CommandContext context, java.lang.String action, Protectable resource)
      Implement this method to determine if a user (part of the context) can execute a given "action" against a given "resource".
    • Method Detail

      • getAccessClause

        AccessClause getAccessClause(CommandContext context,
                                     java.lang.String action,
                                     java.lang.String resouceClass)
                              throws java.lang.Exception
        Implement this method to generate the query based on the metadata information available for the resource class and the policies based on the given action.
        Parameters:
        context - The CommandContext
        action - The name
        resourceClass - The class name
        Returns:
        AccessClause The object carrying the where clause and a flag indicating if the query is complete in itself.
        Throws:
        java.lang.Exception
        See Also:
        AccessClause, CommandContext
      • isAllowed

        boolean isAllowed(CommandContext context,
                          java.lang.String action,
                          Protectable resource)
                   throws java.lang.Exception
        Implement this method to determine if a user (part of the context) can execute a given "action" against a given "resource".
        Parameters:
        context - The CommandContext
        action - The name
        resource - 'Protectable' resource instance
        Returns:
        true if the action could be performed on the resource by the user, false otherwise
        Throws:
        java.lang.Exception
        See Also:
        Protectable, CommandContext