org.openpermis.cert
Class RoleAttribute

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

public class RoleAttribute
extends Object
implements Attribute

A role attribute of an attribute certificate contains permis roles.

Since:
0.1.0

Nested Class Summary
static class RoleAttribute.RoleDefinition
           
 
Field Summary
private  org.bouncycastle.x509.X509Attribute attribute
           
static String OID
          Role attribute object identifier of an attribute certificate.
private  List<RoleAttribute.RoleDefinition> roles
           
 
Constructor Summary
RoleAttribute(List<RoleAttribute.RoleDefinition> roles)
          Creates a policy attribute from a list of roles.
RoleAttribute(org.bouncycastle.x509.X509Attribute attribute)
          Creates a role attribute from a X509Attribute.
 
Method Summary
private static List<RoleAttribute.RoleDefinition> decode(org.bouncycastle.x509.X509Attribute attribute)
           
private static org.bouncycastle.x509.X509Attribute encode(List<RoleAttribute.RoleDefinition> roles)
           
 org.bouncycastle.x509.X509Attribute getAttribute()
          Returns the attribute.
 List<RoleAttribute.RoleDefinition> getRoles()
          Returns all roles 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
Role attribute object identifier of an attribute certificate.

Constant Field Value:
"1.2.826.0.1.3344810.1.1.14"
Since:
0.3.0

roles

private final List<RoleAttribute.RoleDefinition> roles

attribute

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

RoleAttribute

public RoleAttribute(org.bouncycastle.x509.X509Attribute attribute)
              throws org.bouncycastle.util.StreamParsingException
Creates a role attribute from a X509Attribute.

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

RoleAttribute

public RoleAttribute(List<RoleAttribute.RoleDefinition> roles)
Creates a policy attribute from a list of roles.

Since:
0.3.0
Method Detail

getRoles

public List<RoleAttribute.RoleDefinition> getRoles()
Returns all roles stored in this attribute.

Returns:
all roles stored in this attribute.
Since:
0.1.0

decode

private static List<RoleAttribute.RoleDefinition> 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(List<RoleAttribute.RoleDefinition> roles)
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