spki
Class AttributeCert

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

public class AttributeCert
extends CertBody

spki AttributeCert class.

Formal definitions:

 <attribute>:: <tag> ;
 <attr-cert>:: "(" "attr-cert" <version>? <cert-display>? <issuer> <subject-attr> <subject-loc>?
 <attribute> <valid> <escrow>? <created>? <comment>? ")" ;
 

Version:
$Id: AttributeCert.java,v 1.9 2002/06/22 10:41:42 tep Exp $
Author:
Tep Narula <tep@win.trlabs.ca>
See Also:
Issuer, SubjectAttribute, LocObj, Tag, Validity, Escrow

Field Summary
private static String __ME
          This class's full name.
private  Tag attribute
          The attribute field.
static String SEXP_NAME
          This class S-Expression type name, used by toSExpression() and other methods.
private  SubjectAttribute 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 AttributeCert()
          Don't use me!
  AttributeCert(Sexp cert_display, Issuer issuer, SubjectAttribute subject, LocObj[] subject_loc, Tag attribute, Validity validity, Escrow escrow, Sexp comment)
          Create an immutable AttributeCert object from given fields.
  AttributeCert(SExpression sexp)
          Create an immutable AttributeCert object from given S-Expression.
 
Method Summary
 Tag getAttribute()
          Get the attribute field.
 Subject getSubject()
          Get the subject field.
 Validity getValidity()
          Get the validity field.
 SExpression toSExpression()
          Build an SExpression representing this object.
 
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 SubjectAttribute subject
The subject field.

validity

private Validity validity
The validity field.

attribute

private Tag attribute
The attribute field.
Constructor Detail

AttributeCert

protected AttributeCert()
                 throws SPKIException
Don't use me!
See Also:
AttributeCert(SExpression), AttributeCert(Sexp,Issuer,SubjectAttribute,LocObj[],Tag,Validity,Escrow,Sexp)

AttributeCert

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

AttributeCert

public AttributeCert(Sexp cert_display,
                     Issuer issuer,
                     SubjectAttribute subject,
                     LocObj[] subject_loc,
                     Tag attribute,
                     Validity validity,
                     Escrow escrow,
                     Sexp comment)
              throws SPKIException
Create an immutable AttributeCert object from given fields.
Parameters:
cert_display - The optional display field, maybe null.
issuer - The issuer field.
subject - The subject field.
subject_loc - The optional subject-info field, maybe null.
attribute - The attribute 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()
                   throws SPKIException
Get the subject field. If the subj-obj is a relative name, it'd create and return a new SubjectAttribute object with a local name, anchored by the issuer's principal, as subj-obj. Otherwise, the subject field is return as is.
Overrides:
getSubject in class CertBody
See Also:
SubjectAttribute

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.

getAttribute

public Tag getAttribute()
Get the attribute field.
Returns:
a Tag object.