org.apache.clerezza.rdf.core.access.security
Class TcPermission

java.lang.Object
  extended by java.security.Permission
      extended by org.apache.clerezza.rdf.core.access.security.TcPermission
All Implemented Interfaces:
Serializable, Guard

public class TcPermission
extends Permission

A permission to access TripleCollections matching a specified name pattern. A pattern is matched if and only if the pattern is equals to name of the TripleCollection or the pattern ends with "/*" and the name of the TripleCollection starts with the characters preceding the '*' in the pattern.

Author:
reto, tsuy
See Also:
Serialized Form

Field Summary
static String READ
           
static String READWRITE
           
 
Constructor Summary
TcPermission(String tcNamePattern, String actions)
          Conststructs a TcPermission for a specified name pattern and a list of actions.
 
Method Summary
 boolean equals(Object obj)
           
 String getActions()
           
 int hashCode()
           
 boolean implies(Permission permission)
           
 
Methods inherited from class java.security.Permission
checkGuard, getName, newPermissionCollection, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

READWRITE

public static final String READWRITE
See Also:
Constant Field Values

READ

public static final String READ
See Also:
Constant Field Values
Constructor Detail

TcPermission

public TcPermission(String tcNamePattern,
                    String actions)
Conststructs a TcPermission for a specified name pattern and a list of actions.

Parameters:
tcNamePattern - see class description
actions - a comma separated list of the strings "read" and "readwrite", the canonical form is just "read" or "readwrite" as "readwrite" implies "read".
Method Detail

implies

public boolean implies(Permission permission)
Specified by:
implies in class Permission

equals

public boolean equals(Object obj)
Specified by:
equals in class Permission

hashCode

public int hashCode()
Specified by:
hashCode in class Permission

getActions

public String getActions()
Specified by:
getActions in class Permission


Copyright © 2012 The Apache Software Foundation. All Rights Reserved.