XGTRBAC
Class CredType

java.lang.Object
  extended by XGTRBAC.CredType

public class CredType
extends java.lang.Object

This class contains methods and members for maintaining credential type definitions. It is instantiated primarily in User class (addCredType method).


Nested Class Summary
 class CredType.Attribute
          An inner "Attribute" class *
 class CredType.Header
          An inner "Header" class *
 
Field Summary
private  java.util.LinkedList AttributeList
           
private  CredType.Header CredHeader
           
private  java.lang.String CredTypeId
           
private  java.lang.String CredTypeName
           
 
Constructor Summary
CredType(java.lang.String ct_id)
          Creates a new instance of CredType
 
Method Summary
 int addAttribute(java.lang.String attr_name)
          Adds a new attribute to the AttributeList
 CredType.Attribute getAttribute(java.lang.String attr_name)
          Returns the attribute of a credential type
 int getAttributeCount()
          Returns the number of attributes of a credential type
 java.lang.String getAttributeName(int index)
          Returns the name of the attribute
 java.lang.String getAttributeValue(int index)
          Returns the value of the attribute
 CredType.Header getCredHeader()
          Returns the header of this credential
 java.lang.String getCredTypeId()
          Returns the id of a credential type
 java.lang.String getCredTypeName()
          Returns the name of a credential type
 void setAttributeValue(java.lang.String attr_name, java.lang.String attr_value)
          Sets the value of the attribute
 void setCredTypeName(java.lang.String ct_name)
          Sets the name of a credential type
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CredTypeId

private java.lang.String CredTypeId

CredTypeName

private java.lang.String CredTypeName

CredHeader

private CredType.Header CredHeader

AttributeList

private java.util.LinkedList AttributeList
Constructor Detail

CredType

public CredType(java.lang.String ct_id)
Creates a new instance of CredType

Method Detail

getCredTypeId

public java.lang.String getCredTypeId()
Returns the id of a credential type

Returns:
The credential type id as String

getCredTypeName

public java.lang.String getCredTypeName()
Returns the name of a credential type

Returns:
The credential type name as String

setCredTypeName

public void setCredTypeName(java.lang.String ct_name)
Sets the name of a credential type

Parameters:
ct_name - The credential type name supplied as String

getCredHeader

public CredType.Header getCredHeader()
Returns the header of this credential

Returns:
The header object as Header

getAttributeCount

public int getAttributeCount()
Returns the number of attributes of a credential type

Returns:
The attribute count as int

getAttributeName

public java.lang.String getAttributeName(int index)
Returns the name of the attribute

Parameters:
index - The integer index of the attribute in the AttributeList
Returns:
The attribute name as String

getAttributeValue

public java.lang.String getAttributeValue(int index)
Returns the value of the attribute

Parameters:
index - The integer index of the attribute in the AttributeList
Returns:
The attribute value as String

setAttributeValue

public void setAttributeValue(java.lang.String attr_name,
                              java.lang.String attr_value)
Sets the value of the attribute

Parameters:
attr_name - The name of the attribute supplied as String
attr_value - The value of the attribute supplied as String

getAttribute

public CredType.Attribute getAttribute(java.lang.String attr_name)
Returns the attribute of a credential type

Parameters:
attr_name - The attribute name supplied as String
Returns:
The attribute object as Attribute

addAttribute

public int addAttribute(java.lang.String attr_name)
Adds a new attribute to the AttributeList

Parameters:
attr_name - Name of the attribute supplied as String
Returns:
Integer representing state of the operation