namespace Akenti class Attribute : public AkentiObject

An attribute consists of a name, a value, and one or more issuers

Inheritance:


Public Methods

Attribute ()
Default Constrictor
Attribute (const string& name, const string& value, const DistinguishedName& ca)
Constructs an X509 attribute
Attribute (const string& name, const string& value, const vector<DistinguishedName>& cas)
Constructs an X509 attribute
Attribute (const string& name, const string& value, const AkentiPrincipal& issuer)
Constructs a generic attribute
Attribute (const string& name, const string& value, const vector<AkentiPrincipal>& issuers)
Constructs a generic attribute
bool operator== (const Attribute& attribute) const
Return true if this object is equal to the Attribute object specified by attribute
const string& getName () const
Returns the name of this attribute
const string& getValue () const
Returns the value of this attribute
bool isX509Attribute () const
Returns true if this is an X509 attribute
const vector <AkentiPrincipal> & getIssuers () const
Return the issuers of this generic attribute
const vector <DistinguishedName> & getCAS () const
Return the cas of this x509 attribute
int numOfIssuers () const
Returns the number of issuers
void writeObject (AkentiOutputStream& drain) const
Writes this object to the AkentiOutputStream object specified by drain
void readObject (AkentiInputStream& source)
Reads this from an AkentiInputStream object specified by source
string paramString () const
Used for debugging

Documentation

An attribute consists of a name, a value, and one or more issuers. A generic attribute has at least one issuer while an X509 attribute has only one issuer.
Attribute {
bool isX509;  
string name;  
string value; 
vector cas;   // used for X509 attributes  
vector issuers; // used for generic attributes
} 

The writeObject output is: 

For a generic attribute:   
0 name value size issuers[0] ... issuers[size-1]  

For an X509 attribute: 
1 name value size cas[0]...cas[size-1]  

Attribute()
Default Constrictor

Attribute(const string& name, const string& value, const DistinguishedName& ca)
Constructs an X509 attribute.
Throws:
ParsingException if unable to parse the ca
Error if name or value are empty strings
Parameters:
name - string name of this attribute
value - string value of this attribute
ca - string ca of this attribute
See Also:
DistinguishedName
ParsingException
Error

Attribute(const string& name, const string& value, const vector<DistinguishedName>& cas)
Constructs an X509 attribute.
Throws:
Error if name or value are empty strings
Parameters:
name - string name of this attribute
value - string value of this attribute
ca - DistinguishedName ca of this attribute
See Also:
DistinguishedName
Error

Attribute(const string& name, const string& value, const AkentiPrincipal& issuer)
Constructs a generic attribute.
Throws:
Error if name or value are empty strings
Parameters:
name - string name of this attribute
value - string value of this attribute
issuer - AkentiPrincipal issuer of this attribute
See Also:
AkentiPrincipal
Error

Attribute(const string& name, const string& value, const vector<AkentiPrincipal>& issuers)
Constructs a generic attribute.
Throws:
Error if name or value are empty strings
Error if the issuers' size is equal to zero
Parameters:
name - string name of this attribute
value - string value of this attribute
issuers - vectorAkentiPrincipal> a list of issuers of this attribute
See Also:
AkentiPrincipal
Error

bool operator==(const Attribute& attribute) const
Return true if this object is equal to the Attribute object specified by attribute.
Returns:
true if equal, false otherwise

const string& getName() const
Returns the name of this attribute.
Returns:
name of attribute

const string& getValue() const
Returns the value of this attribute.
Returns:
value of attribute

bool isX509Attribute() const
Returns true if this is an X509 attribute.
Returns:
true if this an X509 attribute, false otherwise.

const vector <AkentiPrincipal> & getIssuers() const
Return the issuers of this generic attribute.
Throws:
Error if this is an X509 attribute
Returns:
the issuers of this attribute
See Also:
getIssuer

const vector <DistinguishedName> & getCAS() const
Return the cas of this x509 attribute.
Throws:
Error if this is a generic attribute
Returns:
the issuer of this attribute
See Also:
getIssuers

int numOfIssuers() const
Returns the number of issuers.
Returns:
the number of issuers

void writeObject(AkentiOutputStream& drain) const
Writes this object to the AkentiOutputStream object specified by drain.
Throws:
IOException if writing fails
Parameters:
drain - AkentiOutputStream used to write this object
See Also:
AkentiObject
AkentiOutputStream
IOException

void readObject(AkentiInputStream& source)
Reads this from an AkentiInputStream object specified by source.
Throws:
Error if have no issuers
IOException if reading from AkentiInputStream fails
ParsingException if parsing distinguished name fails
Parameters:
source - An AkentiInputStream
See Also:
AkentiObject
AkentiInputStream
DistinguishedName
Error
ParsingException
IOException

string paramString() const
Used for debugging.
Returns:
a string representation of this attribute


This class has no child classes.
Author:
Srilekha Mudumbai Abdelilah Essiari Xiang Sun
Version:
1.1 00/05/01
See Also:
AkentiObject
AkentiPrincipal
DistinguishedName

alphabetic index hierarchy of classes


this page has been generated automatically by doc++

(c)opyright by Malte Zöckler, Roland Wunderling
contact: doc++@zib.de