Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## javax.management.relation
Class RelationTypeSupport

    java.lang.Object
      javax.management.relation.RelationTypeSupport

All Implemented Interfaces:
  RelationType, Serializable

public class RelationTypeSupport
extends Object
implements RelationType

This class can be used to implement relation types.

It holds RoleInfo objects for all roles in the relation.

Revisions:

20020312 Adrian Brock:

- Fixed error handling for getRoleInfo

20020715 Adrian Brock:

- Serialization

Version:
  $Revision: 1.8 $
Author:
  Adrian Brock.
See Also:
  Serialized Form

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

### RelationTypeSupport

    protected RelationTypeSupport(String name)

  Create a relation type with a name but no role infos.

  WARNING: No check is made on the arguments.

Parameters:
  `name` - the relation type name.

### RelationTypeSupport

    public RelationTypeSupport(String name,
                               RoleInfo[] infos)
                        throws IllegalArgumentException,
                               InvalidRelationTypeException

  Create a relation type with a name and the passed role infos.

  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.

Parameters:
  `name` - the relation type name.
Throws:
  `IllegalArgumentException` - for null parameters
  `InvalidRelationTypeException` - for an invalid relation

Method Detail

### getRelationTypeName

    public String getRelationTypeName()

  Description copied from interface: `RelationType`
  Retrieves the name of this relation type.

  Specified by:
    `getRelationTypeName` in interface `RelationType`
  Returns:
    the name.

### getRoleInfos

    public List getRoleInfos()

  Description copied from interface: `RelationType`
  Retrieves the list of role definitions in this relation type.

  The return value is a list of RoleInfo objects. The list must be an ArrayList.

  Specified by:
    `getRoleInfos` in interface `RelationType`
  Returns:
    the list of Role Infos.

### getRoleInfo

    public RoleInfo getRoleInfo(String roleInfoName)
                         throws IllegalArgumentException,
                                RoleInfoNotFoundException

  Description copied from interface: `RelationType`
  Retrieves the role info for a role name.

  Specified by:
    `getRoleInfo` in interface `RelationType`
  Returns:
    the role info or null.
  Throws:
    `RoleInfoNotFoundException` - for no role info with the passed name in the relation type.
    `IllegalArgumentException` - for a null role info name.

### addRoleInfo

    protected void addRoleInfo(RoleInfo roleInfo)
                        throws IllegalArgumentException,
                               InvalidRelationTypeException

  Add a role information object to the relation type.

  Throws:
    `IllegalArgumentException` - for null parameters
    `InvalidRelationTypeException` - for a duplicate role name.

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2002 JBoss Group, LLC. All Rights Reserved.