eu.xtreemos.xosd.security.vops.xacml.request.attributes
Class ResourceCertAttr

java.lang.Object
  extended by eu.xtreemos.xosd.security.vops.xacml.request.attributes.Attributes
      extended by eu.xtreemos.xosd.security.vops.xacml.request.attributes.ResourceAttr
          extended by eu.xtreemos.xosd.security.vops.xacml.request.attributes.ResourceCertAttr
All Implemented Interfaces:
IAttributes

public class ResourceCertAttr
extends ResourceAttr

Extractor of the resource certificate attributes and attribute extensions.

Author:
ales.cernivec@xlab.si

Field Summary
private static java.lang.String pathToCert
           
 
Fields inherited from class eu.xtreemos.xosd.security.vops.xacml.request.attributes.Attributes
attributes
 
Constructor Summary
ResourceCertAttr(java.security.cert.X509Certificate cert)
           
 
Method Summary
 void initializeAttributes(java.lang.Object source)
          Initializes attributes from source (e.g. certificate, arraylist or some other object.
static void main(java.lang.String[] args)
          Test the ResourceCertAttr extractor: see this#pathToCert} - set the path to appropriate value!
static java.util.ArrayList<com.sun.xacml.ctx.Attribute> obtainAttributes(java.security.cert.X509Certificate cert)
          Obtains attributes from resource certificate (node certificate).
 
Methods inherited from class eu.xtreemos.xosd.security.vops.xacml.request.attributes.ResourceAttr
addAttribute, addAttributes, combineAttributes, getAttributes
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

pathToCert

private static final java.lang.String pathToCert
See Also:
Constant Field Values
Constructor Detail

ResourceCertAttr

public ResourceCertAttr(java.security.cert.X509Certificate cert)
                 throws java.lang.Exception
Throws:
java.lang.Exception
Method Detail

initializeAttributes

public void initializeAttributes(java.lang.Object source)
                          throws java.lang.Exception
Description copied from interface: IAttributes
Initializes attributes from source (e.g. certificate, arraylist or some other object.

If object is not instance of expected class, an exception is thrown.

Specified by:
initializeAttributes in interface IAttributes
Overrides:
initializeAttributes in class ResourceAttr
Throws:
java.lang.Exception

obtainAttributes

public static java.util.ArrayList<com.sun.xacml.ctx.Attribute> obtainAttributes(java.security.cert.X509Certificate cert)
                                                                         throws java.lang.Exception
Obtains attributes from resource certificate (node certificate).

Parameters:
cert - X509Certificate certificate
Returns:
attrs an array of Attribute
Throws:
{@link - UnknownOIDException}
java.lang.Exception

main

public static void main(java.lang.String[] args)
                 throws java.lang.Exception
Test the ResourceCertAttr extractor: see this#pathToCert} - set the path to appropriate value!

Parameters:
args -
Throws:
java.lang.Exception