GigaSpaces XAP 10.0.1 API

com.gigaspaces.security.authorities
Class SpaceAuthority

java.lang.Object
  extended by 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:
Serialized Form

Nested Class Summary
static class SpaceAuthority.ClassFilter
          Class filter accepting only the defined class-name.
static interface SpaceAuthority.Filter<T>
          interface for data access filtering.
static class SpaceAuthority.NegateClassFilter
          Class filter accepting only classes not of the defined class-name.
static interface SpaceAuthority.NegateFilter<T>
          interface for restrictive data access filtering.
static class SpaceAuthority.NegatePackageFilter
          Package filter accepting only packages not of the defined package.
static class SpaceAuthority.NegateRegexFilter
          Negate a regular expression filter.
static class SpaceAuthority.PackageFilter
          Package filter accepting only the defined package
static class SpaceAuthority.RegexFilter
          Regular expression filter, using a regular expression as a pattern of characters that describes a set of strings.
static class SpaceAuthority.SpacePrivilege
          Defines operation privileges
static class SpaceAuthority.WildcardExpressionToFilterConverter
          Convert a wildcard expression to a filter instance.
 
Constructor Summary
SpaceAuthority(SpaceAuthority.SpacePrivilege spacePrivilege)
          An authority with the specified privilege.
SpaceAuthority(SpaceAuthority.SpacePrivilege spacePrivilege, SpaceAuthority.Filter filter)
          An authority with the specified privilege.
 
Method Summary
 boolean equals(Object obj)
           
 String getAuthority()
          An Authority that can be represented as a String which is sufficient in precision to be relied upon for an access control decisions.
 SpaceAuthority.Filter getFilter()
           
 Privilege getPrivilege()
          A granted privilege associated with this Authority.
 int hashCode()
           
 String toString()
           
static SpaceAuthority valueOf(String authority)
          Parses the getAuthority() string representation of an Authority.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

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 Detail

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.

GigaSpaces XAP 10.0.1 API

Copyright © GigaSpaces.