spki
Class RoleCert

java.lang.Object
  |
  +--spki.BaseObj
        |
        +--spki.CertBody
              |
              +--spki.RoleCert

public class RoleCert
extends CertBody

spki RoleCert class.

Formal definitions:

 <role>:: "(" "role" <relative-name> ")" ;
 <role-cert>:: "(" "role-cert" <version>? <cert-display>? <issuer> <issuer-loc>? <subject-role> <subject-loc>?
 <empowerment> <role> <valid> <escrow>? <created>? <comment>? ")" ;
 

Version:
$Id: RoleCert.java,v 1.11 2002/06/22 10:41:42 tep Exp $
Author:
Tep Narula <tep@win.trlabs.ca>
See Also:
Issuer, LocObj, SubjectRole, Empowerment, RelativeName, Escrow

Field Summary
private static String __ME
          This class's full name.
private  Empowerment empowerment
          The empowerment field.
private  RelativeName role
          The role field.
static String ROLE_SEXP_NAME
          The role field S-Expression type name.
static String SEXP_NAME
          This class S-Expression type name, used by toSExpression() and other methods.
private  SubjectRole subject
          The subject field.
private  Validity validity
          The validity field.
 
Fields inherited from class spki.CertBody
__ME, cert_display, CERT_DISPLAY_SEXP_NAME, comment, COMMENT_SEXP_NAME, created, CREATED_SEXP_NAME, escrow, issuer, issuer_loc, ISSUER_LOC_SEXP_NAME, SEXP_NAME, subject_loc, SUBJECT_LOC_SEXP_NAME, version, VERSION, VERSION_SEXP_NAME
 
Fields inherited from class spki.BaseObj
__ME, cache_sexp, cached_sexp, DEFAULT_HASH_ALG, locked, SEXP_NAME
 
Constructor Summary
protected RoleCert()
          Don't use me!
  RoleCert(Sexp cert_display, Issuer issuer, LocObj[] issuer_loc, SubjectRole subject, LocObj[] subject_loc, Empowerment empowerment, RelativeName role, Validity validity, Escrow escrow, Sexp comment)
          Create an immutable RoleCert object from given fields.
  RoleCert(SExpression sexp)
          Create an immutable RoleCert object from given S-Expression.
 
Method Summary
 Empowerment getEmpowerment()
          Get the empowerment field.
 LocalName getRole()
          Get the role field.
 Subject getSubject()
          Get the subject field.
 Validity getValidity()
          Get the validity field.
 SExpression toSExpression()
          Build an SExpression representing this object.
(package private)  void verify()
           
 
Methods inherited from class spki.CertBody
buildCertDisplaySExpression, buildCommentSExpression, buildCreatedSExpression, buildIssuerLocSExpression, buildSubjectLocSExpression, buildVersionSExpression, getCertDisplay, getComment, getCreated, getEscrow, getInstance, getIssuer, getIssuerLoc, getIssuerLocLength, getSubjectLoc, getSubjectLocLength, isCertBody, setCreated
 
Methods inherited from class spki.BaseObj
disableSExpressionCaching, enableSExpressionCaching, extractHashAlgId, getCachedSExpression, isLocked, isSListOfType, lock, providerToSPKI, setCachedSExpression, spkiToProvider, toString
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, wait, wait, wait
 

Field Detail

__ME

private static final String __ME
This class's full name.

SEXP_NAME

public static final String SEXP_NAME
This class S-Expression type name, used by toSExpression() and other methods.
See Also:
toSExpression()

subject

private SubjectRole subject
The subject field.

validity

private Validity validity
The validity field.

empowerment

private Empowerment empowerment
The empowerment field.

ROLE_SEXP_NAME

public static final String ROLE_SEXP_NAME
The role field S-Expression type name.

role

private RelativeName role
The role field.
Constructor Detail

RoleCert

protected RoleCert()
            throws SPKIException
Don't use me!
See Also:
RoleCert(SExpression), RoleCert(Sexp,Issuer,LocObj[],SubjectRole,LocObj[],Empowerment,RelativeName,Validity,Escrow,Sexp)

RoleCert

public RoleCert(SExpression sexp)
         throws ParseException,
                SPKIException
Create an immutable RoleCert object from given S-Expression.
See Also:
CertBody.CertBody(SExpression)

RoleCert

public RoleCert(Sexp cert_display,
                Issuer issuer,
                LocObj[] issuer_loc,
                SubjectRole subject,
                LocObj[] subject_loc,
                Empowerment empowerment,
                RelativeName role,
                Validity validity,
                Escrow escrow,
                Sexp comment)
         throws SPKIException
Create an immutable RoleCert object from given fields.
Parameters:
cert_display - The optional display field, maybe null.
issuer - The issuer field.
issuer_loc - The optional issuer-info, maybe null.
subject - The subject field.
subject_loc - The optional subject-info field, maybe null.
empowerment - The empowerment field.
role - The role field.
validity - The validity field.
escrow - The optional escrow field, maybe null.
comment - The optional comment field, maybe null.
Throws:
SPKIException - if something went wrong.
See Also:
CertBody.CertBody(Sexp,Issuer,LocObj[],LocObj[],Escrow,Sexp)
Method Detail

toSExpression

public SExpression toSExpression()
                          throws SPKIException
Description copied from interface: SPKIObject
Build an SExpression representing this object.
Overrides:
toSExpression in class BaseObj
Tags copied from interface: SPKIObject
Returns:
SExpression object representing this object, or null.
Throws:
SPKIException - if something went wrong during conversion.

getSubject

public Subject getSubject()
Description copied from class: CertBody
Get the subject field.
Overrides:
getSubject in class CertBody
Tags copied from class: CertBody
Returns:
a Subject object.
Throws:
SPKIException - if something went wrong.

getValidity

public Validity getValidity()
Description copied from class: CertBody
Get the validity field.
Overrides:
getValidity in class CertBody
Tags copied from class: CertBody
Returns:
a Validity object.

getEmpowerment

public Empowerment getEmpowerment()
Get the empowerment field.
Returns:
an Empowerment object.

getRole

public LocalName getRole()
                  throws SPKIException
Get the role field. It builds a LocalName object from the issuer's principal and the role field to represent the issuer-defined role.
Returns:
a LocalName object.
Throws:
SPKIException - if something went wrong.

verify

void verify()
      throws SPKIException