org.globus.ogsa.impl.base.cas.server.databaseAccess.accessors
Class PolicyDataHandler

java.lang.Object
  extended byorg.globus.ogsa.impl.base.cas.server.databaseAccess.accessors.PolicyDataHandler

public class PolicyDataHandler
extends java.lang.Object

Used to manipulate PolicyData in the database


Constructor Summary
PolicyDataHandler()
           
 
Method Summary
static java.util.Vector constructPolicyData(java.sql.ResultSet resultSet, boolean external)
           
static void deleteObject(java.lang.String policyId)
          Remove policy table entry from database - (revoke rights) Manipulates only policy table
static void deletePolicyForObject(java.lang.String objectSpec, java.lang.String objectSpecDesc)
           
static java.lang.String getObjectSpecString(CasObjectData objSpec, java.lang.String objectSpecDesc)
           
static java.lang.String getPolicyId(PolicyData policyObj)
           
static PolicyData grant(java.lang.String userGroupName, java.lang.String objSpec, java.lang.String objSpecDesc, java.lang.String actionSpec, java.lang.String actionSpecDesc)
          Store the policy represented by the given parameters Construct the policy object and store
static PolicyData grantObject(java.lang.String userGroupName, CasObjectData objSpec, java.lang.String objSpecDesc, java.lang.String actionSpec, java.lang.String actionSpecDesc)
          Store the policy represented by the given parameters Construct the policy object and store Does not handle serviceActionGp as spec
static java.lang.String[] list()
          List of all Policy Data
 boolean policyObjectExists(PolicyData policyData)
          Returns true if policy object exists in the table This is *not* a permission query and does not have any semantic ramifications
static void printPolicyVector(java.util.Vector policies)
           
static CasObjectData retrieveObject(java.lang.String policyId)
           
static java.lang.String storeObject(PolicyData policyData)
          Store the policy data object - (grant of rights) Manipulates only the policy_table in the database
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PolicyDataHandler

public PolicyDataHandler()
Method Detail

storeObject

public static java.lang.String storeObject(PolicyData policyData)
                                    throws CasDBException
Store the policy data object - (grant of rights) Manipulates only the policy_table in the database

Throws:
CasDBException

getPolicyId

public static java.lang.String getPolicyId(PolicyData policyObj)
                                    throws CasDBException
Throws:
CasDBException

list

public static java.lang.String[] list()
                               throws CasDBException
List of all Policy Data

Throws:
CasDBException

retrieveObject

public static CasObjectData retrieveObject(java.lang.String policyId)
                                    throws CasDBException
Throws:
CasDBException

deleteObject

public static void deleteObject(java.lang.String policyId)
                         throws CasDBException
Remove policy table entry from database - (revoke rights) Manipulates only policy table

Throws:
CasDBException

policyObjectExists

public boolean policyObjectExists(PolicyData policyData)
                           throws CasDBException
Returns true if policy object exists in the table This is *not* a permission query and does not have any semantic ramifications

Throws:
CasDBException

grantObject

public static PolicyData grantObject(java.lang.String userGroupName,
                                     CasObjectData objSpec,
                                     java.lang.String objSpecDesc,
                                     java.lang.String actionSpec,
                                     java.lang.String actionSpecDesc)
                              throws CasDBException
Store the policy represented by the given parameters Construct the policy object and store Does not handle serviceActionGp as spec

Throws:
CasDBException

grant

public static PolicyData grant(java.lang.String userGroupName,
                               java.lang.String objSpec,
                               java.lang.String objSpecDesc,
                               java.lang.String actionSpec,
                               java.lang.String actionSpecDesc)
                        throws CasDBException
Store the policy represented by the given parameters Construct the policy object and store

Throws:
CasDBException

getObjectSpecString

public static java.lang.String getObjectSpecString(CasObjectData objSpec,
                                                   java.lang.String objectSpecDesc)
                                            throws CasDBException
Throws:
CasDBException

deletePolicyForObject

public static void deletePolicyForObject(java.lang.String objectSpec,
                                         java.lang.String objectSpecDesc)
                                  throws CasDBException
Throws:
CasDBException

constructPolicyData

public static java.util.Vector constructPolicyData(java.sql.ResultSet resultSet,
                                                   boolean external)
                                            throws CasDBException
Throws:
CasDBException

printPolicyVector

public static void printPolicyVector(java.util.Vector policies)