|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--edu.stanford.rt.credential.DomainSpecification
ApplicationDomain
or
a CredentialDomain
. The info includes the following:
principal type, imported application domains, type declarations,
role declarations, hash id, RTML context, and the parsing status.Field Summary | |
private boolean |
completeState
A flag indicates the parsing status of the domain. |
private RTContext |
context
RTML Context |
private HashID |
hashID
The hash value of the domain. |
private OrderedMap |
importedDomains
Stores all imported domains in this domain, mapping string (domain name) to ApplicationDomain object. |
private SimpleType |
principalType
Principal type |
private OrderedMap |
roleDeclarations
Stores all role declarations in this domain, mapping string(role name) to role declaration object. |
private OrderedMap |
typeDeclarations
Stores all type decalarations in this domain, mapping string(type name) to type declaration object. |
Constructor Summary | |
(package private) |
DomainSpecification(RTContext context)
Constuctor for DomainSpecification. |
Method Summary | |
void |
addRole(RoleDeclaration role)
Method addRole. |
void |
addType(DataType type)
Method addType. |
void |
addType(java.lang.String typeName)
Method addType. |
RTContext |
getContext()
Method getContext. |
HashID |
getHashID()
Returns the hashID. |
OrderedMap |
getImportedDomains()
Method getImportedDomains. |
SimpleType |
getPrincipalType()
Method getPrincipalType. |
OrderedMap |
getRoleDeclarations()
Method getRoleDeclarations. |
OrderedMap |
getTypeDeclarations()
Method getTypeDeclarations. |
void |
importDomain(java.lang.String name,
ApplicationDomain spec)
Method importDomain. |
boolean |
isComplete()
Method isComplete. |
DomainSpecification |
lookupImportedDomain(java.lang.String domainRef)
Method lookupImportedDomain. |
RoleDeclaration |
lookupRoleDeclaration(java.lang.String roleName)
Method lookupRoleDeclaration. |
RoleDeclaration |
lookupRoleDeclaration(java.lang.String domainRef,
java.lang.String roleName)
Method lookupRoleDeclaration. |
DataType |
lookupType(java.lang.String typeName)
Method lookupType. |
DataType |
lookupType(java.lang.String domainRef,
java.lang.String typeName)
Method lookupType. |
private boolean |
roleExistsInSystemDomain(java.lang.String roleName)
Method roleExistsInSystemDomain. |
void |
setComplete()
Method setComplete. |
void |
setHashID(HashID hashID)
Sets the hashID. |
void |
setPrincipalType(SimpleType prinType)
Method setPrincipalType. |
private boolean |
typeExistsInSystemDomain(java.lang.String typeName)
Method typeExistsInSystemDomain. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
private SimpleType principalType
private OrderedMap importedDomains
private OrderedMap typeDeclarations
private OrderedMap roleDeclarations
private boolean completeState
private HashID hashID
private RTContext context
Constructor Detail |
DomainSpecification(RTContext context) throws DomainSpecException
context
-
DomainSpecException
Method Detail |
public void importDomain(java.lang.String name, ApplicationDomain spec) throws DomainSpecException
name
- the short name to refer to spec with the domain.spec
-
DomainSpecException
public void addType(DataType type) throws DomainSpecException
type
-
DomainSpecException
- DomainSpecException when a duplicated type declaration,
i.e. a type declaration with the same name and same data
type, is added.public void addType(java.lang.String typeName) throws DomainSpecException
typeName
-
DomainSpecException
public void addRole(RoleDeclaration role) throws DomainSpecException
role
-
DomainSpecException
public void setPrincipalType(SimpleType prinType) throws DomainSpecException
prinType
-
DomainSpecException
public boolean isComplete()
public void setComplete()
public DomainSpecification lookupImportedDomain(java.lang.String domainRef) throws DomainSpecException
domainRef
-
DomainSpecException
- if cannot find onepublic DataType lookupType(java.lang.String typeName) throws DomainSpecException
typeName
-
DomainSpecException
- if cannot find a DataType declaration by the given name.public DataType lookupType(java.lang.String domainRef, java.lang.String typeName) throws DomainSpecException
domainRef
- specifies which domain to look up in. If domainRef is null or an
empty string, then look up in the current domain.typeName
-
DomainSpecException
- if cannot find a DataType with given name.public RoleDeclaration lookupRoleDeclaration(java.lang.String roleName) throws DomainSpecException
roleName
-
DomainSpecException
- if cannot find one.public RoleDeclaration lookupRoleDeclaration(java.lang.String domainRef, java.lang.String roleName) throws DomainSpecException
domainRef
- specifies which domain to look up in. If domainRef is null or an
empty string, then look up in the current domain.roleName
-
DomainSpecException
- if cannot find a one.public RTContext getContext()
public OrderedMap getTypeDeclarations() throws DomainSpecException
DomainSpecException
- when parsing is not completed.public OrderedMap getRoleDeclarations() throws DomainSpecException
DomainSpecException
- when parsing is not completed.public OrderedMap getImportedDomains() throws DomainSpecException
DomainSpecException
- when parsing is not completed.public SimpleType getPrincipalType()
public HashID getHashID()
public void setHashID(HashID hashID) throws DomainSpecException
hashID
- The hashID to set
DomainSpecException
private boolean typeExistsInSystemDomain(java.lang.String typeName)
typeName
-
private boolean roleExistsInSystemDomain(java.lang.String roleName)
roleName
-
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |