Class AllPermission

  • All Implemented Interfaces:
    java.io.Serializable, java.security.Guard

    public final class AllPermission
    extends java.security.Permission
    implements java.io.Serializable

    Permission to perform all operations on a given wiki.

    Since:
    2.3.80
    See Also:
    Serialized Form
    • Constructor Summary

      Constructors 
      Constructor Description
      AllPermission​(java.lang.String wiki)
      Creates a new AllPermission for the given wikis.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean equals​(java.lang.Object obj)
      Two AllPermission objects are considered equal if their wikis are equal.
      java.lang.String getActions()
      No-op; always returns null
      java.lang.String getWiki()
      Returns the name of the wiki containing the page represented by this permission; may return the wildcard string.
      int hashCode()
      Returns the hash code for this WikiPermission.
      boolean implies​(java.security.Permission permission)
      WikiPermission can only imply other WikiPermissions; no other permission types are implied.
      java.security.PermissionCollection newPermissionCollection()
      java.lang.String toString()
      Prints a human-readable representation of this permission.
      • Methods inherited from class java.security.Permission

        checkGuard, getName
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • AllPermission

        public AllPermission​(java.lang.String wiki)
        Creates a new AllPermission for the given wikis.
        Parameters:
        wiki - the wiki to which the permission should apply. If null, will apply to all wikis.
    • Method Detail

      • equals

        public boolean equals​(java.lang.Object obj)
        Two AllPermission objects are considered equal if their wikis are equal.
        Specified by:
        equals in class java.security.Permission
        Parameters:
        obj -
        Returns:
        See Also:
        Object.equals(java.lang.Object)
      • getActions

        public java.lang.String getActions()
        No-op; always returns null
        Specified by:
        getActions in class java.security.Permission
        Returns:
        Always null.
        See Also:
        Permission.getActions()
      • getWiki

        public java.lang.String getWiki()
        Returns the name of the wiki containing the page represented by this permission; may return the wildcard string.
        Returns:
        The wiki
      • hashCode

        public int hashCode()
        Returns the hash code for this WikiPermission.
        Specified by:
        hashCode in class java.security.Permission
        Returns:
        See Also:
        Object.hashCode()
      • implies

        public boolean implies​(java.security.Permission permission)
        WikiPermission can only imply other WikiPermissions; no other permission types are implied. One WikiPermission implies another if all of the other WikiPermission's actions are equal to, or a subset of, those for this permission.
        Specified by:
        implies in class java.security.Permission
        Parameters:
        permission - the permission which may (or may not) be implied by this instance
        Returns:
        true if the permission is implied, false otherwise
        See Also:
        Permission.implies(java.security.Permission)
      • newPermissionCollection

        public java.security.PermissionCollection newPermissionCollection()
        Overrides:
        newPermissionCollection in class java.security.Permission
        Returns:
        See Also:
        Permission.newPermissionCollection()
      • toString

        public java.lang.String toString()
        Prints a human-readable representation of this permission.
        Overrides:
        toString in class java.security.Permission
        Returns:
        See Also:
        Object.toString()