com.ibm.tspaces.ac
Class TsAclDBase

java.lang.Object
  |
  +--com.ibm.tspaces.ac.TsAclDBase

public class TsAclDBase
extends java.lang.Object
implements java.io.Serializable

This class is used to store the User/Group hierarchy that is used for the TSpaces ACL support.

See Also:
Serialized Form

Field Summary
protected  com.ibm.tspaces.server.TS _AdminTS
           
protected  com.ibm.tspaces.server.util.Configuration _Config
           
static java.lang.String ACL_TUPLE
           
static java.lang.String ACLDB_TUPLE
           
 
Constructor Summary
TsAclDBase()
          Construct an TsAclDBase.
 
Method Summary
 void addPrincipalToGroup(java.lang.String name, java.lang.String group)
          Add a Principal to the specified Group
 boolean exists(java.security.Principal principal)
          Return true if Principal exists
 java.security.Principal getPrincipal(java.lang.String name)
          get Principal
 java.security.acl.Group getTopGroup()
          Return a reference to the Top Group in the Group hierarchy
 void initDBase()
          Initialize the TSAclDBase instance This will read special User and group information from the config file so that this class can respond correctly to ACVerifier methods.
 void putPrincipal(java.security.Principal principal)
          add Principal
static TsAclDBase readAclDBaseFile(java.lang.String filename)
          readAclDBaseFile will read a file that contains the TsAclDBase object
static TsAclDBase readAclDBaseTuple(com.ibm.tspaces.server.TS ts)
          readAclDBaseTuple will read the TsAclDBase object from the Admin space
static TsAclDBase readAclDBaseTuple(TupleSpace ts)
          readAclDBaseTuple will read the TsAclDBase object from the Admin space
 void removePrincipalFromGroup(java.lang.String name, java.lang.String group)
          Remove Principal from Group
static void writeAclDBaseFile(java.lang.String filename, TsAclDBase aclDB)
          writeAclDBaseFile will write the AclDBase into a file
static void writeAclDBaseTuple(com.ibm.tspaces.server.TS ts, TsAclDBase aclDB)
          writeAclDBaseTuple will write the AclDBase to the Admin space
static void writeAclDBaseTuple(TupleSpace ts, TsAclDBase aclDB)
          writeAclDBaseTuple will write the AclDBase to the Admin space
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ACL_TUPLE

public static final java.lang.String ACL_TUPLE

ACLDB_TUPLE

public static final java.lang.String ACLDB_TUPLE

_Config

protected transient com.ibm.tspaces.server.util.Configuration _Config

_AdminTS

protected transient com.ibm.tspaces.server.TS _AdminTS
Constructor Detail

TsAclDBase

public TsAclDBase()
Construct an TsAclDBase. This will invoke the initDBase() method to initialize the database from the Config file.
Method Detail

initDBase

public void initDBase()
Initialize the TSAclDBase instance This will read special User and group information from the config file so that this class can respond correctly to ACVerifier methods. Here is what that part of the config file looks like: TopGroup = Users [Group-Users] jthomas/mypassword wykoff/gumbo toby/fubar Group K57 Group Admin [Group-Admin] Administrator/administrator [Group-K57] daford

getTopGroup

public java.security.acl.Group getTopGroup()
Return a reference to the Top Group in the Group hierarchy

getPrincipal

public java.security.Principal getPrincipal(java.lang.String name)
get Principal

putPrincipal

public void putPrincipal(java.security.Principal principal)
add Principal

exists

public boolean exists(java.security.Principal principal)
Return true if Principal exists

addPrincipalToGroup

public void addPrincipalToGroup(java.lang.String name,
                                java.lang.String group)
                         throws java.lang.IllegalArgumentException
Add a Principal to the specified Group

removePrincipalFromGroup

public void removePrincipalFromGroup(java.lang.String name,
                                     java.lang.String group)
                              throws java.lang.IllegalArgumentException
Remove Principal from Group

readAclDBaseFile

public static TsAclDBase readAclDBaseFile(java.lang.String filename)
readAclDBaseFile will read a file that contains the TsAclDBase object

writeAclDBaseFile

public static void writeAclDBaseFile(java.lang.String filename,
                                     TsAclDBase aclDB)
writeAclDBaseFile will write the AclDBase into a file

readAclDBaseTuple

public static TsAclDBase readAclDBaseTuple(TupleSpace ts)
readAclDBaseTuple will read the TsAclDBase object from the Admin space

readAclDBaseTuple

public static TsAclDBase readAclDBaseTuple(com.ibm.tspaces.server.TS ts)
readAclDBaseTuple will read the TsAclDBase object from the Admin space

writeAclDBaseTuple

public static void writeAclDBaseTuple(TupleSpace ts,
                                      TsAclDBase aclDB)
writeAclDBaseTuple will write the AclDBase to the Admin space

writeAclDBaseTuple

public static void writeAclDBaseTuple(com.ibm.tspaces.server.TS ts,
                                      TsAclDBase aclDB)
writeAclDBaseTuple will write the AclDBase to the Admin space