org.fcrepo.server.security.xacml.pdp.decorator
Class PolicyObject

java.lang.Object
  extended by org.fcrepo.server.security.xacml.pdp.decorator.PolicyObject

public class PolicyObject
extends Object

Wrapper for a FeSL XACML policy stored as a Fedora digital object. Contains method for determining whether or not this is a digital object that represents an active FeSL XACML policy. Only objects that have a policy datastream which is active within an active object are deemed to be active policies.

Version:
$Id$
Author:
Stephen Bayliss

Field Summary
static String POLICY_DATASTREAM
           
 
Constructor Summary
PolicyObject(DOManager manager, Context context, String pid, String objectState, String dsID, String dsState)
          Create a new PolicyObject, initialising the object based on the supplied parameters.
 
Method Summary
 InputStream getDsContent()
          get the policy datastream content
 boolean hasPolicyDatastream()
          determines if this object contains a policy datastream
 boolean isDatastreamActive()
          determines if the policy datastream in this object is active
 boolean isObjectActive()
          determines if this digital object is active
 boolean isPolicyActive()
          determines if this object represents an active FeSL policy
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

POLICY_DATASTREAM

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

PolicyObject

public PolicyObject(DOManager manager,
                    Context context,
                    String pid,
                    String objectState,
                    String dsID,
                    String dsState)
Create a new PolicyObject, initialising the object based on the supplied parameters. Parameters are the same parameters that are generally supplied to API-M methods. Parameters therefore represent "already-known" information about the policy object (after the API-M method succeeded).

Parameters:
manager -
context -
pid -
objectState -
dsID -
dsState -
Method Detail

isPolicyActive

public boolean isPolicyActive()
                       throws ServerException
determines if this object represents an active FeSL policy

Returns:
Throws:
ServerException

isObjectActive

public boolean isObjectActive()
                       throws ServerException
determines if this digital object is active

Returns:
Throws:
ServerException

isDatastreamActive

public boolean isDatastreamActive()
                           throws ServerException
determines if the policy datastream in this object is active

Returns:
Throws:
ServerException

hasPolicyDatastream

public boolean hasPolicyDatastream()
                            throws ServerException
determines if this object contains a policy datastream

Returns:
Throws:
ServerException

getDsContent

public InputStream getDsContent()
                         throws ServerException
get the policy datastream content

Returns:
Throws:
ServerException


Copyright © 2012 DuraSpace. All Rights Reserved.