Class SpaceAuthority

java.lang.Object
com.gigaspaces.security.authorities.SpaceAuthority
All Implemented Interfaces:
InternalAuthority, Authority, Serializable

public class SpaceAuthority extends Object implements InternalAuthority
Defines an Authority for operating on Space (stored) data, with the specified privilege.

The SpaceAuthrotiys' Authority.getAuthority() String representation format:

 SpacePrivilege privilege-value [filter]

 Where:
 privilege-value = WRITE | CREATE | READ | TAKE | EXECUTE | ALTER
 filter = RegexFilter regex |
          NegateRegexFilter regex |
          ClassFilter class-name |
          NegateClassFilter class-name |
          PackageFilter package-name |
          NegatePackageFilter package-name

 The privileges represent the following space operations:
  WRITE   - write and update operations, this grants CREATE privilege as well.
  CREATE  - write only operations
  READ    - read operations, count, notify
  TAKE    - take operations, clear
  EXECUTE - execute tasks
  ALTER   - clean, drop-class
 
Since:
7.0.1
Author:
Moran Avigdor
See Also:
  • Constructor Details

    • SpaceAuthority

      public SpaceAuthority(SpaceAuthority.SpacePrivilege spacePrivilege)
      An authority with the specified privilege.
      Parameters:
      spacePrivilege - a granted authority.
    • SpaceAuthority

      public SpaceAuthority(SpaceAuthority.SpacePrivilege spacePrivilege, SpaceAuthority.Filter filter)
      An authority with the specified privilege.
      Parameters:
      spacePrivilege - granted privilege
      filter - a filter on the specified privilege.
  • Method Details

    • valueOf

      public static SpaceAuthority valueOf(String authority)
      Parses the getAuthority() string representation of an Authority.
      Parameters:
      authority - the authority string to parse.
      Returns:
      an instance of the authority represented by the authority string.
    • getAuthority

      public String getAuthority()
      Description copied from interface: Authority
      An Authority that can be represented as a String which is sufficient in precision to be relied upon for an access control decisions.
      Specified by:
      getAuthority in interface Authority
      Returns:
      a representation of the granted authority (expressed as a String with sufficient precision).
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
    • getFilter

      public SpaceAuthority.Filter getFilter()
    • getPrivilege

      public Privilege getPrivilege()
      Description copied from interface: InternalAuthority
      A granted privilege associated with this Authority.
      Specified by:
      getPrivilege in interface InternalAuthority
      Returns:
      a granted privilege.