Class CMAPolicy


  • public class CMAPolicy
    extends java.lang.Object
    What do allow or deny a role to do.
    • Constructor Detail

      • CMAPolicy

        public CMAPolicy()
    • Method Detail

      • getEffect

        public java.lang.String getEffect()
        Returns:
        either ALLOW or DENY
      • setEffect

        public CMAPolicy setEffect​(java.lang.String effect)
        Set a general effect of this policy.
        Parameters:
        effect - either ALLOW or DENY or custom.
        Returns:
        this instance fore ease of chaining.
        See Also:
        allow(), deny()
      • getConstraint

        public CMAConstraint getConstraint()
        Returns:
        the constraints set on this policy.
      • setConstraint

        public CMAPolicy setConstraint​(CMAConstraint constraint)
        Set the constraint to be used.
        Parameters:
        constraint - to be set.
        Returns:
        this instance for chaining.
      • getActions

        public java.lang.Object getActions()
        This can method can return a string, 'all', a list of strings identifying the actions, or null.
        Returns:
        the actions set on this policy.
      • setActions

        public CMAPolicy setActions​(java.util.List<java.lang.String> actions)
        Replace the current actions with new ones.
        Parameters:
        actions - the actions replacing the current ones.
        Returns:
        this instance for chaining.
      • allow

        public CMAPolicy allow()
        This policy describes action _allowed_ by the assigned role.
        Returns:
        this instance for chaining.
      • deny

        public CMAPolicy deny()
        This policy should describe actions which are _denied_ by the assigned role.
        Returns:
        this instance for chaining.
      • read

        public CMAPolicy read()
        Add reading to the allowed actions.
        Returns:
        this instance for chaining.
      • create

        public CMAPolicy create()
        Add creating to the allowed actions.
        Returns:
        this instance for chaining.
      • update

        public CMAPolicy update()
        Add updating to the allowed actions.
        Returns:
        this instance for chaining.
      • delete

        public CMAPolicy delete()
        Add deleting to the allowed actions.
        Returns:
        this instance for chaining.
      • publish

        public CMAPolicy publish()
        Add publishing to the allowed actions.
        Returns:
        this instance for chaining.
      • unpublish

        public CMAPolicy unpublish()
        Add unpublishing to the allowed actions.
        Returns:
        this instance for chaining.
      • archive

        public CMAPolicy archive()
        Add archiving to the allowed actions.
        Returns:
        this instance for chaining.
      • unarchive

        public CMAPolicy unarchive()
        Add unarchiving to the allowed actions.
        Returns:
        this instance for chaining.
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
        Returns:
        a human readable string, representing the object.