Class AbstractActionPermission<This extends AbstractActionPermission<This>>

    • Constructor Detail

      • AbstractActionPermission

        protected AbstractActionPermission​(String name)
        Construct a new instance.
        Parameters:
        name - the permission name
    • Method Detail

      • actionsEquals

        public abstract boolean actionsEquals​(String actions)
        Determine whether the actions of this permission are equal to the given actions.
        Parameters:
        actions - the actions string (must not be null)
        Returns:
        true if the actions are equal, false otherwise
      • actionsEquals

        public final boolean actionsEquals​(Permission permission)
        Determine whether the actions of this permission are equal to the actions of given permission. If the permission is not of the same type as this permission, false is returned.
        Parameters:
        permission - the permission whose actions are to be compared
        Returns:
        true if the actions are equal, false otherwise
      • actionsEquals

        public abstract boolean actionsEquals​(This permission)
        Determine whether the actions of this permission are equal to the actions of given permission.
        Parameters:
        permission - the permission whose actions are to be compared
        Returns:
        true if the actions are equal, false otherwise
      • actionsHashCode

        protected abstract int actionsHashCode()
        Get the actions hash code.
        Returns:
        the actions hash code
      • impliesActions

        public abstract boolean impliesActions​(String actions)
        Determine whether this permission's actions value implies the given actions value.
        Parameters:
        actions - the actions to test (must not be null)
        Returns:
        true if this permission implies the other; false otherwise
      • impliesActions

        public final boolean impliesActions​(Permission permission)
        Determine whether this permission's actions value implies the actions of the given permission. If the permission is not of the same type as this permission, false is returned.
        Parameters:
        permission - the permission whose actions are to be compared
        Returns:
        true if this permission implies the other; false otherwise
      • impliesActions

        public abstract boolean impliesActions​(This permission)
        Determine whether this permission's actions value implies the actions of the given permission.
        Parameters:
        permission - the permission whose actions are to be compared
        Returns:
        true if this permission implies the other; false otherwise
      • withActions

        public abstract This withActions​(String actionsString)
        Get a permission which is identical to this one, but with new actions which consist of the union of the actions from this permission and the actions from the given string. The returned permission may or may not be a new instance, and may be equal to this instance.
        Parameters:
        actionsString - the actions string (must not be null)
        Returns:
        the permission (not null)
      • withActionsFrom

        public This withActionsFrom​(This permission)
        Get a permission which is identical to this one, but with new actions which consist of the union of the actions from this permission and the actions from the given permission. The returned permission may or may not be a new instance, and may be equal to this instance.
        Parameters:
        permission - the other permission (must not be null)
        Returns:
        the permission (not null)
      • withoutActions

        public abstract This withoutActions​(String actionsString)
        Get a permission which is identical to this one, but with new actions which consist of the actions from this permission without the actions from the given string. The returned permission may or may not be a new instance, and may be equal to this instance.
        Parameters:
        actionsString - the actions string (must not be null)
        Returns:
        the permission (not null)
      • withoutActionsFrom

        public This withoutActionsFrom​(This permission)
        Get a permission which is identical to this one, but with new actions which consist of the actions from this permission without the actions from the given permission. The returned permission may or may not be a new instance, and may be equal to this instance.
        Parameters:
        permission - the other permission (must not be null)
        Returns:
        the permission (not null)
      • withNewActions

        public abstract This withNewActions​(String actionsString)
        Get a permission which is identical to this one, but with new actions as given by actionsString. The returned permission may or may not be a new instance, and may be equal to this instance.
        Parameters:
        actionsString - the actions string (must not be null)
        Returns:
        the permission (not null)
      • withNewActionsFrom

        public This withNewActionsFrom​(This permission)
        Get a permission which is identical to this one, but with new actions as given by actionsString. The returned permission may or may not be a new instance, and may be equal to this instance.
        Parameters:
        permission - the other permission (must not be null)
        Returns:
        the permission (not null)