edu.stanford.rt.credential
Class RoleTerm

java.lang.Object
  |
  +--edu.stanford.rt.credential.RoleTerm

public class RoleTerm
extends java.lang.Object

Author:
Ninghui Li, Sandra Qiu
Implementation of RoleTerm element. Each RoleTerm object has a reference to its corresponding RoleDeclaration object and stores its parameter values, if any.

Field Summary
private  ValueSet[] paramValues
           
private  RoleDeclaration roleDeclaration
           
 
Constructor Summary
RoleTerm(RoleDeclaration roleDeclaration)
          Constructor for RoleTerm.
 
Method Summary
 DataType getParameterType(java.lang.String parameterName)
          Method getParameterType.
 ValueSet getParameterValue(java.lang.String prefix)
          Method getParameterValue.
 ValueSet getParameterValueAt(int index)
          Method getParameterValueAt.
 RoleDeclaration getRoleDeclaration()
          Returns the roleDeclaration.
 boolean isParameterValueNull(ValueSet paramValue)
          Method isParameterValueNull.
 void putParameterValue(java.lang.String prefix, ValueSet parameterValue)
          Method putParameterValue.
 java.lang.String toString(java.lang.String indent)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

roleDeclaration

private RoleDeclaration roleDeclaration

paramValues

private ValueSet[] paramValues
Constructor Detail

RoleTerm

public RoleTerm(RoleDeclaration roleDeclaration)
Constructor for RoleTerm.

Parameters:
roleDeclaration - corresponding role declaration.
Method Detail

getRoleDeclaration

public RoleDeclaration getRoleDeclaration()
Returns the roleDeclaration.

Returns:
RoleDeclaration The corresonding role decalration for this role term.

putParameterValue

public void putParameterValue(java.lang.String prefix,
                              ValueSet parameterValue)
Method putParameterValue. puts parameter value according to the position of the its prefix.

Parameters:
prefix - the parameter prefix
parameterValue - the parameter value

getParameterValue

public ValueSet getParameterValue(java.lang.String prefix)
Method getParameterValue.

Parameters:
prefix -
Returns:
ValueSet

getParameterValueAt

public ValueSet getParameterValueAt(int index)
Method getParameterValueAt.

Parameters:
index -
Returns:
ValueSet

getParameterType

public DataType getParameterType(java.lang.String parameterName)
                          throws DomainSpecException
Method getParameterType.

Parameters:
parameterName -
Returns:
DataType
Throws:
DomainSpecException

toString

public java.lang.String toString(java.lang.String indent)

isParameterValueNull

public boolean isParameterValueNull(ValueSet paramValue)
Method isParameterValueNull. checks if the parameter value is null. It can be null when the parameter has Equals or Special Principal child element.

Parameters:
paramValue -
Returns:
boolean