com.filenet.api.engine

Interface RoleMembershipHandler



  • public interface RoleMembershipHandler
    An interface to be implemented by a handler for evaluating membership in a dynamic role. A role membership handler runs on the server. It returns true if a specified user meets the handler criteria, indicating that the user is a member of the dynamic role.

    A role membership handler is referenced by CmRoleMembershipAction. This object is set on CmRoleClassDefinition, which defines the access definitions for a role.

    When implementing a role membership handler, consider the following points:

    • You can implement a role membership handler as a Java or JavaScript component. You can check in a Java handler as a CodeModule object, or you can specify a Java handler in the classpath of the application server where the Content Engine is running.
    • If a role membership handler throws an exception, the server will fail the operation that resulted in the handler being invoked.
    • Method Detail

      • isUserInRole

        boolean isUserInRole(CmRoleMembershipAction action,
                             CmDynamicRole role,
                             User evaluationUser,
                             AuthorizationServices services)
        Determines if a given user is a member of a role.
        Parameters:
        action - -- the CmRoleMembershipAction instance defining the handler being called.
        role - -- the CmDynamicRole instance for which membership evaluation is required.
        evaluationUser - -- the User object for the user whose membership is being evaluated.
        services - -- an interface providing utility methods to the handler.
        Returns:
        True if the specified user is a member of the role.

© Copyright IBM Corporation 2006, 2019. All rights reserved.