|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object javax.management.relation.RelationTypeSupport
This class can be used to implement relation types.
It holds RoleInfo objects for all roles in the relation.
Revisions:
20020312 Adrian Brock:
20020715 Adrian Brock:
Constructor Summary | |
protected |
RelationTypeSupport(String name)
Create a relation type with a name but no role infos. |
|
RelationTypeSupport(String name,
RoleInfo[] infos)
Create a relation type with a name and the passed role infos. |
Method Summary | |
protected void |
addRoleInfo(RoleInfo roleInfo)
Add a role information object to the relation type. |
String |
getRelationTypeName()
Retrieves the name of this relation type. |
RoleInfo |
getRoleInfo(String roleInfoName)
Retrieves the role info for a role name. |
List |
getRoleInfos()
Retrieves the list of role definitions in this relation type. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
protected RelationTypeSupport(String name)
WARNING: No check is made on the arguments.
name
- the relation type name.public RelationTypeSupport(String name, RoleInfo[] infos) throws IllegalArgumentException, InvalidRelationTypeException
A relation type is invalid if the same name is used in two different role infos, no role information is provided or a null role is passed.
name
- the relation type name.
IllegalArgumentException
- for null parameters
InvalidRelationTypeException
- for an invalid relationMethod Detail |
public String getRelationTypeName()
RelationType
getRelationTypeName
in interface RelationType
public List getRoleInfos()
RelationType
The return value is a list of RoleInfo objects. The list must be an ArrayList.
getRoleInfos
in interface RelationType
public RoleInfo getRoleInfo(String roleInfoName) throws IllegalArgumentException, RoleInfoNotFoundException
RelationType
getRoleInfo
in interface RelationType
RoleInfoNotFoundException
- for no role info with the
passed name in the relation type.
IllegalArgumentException
- for a null role info name.protected void addRoleInfo(RoleInfo roleInfo) throws IllegalArgumentException, InvalidRelationTypeException
IllegalArgumentException
- for null parameters
InvalidRelationTypeException
- for a duplicate role name.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |