edu.stanford.rt.credential
Class ApplicationDomain

java.lang.Object
  |
  +--edu.stanford.rt.credential.DomainSpecification
        |
        +--edu.stanford.rt.credential.ApplicationDomain

public class ApplicationDomain
extends DomainSpecification

Author:
Ninghui Li, Sandra Qiu
Implementation of ApplicationDomain element.

Field Summary
private  boolean isSystemDomain
          A flag indicates whether this domain is the built-in system one.
private  java.lang.String uri
          Attribute uri (required).
 
Fields inherited from class edu.stanford.rt.credential.DomainSpecification
 
Constructor Summary
ApplicationDomain(java.lang.String uri, boolean isSystemDomain, RTContext context)
          Constructor for ApplicationDomain.
 
Method Summary
 java.lang.String getUri()
          Method getUri.
 RoleDeclaration lookupRoleDeclaration(java.lang.String roleName)
          Method lookupRoleDeclaration.
 DataType lookupType(java.lang.String typeName)
          Method lookupType.
 void setHashID(HashID hashID)
          Sets the hashID.
 java.lang.String toString(java.lang.String indent)
           
 
Methods inherited from class edu.stanford.rt.credential.DomainSpecification
addRole, addType, addType, getContext, getHashID, getImportedDomains, getPrincipalType, getRoleDeclarations, getTypeDeclarations, importDomain, isComplete, lookupImportedDomain, lookupRoleDeclaration, lookupType, setComplete, setPrincipalType
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

uri

private java.lang.String uri
Attribute uri (required).


isSystemDomain

private boolean isSystemDomain
A flag indicates whether this domain is the built-in system one.

Constructor Detail

ApplicationDomain

public ApplicationDomain(java.lang.String uri,
                         boolean isSystemDomain,
                         RTContext context)
                  throws DomainSpecException
Constructor for ApplicationDomain.

Parameters:
uri -
isSystemDomain -
context -
Throws:
DomainSpecException
Method Detail

getUri

public java.lang.String getUri()
Method getUri.

Returns:
String

lookupType

public DataType lookupType(java.lang.String typeName)
                    throws DomainSpecException
Method lookupType. Look up the DataType declaration by given typeName in the current domain. If cannot find one and this domain is not system domain, then look up in the system domain.

Overrides:
lookupType in class DomainSpecification
Parameters:
typeName -
Returns:
DataType
Throws:
DomainSpecException - if cannot find a DataType declaration by the given name.

lookupRoleDeclaration

public RoleDeclaration lookupRoleDeclaration(java.lang.String roleName)
                                      throws DomainSpecException
Method lookupRoleDeclaration. Look up the role declaration by given roleName in the current domain. If cannot find one and this domain is not system domain, then look it up in system domain.

Overrides:
lookupRoleDeclaration in class DomainSpecification
Parameters:
roleName -
Returns:
RoleDeclaration
Throws:
DomainSpecException - if cannot find one.

toString

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

setHashID

public void setHashID(HashID hashID)
               throws DomainSpecException
Description copied from class: DomainSpecification
Sets the hashID.

Overrides:
setHashID in class DomainSpecification
Parameters:
hashID - The hashID to set
DomainSpecException