org.opensciencegrid.authz.saml
Class XACMLObligation

java.lang.Object
  extended byorg.opensaml.SAMLObject
      extended byorg.opensciencegrid.authz.saml.XACMLObligation
All Implemented Interfaces:
java.lang.Cloneable

public class XACMLObligation
extends org.opensaml.SAMLObject
implements java.lang.Cloneable

Basic XACMLObligation implementation that can hold rudimentary attribute values

The current implementation supports only a single attribute assignment per obligation object.

Author:
Markus Lorch based on code examples from the OpenSAML project

Field Summary
protected  java.lang.String attributeId
          Attribute ID
protected  java.lang.String datatype
          Dataype of the attribute
protected  java.lang.String fullfillOn
          FullFillOn Attribute
protected  java.lang.String obligationId
          ObligationID
protected  java.lang.String value
          Attribute Value
 
Fields inherited from class org.opensaml.SAMLObject
config, root
 
Constructor Summary
XACMLObligation()
          creates and empty (uninitialized) XACMLObligation objext
XACMLObligation(org.w3c.dom.Element e)
          Reconstructs an XACML Obligation from a DOM tree
XACMLObligation(java.io.InputStream in)
          Reconstructs an XACML Obligation from a stream
XACMLObligation(java.lang.String obligationId, java.lang.String fullfillOn, java.lang.String attributeId, java.lang.String datatype, java.lang.String value)
          Builds an XACML Obligation
 
Method Summary
 java.lang.Object clone()
          Copies a SAML object such that no dependencies exist between the original and the copy
 void fromDOM(org.w3c.dom.Element e)
          Initialization of obligation from a DOM element.
 java.lang.String getAttributeId()
           
 java.lang.String getDatatype()
           
 java.lang.String getFullfillOn()
           
 java.lang.String getObligationId()
           
 java.lang.String getValue()
           
 org.w3c.dom.Node toDOM(org.w3c.dom.Document doc)
          Overridden method to return a DOM tree representing the attribute
 
Methods inherited from class org.opensaml.SAMLObject
checkValidity, fromStream, plantRoot, toBase64, toDOM, toDOM, toDOM, toStream, toString
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

obligationId

protected java.lang.String obligationId
ObligationID


fullfillOn

protected java.lang.String fullfillOn
FullFillOn Attribute


attributeId

protected java.lang.String attributeId
Attribute ID


datatype

protected java.lang.String datatype
Dataype of the attribute


value

protected java.lang.String value
Attribute Value

Constructor Detail

XACMLObligation

public XACMLObligation(java.lang.String obligationId,
                       java.lang.String fullfillOn,
                       java.lang.String attributeId,
                       java.lang.String datatype,
                       java.lang.String value)
                throws org.opensaml.SAMLException
Builds an XACML Obligation

Parameters:
obligationId - Name of the obligation
fullfillOn - the fullfillOn property ("Permit", "Deny")
attributeId - the attribute name
value - the attribute value
Throws:
org.opensaml.SAMLException - Thrown if obligation cannot be built from the supplied information

XACMLObligation

public XACMLObligation()
creates and empty (uninitialized) XACMLObligation objext


XACMLObligation

public XACMLObligation(org.w3c.dom.Element e)
                throws org.opensaml.SAMLException
Reconstructs an XACML Obligation from a DOM tree

Parameters:
e - The root of a DOM tree
Throws:
org.opensaml.SAMLException - Thrown if the object cannot be constructed

XACMLObligation

public XACMLObligation(java.io.InputStream in)
                throws org.opensaml.SAMLException
Reconstructs an XACML Obligation from a stream

Parameters:
in - A stream containing XML
Throws:
org.opensaml.SAMLException - Raised if an exception occurs while constructing the object.
Method Detail

fromDOM

public void fromDOM(org.w3c.dom.Element e)
             throws org.opensaml.SAMLException
Initialization of obligation from a DOM element.

Parameters:
e - Root element of a DOM tree
Throws:
org.opensaml.SAMLException - Raised if an exception occurs while constructing the object.

toDOM

public org.w3c.dom.Node toDOM(org.w3c.dom.Document doc)
                       throws org.opensaml.SAMLException
Overridden method to return a DOM tree representing the attribute

Parameters:
doc - A Document object to use in manufacturing the tree
Returns:
Root "Attribute" element of a DOM tree
Throws:
org.opensaml.SAMLException

clone

public java.lang.Object clone()
                       throws java.lang.CloneNotSupportedException
Copies a SAML object such that no dependencies exist between the original and the copy

Returns:
The new object
Throws:
java.lang.CloneNotSupportedException
See Also:
Object.clone()

getObligationId

public java.lang.String getObligationId()

getFullfillOn

public java.lang.String getFullfillOn()

getAttributeId

public java.lang.String getAttributeId()

getDatatype

public java.lang.String getDatatype()

getValue

public java.lang.String getValue()


Copyright © 2004-2005 BNL siteAAA. All Rights Reserved.