org.openpermis.cert
Class PolicyAttribute

java.lang.Object
  extended by org.openpermis.cert.PolicyAttribute
All Implemented Interfaces:
Attribute

public class PolicyAttribute
extends Object
implements Attribute

A policy attribute of an attribute certificate contains a permis xml policy.

Since:
0.1.0

Field Summary
private  org.bouncycastle.x509.X509Attribute attribute
           
static String OID
          Policy attribute object identifier of an attribute certificate.
private  String policy
           
 
Constructor Summary
PolicyAttribute(String policy)
          Creates a policy attribute from object.
PolicyAttribute(org.bouncycastle.x509.X509Attribute attribute)
          Creates a policy attribute from X509Attribute.
 
Method Summary
private static String decode(org.bouncycastle.x509.X509Attribute attribute)
           
private static org.bouncycastle.x509.X509Attribute encode(String policy)
           
 org.bouncycastle.x509.X509Attribute getAttribute()
          Returns the attribute.
 String getPolicy()
          Returns the policy stored in this attribute.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

OID

public static final String OID
Policy attribute object identifier of an attribute certificate.

Constant Field Value:
"1.2.826.0.1.3344810.1.1.13"
Since:
0.3.0

policy

private final String policy

attribute

private final org.bouncycastle.x509.X509Attribute attribute
Constructor Detail

PolicyAttribute

public PolicyAttribute(org.bouncycastle.x509.X509Attribute attribute)
                throws org.bouncycastle.util.StreamParsingException
Creates a policy attribute from X509Attribute.

Throws:
org.bouncycastle.util.StreamParsingException - If the policy attribute could not be decoded correctly.
Since:
0.3.0

PolicyAttribute

public PolicyAttribute(String policy)
Creates a policy attribute from object.

Since:
0.3.0
Method Detail

getPolicy

public String getPolicy()
Returns the policy stored in this attribute.

Returns:
the policy stored in this attribute.
Since:
0.1.0

decode

private static String decode(org.bouncycastle.x509.X509Attribute attribute)
                      throws org.bouncycastle.util.StreamParsingException
Throws:
org.bouncycastle.util.StreamParsingException
Since:
0.3.0

encode

private static org.bouncycastle.x509.X509Attribute encode(String policy)
Since:
0.3.0

getAttribute

public org.bouncycastle.x509.X509Attribute getAttribute()
Returns the attribute.

Specified by:
getAttribute in interface Attribute
Returns:
the attribute.
Since:
0.3.0


PERMIS Role Based Access Control 0.4.0 (Build 15)
2009/05/20 08:14:59
Copyright (c) 2002-2007 Ergon Informatik AG