Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

javax.management.relation
Class RelationService  view RelationService download RelationService.java

java.lang.Object
  extended byjavax.management.NotificationBroadcasterSupport
      extended byjavax.management.relation.RelationService
All Implemented Interfaces:
java.util.EventListener, javax.management.MBeanRegistration, javax.management.NotificationBroadcaster, javax.management.NotificationListener, RelationServiceMBean

public class RelationService
extends javax.management.NotificationBroadcasterSupport
implements RelationServiceMBean, javax.management.MBeanRegistration, javax.management.NotificationListener

Implements the management interface for a relation service.

Revisions:

20020311 Adrian Brock:

20020312 Adrian Brock:

Version:
$Revision: 1.6.6.2 $

Field Summary
private  javax.management.ObjectName delegate
           
private  MBeanServerNotificationFilter filter
          A notification listener for unregistration
private  java.util.HashMap idRolesMapByMBean
          Relation ids an MBean is part of by MBean object name The values side is a HashMap keyed by relation ids with values of a HashSet of role names.
private  java.util.HashMap idsByRelation
          Relation ids by relation Note: A relation is an ObjectName for external relations and a RelationSupport object for internal relations
private  long notificationSequence
          The notification sequence
private  boolean purgeFlag
          The purge flag
private  java.util.HashMap relationsById
          Relations by relation id Note: A relation is an ObjectName for external relations and a RelationSupport object for internal relations
private  javax.management.ObjectName relationService
          The relation service object name
private  javax.management.MBeanServer server
          The mbean server we are registered with
private  java.util.HashMap typeNamesById
          Relation type names by relation ids
private  java.util.HashMap typesByName
          The relation types by name
private  java.util.Stack unregistered
          A list of MBeans unregistered but not yet removed.
 
Fields inherited from class javax.management.NotificationBroadcasterSupport
log
 
Constructor Summary
RelationService(boolean purgeFlag)
          Construct a new relation service
 
Method Summary
 void addRelation(javax.management.ObjectName relation)
          Add a manually created relation to the relation service.
 void addRelationType(RelationType relationType)
          Add a relation type to the relation service.
 java.lang.Integer checkRoleReading(java.lang.String roleName, java.lang.String relationTypeName)
          Checks whether the passed role can be read in the given relation type.
 java.lang.Integer checkRoleWriting(Role role, java.lang.String relationTypeName, java.lang.Boolean initFlag)
          Checks whether the passed role can be written in the given relation type.
private  void createMissingRoles(java.lang.String relationTypeName, RoleList roleList)
          Create missing roles
 void createRelation(java.lang.String relationId, java.lang.String relationTypeName, RoleList roleList)
          Create a simple relation using RelationSupport for a relation type within the relation service.
 void createRelationType(java.lang.String relationTypeName, RoleInfo[] roleInfos)
          Create a relation type within the relation service.
 java.util.Map findAssociatedMBeans(javax.management.ObjectName mbeanName, java.lang.String relationTypeName, java.lang.String roleName)
          Retrieves MBeans associated with the passed MBean in the passed relation type and role.
 java.util.Map findReferencingRelations(javax.management.ObjectName mbeanName, java.lang.String relationTypeName, java.lang.String roleName)
          Retrieves MBeans referencing the passed MBean in the passed relation type and role.
 java.util.List findRelationsOfType(java.lang.String relationTypeName)
          Retrieves the relation ids for relations of the passed type.
 java.util.List getAllRelationIds()
          Retrieves all the relation ids.
 java.util.List getAllRelationTypeNames()
          Retrieves all the relation type names.
 RoleResult getAllRoles(java.lang.String relationId)
          Retrieves all the roles for a given relation id.
 javax.management.MBeanNotificationInfo[] getNotificationInfo()
           
 boolean getPurgeFlag()
          Retrieves the purge flag.
 java.util.Map getReferencedMBeans(java.lang.String relationId)
          Retrieves all the MBeans referenced in all the roles of a relation.
 java.lang.String getRelationTypeName(java.lang.String relationId)
          Retrieves the relation type name for the passed relation.
 java.util.List getRole(java.lang.String relationId, java.lang.String roleName)
          Retrieves MBeans in a role for a given relation id.
 java.lang.Integer getRoleCardinality(java.lang.String relationId, java.lang.String roleName)
          Retrieves the number of MBeans in a role for a given relation id.
 RoleInfo getRoleInfo(java.lang.String relationTypeName, java.lang.String roleInfoName)
          Retrieves the role information for a given relation type.
 java.util.List getRoleInfos(java.lang.String relationTypeName)
          Retrieves all the role information for a given relation type.
 RoleResult getRoles(java.lang.String relationId, java.lang.String[] roleNames)
          Retrieves selected roles for a relation.
 void handleNotification(javax.management.Notification notification, java.lang.Object handback)
           
 java.lang.Boolean hasRelation(java.lang.String relationId)
          Checks whether the relation service has the passed relation id.
 void isActive()
          Checks whether the relation service is active, i.e.
 java.lang.String isRelation(javax.management.ObjectName objectName)
          Checks whether the passed object name is a relation in this relation service.
 javax.management.ObjectName isRelationMBean(java.lang.String relationId)
          Checks whether the passed relation id is an MBean created by a user or has been internally created by the relation service.
 void postDeregister()
          This method is called by the MBeanServer after deregistration takes place.
 void postRegister(java.lang.Boolean registered)
          This method is called by the MBeanServer after registration takes place or when registration fails.
 void preDeregister()
          This method is called by the MBeanServer before deregistration takes place.
 javax.management.ObjectName preRegister(javax.management.MBeanServer server, javax.management.ObjectName objectName)
          This method is called by the MBeanServer before registration takes place.
 void purgeRelations()
          Purge relations.
 void removeRelation(java.lang.String relationId)
          Removes a relation from the relation service.
 void removeRelationType(java.lang.String relationTypeName)
          Removes a relation type from the relation service.
private  java.lang.Object retrieveRelationForId(java.lang.String relationId)
          Get the relation for a relation id
private  RelationType retrieveRelationTypeForName(java.lang.String relationTypeName)
          Get the relation type for a relation type name
private  java.lang.String retrieveTypeNameForId(java.lang.String relationId)
          Get the relation type name for a relation id
private  void sendNotification(java.lang.String type, java.lang.String description, java.lang.String relationId, java.util.List unregMBeans, Role newRole, java.util.List oldRoleValue)
          Send a notification.
 void sendRelationCreationNotification(java.lang.String relationId)
          Sends a relation creation notification For internally created relations, a RELATION_BASIC_CREATION notification is sent.
 void sendRelationRemovalNotification(java.lang.String relationId, java.util.List unregMBeans)
          Sends a relation removal notification For internally created relations, a RELATION_BASIC_REMOVAL notification is sent.
 void sendRoleUpdateNotification(java.lang.String relationId, Role newRole, java.util.List oldRoleValue)
          Sends a relation update notification For internally created relations, a RELATION_BASIC_UPDATE notification is sent.
 void setPurgeFlag(boolean value)
          Sets the purge flag.
 void setRole(java.lang.String relationId, Role role)
          Sets the role in the passed relation.
 RoleResult setRoles(java.lang.String relationId, RoleList roles)
          Sets the roles in the passed relation.
 void updateRoleMap(java.lang.String relationId, Role newRole, java.util.List oldRoleValue)
          Handles the update of the relation service role map when a role is changed.
private  void validateAndAddRelation(java.lang.String relationId, java.lang.Object relation, java.lang.String relationTypeName)
          Validate and add the relation.
private  void validateRelationType(RelationType relationType)
          Validate a relation type.
 
Methods inherited from class javax.management.NotificationBroadcasterSupport
addNotificationListener, getListenerMap, removeNotificationListener, sendNotification
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

idsByRelation

private java.util.HashMap idsByRelation
Relation ids by relation Note: A relation is an ObjectName for external relations and a RelationSupport object for internal relations


relationService

private javax.management.ObjectName relationService
The relation service object name


notificationSequence

private long notificationSequence
The notification sequence


purgeFlag

private boolean purgeFlag
The purge flag


relationsById

private java.util.HashMap relationsById
Relations by relation id Note: A relation is an ObjectName for external relations and a RelationSupport object for internal relations


server

private javax.management.MBeanServer server
The mbean server we are registered with


typesByName

private java.util.HashMap typesByName
The relation types by name


typeNamesById

private java.util.HashMap typeNamesById
Relation type names by relation ids


filter

private MBeanServerNotificationFilter filter
A notification listener for unregistration


unregistered

private java.util.Stack unregistered
A list of MBeans unregistered but not yet removed.


idRolesMapByMBean

private java.util.HashMap idRolesMapByMBean
Relation ids an MBean is part of by MBean object name The values side is a HashMap keyed by relation ids with values of a HashSet of role names.


delegate

private javax.management.ObjectName delegate
Constructor Detail

RelationService

public RelationService(boolean purgeFlag)
Construct a new relation service

Method Detail

addRelation

public void addRelation(javax.management.ObjectName relation)
                 throws java.lang.IllegalArgumentException,
                        java.lang.NoSuchMethodException,
                        RelationServiceNotRegisteredException,
                        InvalidRelationIdException,
                        InvalidRelationServiceException,
                        RelationTypeNotFoundException,
                        InvalidRoleValueException,
                        RoleNotFoundException,
                        javax.management.InstanceNotFoundException
Description copied from interface: RelationServiceMBean
Add a manually created relation to the relation service. It must be registered with the same MBeanService as the relation service. A RELATION_MBEAN_CREATION notification is sent.

Specified by:
addRelation in interface RelationServiceMBean

addRelationType

public void addRelationType(RelationType relationType)
                     throws java.lang.IllegalArgumentException,
                            InvalidRelationTypeException
Description copied from interface: RelationServiceMBean
Add a relation type to the relation service.

Specified by:
addRelationType in interface RelationServiceMBean

checkRoleReading

public java.lang.Integer checkRoleReading(java.lang.String roleName,
                                          java.lang.String relationTypeName)
                                   throws java.lang.IllegalArgumentException,
                                          RelationTypeNotFoundException
Description copied from interface: RelationServiceMBean
Checks whether the passed role can be read in the given relation type.

The return value is either zero when readable or a value from RoleStatus.

Specified by:
checkRoleReading in interface RelationServiceMBean

checkRoleWriting

public java.lang.Integer checkRoleWriting(Role role,
                                          java.lang.String relationTypeName,
                                          java.lang.Boolean initFlag)
                                   throws java.lang.IllegalArgumentException,
                                          RelationTypeNotFoundException
Description copied from interface: RelationServiceMBean
Checks whether the passed role can be written in the given relation type.

The return value is either zero when writable or a value from RoleStatus.

Specified by:
checkRoleWriting in interface RelationServiceMBean

createRelation

public void createRelation(java.lang.String relationId,
                           java.lang.String relationTypeName,
                           RoleList roleList)
                    throws java.lang.IllegalArgumentException,
                           RelationServiceNotRegisteredException,
                           InvalidRelationIdException,
                           RelationTypeNotFoundException,
                           InvalidRoleValueException,
                           RoleNotFoundException
Description copied from interface: RelationServiceMBean
Create a simple relation using RelationSupport for a relation type within the relation service.

Roles not initialised are set to an empty ArrayList.

A RELATION_BASIC_CREATION notification is sent.

Specified by:
createRelation in interface RelationServiceMBean

createRelationType

public void createRelationType(java.lang.String relationTypeName,
                               RoleInfo[] roleInfos)
                        throws java.lang.IllegalArgumentException,
                               InvalidRelationTypeException
Description copied from interface: RelationServiceMBean
Create a relation type within the relation service.

Specified by:
createRelationType in interface RelationServiceMBean

findAssociatedMBeans

public java.util.Map findAssociatedMBeans(javax.management.ObjectName mbeanName,
                                          java.lang.String relationTypeName,
                                          java.lang.String roleName)
                                   throws java.lang.IllegalArgumentException
Description copied from interface: RelationServiceMBean
Retrieves MBeans associated with the passed MBean in the passed relation type and role.

Specified by:
findAssociatedMBeans in interface RelationServiceMBean

findReferencingRelations

public java.util.Map findReferencingRelations(javax.management.ObjectName mbeanName,
                                              java.lang.String relationTypeName,
                                              java.lang.String roleName)
                                       throws java.lang.IllegalArgumentException
Description copied from interface: RelationServiceMBean
Retrieves MBeans referencing the passed MBean in the passed relation type and role.

Specified by:
findReferencingRelations in interface RelationServiceMBean

findRelationsOfType

public java.util.List findRelationsOfType(java.lang.String relationTypeName)
                                   throws java.lang.IllegalArgumentException,
                                          RelationTypeNotFoundException
Description copied from interface: RelationServiceMBean
Retrieves the relation ids for relations of the passed type.

Specified by:
findRelationsOfType in interface RelationServiceMBean

getAllRelationIds

public java.util.List getAllRelationIds()
Description copied from interface: RelationServiceMBean
Retrieves all the relation ids.

Specified by:
getAllRelationIds in interface RelationServiceMBean

getAllRelationTypeNames

public java.util.List getAllRelationTypeNames()
Description copied from interface: RelationServiceMBean
Retrieves all the relation type names.

Specified by:
getAllRelationTypeNames in interface RelationServiceMBean

getAllRoles

public RoleResult getAllRoles(java.lang.String relationId)
                       throws java.lang.IllegalArgumentException,
                              RelationNotFoundException,
                              RelationServiceNotRegisteredException
Description copied from interface: RelationServiceMBean
Retrieves all the roles for a given relation id.

Specified by:
getAllRoles in interface RelationServiceMBean

getPurgeFlag

public boolean getPurgeFlag()
Description copied from interface: RelationServiceMBean
Retrieves the purge flag. This flag controls whether all relations have to validated when notification is received of an MBeans unregistration or whether the purgeRelations() method has to be called.

Specified by:
getPurgeFlag in interface RelationServiceMBean

getReferencedMBeans

public java.util.Map getReferencedMBeans(java.lang.String relationId)
                                  throws java.lang.IllegalArgumentException,
                                         RelationNotFoundException
Description copied from interface: RelationServiceMBean
Retrieves all the MBeans referenced in all the roles of a relation.

Specified by:
getReferencedMBeans in interface RelationServiceMBean

getRelationTypeName

public java.lang.String getRelationTypeName(java.lang.String relationId)
                                     throws java.lang.IllegalArgumentException,
                                            RelationNotFoundException
Description copied from interface: RelationServiceMBean
Retrieves the relation type name for the passed relation.

Specified by:
getRelationTypeName in interface RelationServiceMBean

getRole

public java.util.List getRole(java.lang.String relationId,
                              java.lang.String roleName)
                       throws java.lang.IllegalArgumentException,
                              RelationNotFoundException,
                              RelationServiceNotRegisteredException,
                              RoleNotFoundException
Description copied from interface: RelationServiceMBean
Retrieves MBeans in a role for a given relation id.

Specified by:
getRole in interface RelationServiceMBean

getRoleCardinality

public java.lang.Integer getRoleCardinality(java.lang.String relationId,
                                            java.lang.String roleName)
                                     throws java.lang.IllegalArgumentException,
                                            RelationNotFoundException,
                                            RoleNotFoundException
Description copied from interface: RelationServiceMBean
Retrieves the number of MBeans in a role for a given relation id.

Specified by:
getRoleCardinality in interface RelationServiceMBean

getRoleInfo

public RoleInfo getRoleInfo(java.lang.String relationTypeName,
                            java.lang.String roleInfoName)
                     throws java.lang.IllegalArgumentException,
                            RelationTypeNotFoundException,
                            RoleInfoNotFoundException
Description copied from interface: RelationServiceMBean
Retrieves the role information for a given relation type.

Specified by:
getRoleInfo in interface RelationServiceMBean

getRoleInfos

public java.util.List getRoleInfos(java.lang.String relationTypeName)
                            throws java.lang.IllegalArgumentException,
                                   RelationTypeNotFoundException
Description copied from interface: RelationServiceMBean
Retrieves all the role information for a given relation type.

Specified by:
getRoleInfos in interface RelationServiceMBean

getRoles

public RoleResult getRoles(java.lang.String relationId,
                           java.lang.String[] roleNames)
                    throws java.lang.IllegalArgumentException,
                           RelationNotFoundException,
                           RelationServiceNotRegisteredException
Description copied from interface: RelationServiceMBean
Retrieves selected roles for a relation.

Specified by:
getRoles in interface RelationServiceMBean

hasRelation

public java.lang.Boolean hasRelation(java.lang.String relationId)
                              throws java.lang.IllegalArgumentException
Description copied from interface: RelationServiceMBean
Checks whether the relation service has the passed relation id.

Specified by:
hasRelation in interface RelationServiceMBean

isActive

public void isActive()
              throws RelationServiceNotRegisteredException
Description copied from interface: RelationServiceMBean
Checks whether the relation service is active, i.e. it is registered with an MBeanServer.

Specified by:
isActive in interface RelationServiceMBean

isRelation

public java.lang.String isRelation(javax.management.ObjectName objectName)
                            throws java.lang.IllegalArgumentException
Description copied from interface: RelationServiceMBean
Checks whether the passed object name is a relation in this relation service.

Specified by:
isRelation in interface RelationServiceMBean

isRelationMBean

public javax.management.ObjectName isRelationMBean(java.lang.String relationId)
                                            throws java.lang.IllegalArgumentException,
                                                   RelationNotFoundException
Description copied from interface: RelationServiceMBean
Checks whether the passed relation id is an MBean created by a user or has been internally created by the relation service.

Specified by:
isRelationMBean in interface RelationServiceMBean

purgeRelations

public void purgeRelations()
                    throws RelationServiceNotRegisteredException
Description copied from interface: RelationServiceMBean
Purge relations. This method is called automatically when the purge flag is true and an MBean in a relation is unregistered.

Not purging relations automatically can lead to problems when the same object name is reused.

If the unregistration causes a role to go below its minimal cardinality, the relation is removed. Otherwise the relation's handleMBeanUnregistration() is called.

Specified by:
purgeRelations in interface RelationServiceMBean

removeRelation

public void removeRelation(java.lang.String relationId)
                    throws java.lang.IllegalArgumentException,
                           RelationNotFoundException,
                           RelationServiceNotRegisteredException
Description copied from interface: RelationServiceMBean
Removes a relation from the relation service.

For internally created relations, a RELATION_BASIC_REMOVAL notification is sent.

For externally created relations, a RELATION_MBEAN_REMOVAL notification is sent.

The MBeans referenced in the relation are unaffected.

Specified by:
removeRelation in interface RelationServiceMBean

removeRelationType

public void removeRelationType(java.lang.String relationTypeName)
                        throws java.lang.IllegalArgumentException,
                               RelationTypeNotFoundException,
                               RelationServiceNotRegisteredException
Description copied from interface: RelationServiceMBean
Removes a relation type from the relation service.

Any relations using this relation type are also removed.

Specified by:
removeRelationType in interface RelationServiceMBean

sendRelationCreationNotification

public void sendRelationCreationNotification(java.lang.String relationId)
                                      throws java.lang.IllegalArgumentException,
                                             RelationNotFoundException
Description copied from interface: RelationServiceMBean
Sends a relation creation notification For internally created relations, a RELATION_BASIC_CREATION notification is sent.

For externally created relations, a RELATION_MBEAN_CREATION notification is sent.

The source is this relation service.

This method is called by addRelation() and createRelation()

Specified by:
sendRelationCreationNotification in interface RelationServiceMBean

sendRelationRemovalNotification

public void sendRelationRemovalNotification(java.lang.String relationId,
                                            java.util.List unregMBeans)
                                     throws java.lang.IllegalArgumentException,
                                            RelationNotFoundException
Description copied from interface: RelationServiceMBean
Sends a relation removal notification For internally created relations, a RELATION_BASIC_REMOVAL notification is sent.

For externally created relations, a RELATION_MBEAN_REMOVAL notification is sent.

The source is this relation service.

This method is called by removeRelation()

Specified by:
sendRelationRemovalNotification in interface RelationServiceMBean

sendRoleUpdateNotification

public void sendRoleUpdateNotification(java.lang.String relationId,
                                       Role newRole,
                                       java.util.List oldRoleValue)
                                throws java.lang.IllegalArgumentException,
                                       RelationNotFoundException
Description copied from interface: RelationServiceMBean
Sends a relation update notification For internally created relations, a RELATION_BASIC_UPDATE notification is sent.

For externally created relations, a RELATION_MBEAN_UPDATE notification is sent.

The source is this relation service.

This method is called from the RelationSupport setRole() and setRoles() methods.

Specified by:
sendRoleUpdateNotification in interface RelationServiceMBean

setPurgeFlag

public void setPurgeFlag(boolean value)
Description copied from interface: RelationServiceMBean
Sets the purge flag. This flag controls whether all relations have to validated when notification is received of an MBeans unregistration or whether the purgeRelations() method has to be called.

Specified by:
setPurgeFlag in interface RelationServiceMBean

setRole

public void setRole(java.lang.String relationId,
                    Role role)
             throws java.lang.IllegalArgumentException,
                    RelationServiceNotRegisteredException,
                    RelationNotFoundException,
                    RoleNotFoundException,
                    InvalidRoleValueException,
                    RelationTypeNotFoundException
Description copied from interface: RelationServiceMBean
Sets the role in the passed relation.

The role will be validated according to information in the relation type.

The relation service will keep track the MBeans unregistration to maintain the consistency of the relation.

Specified by:
setRole in interface RelationServiceMBean

setRoles

public RoleResult setRoles(java.lang.String relationId,
                           RoleList roles)
                    throws java.lang.IllegalArgumentException,
                           RelationServiceNotRegisteredException,
                           RelationNotFoundException
Description copied from interface: RelationServiceMBean
Sets the roles in the passed relation.

The roles will be validated according to information in the relation type.

The relation service will keep track the MBeans unregistration to maintain the consistency of the relation.

Specified by:
setRoles in interface RelationServiceMBean

updateRoleMap

public void updateRoleMap(java.lang.String relationId,
                          Role newRole,
                          java.util.List oldRoleValue)
                   throws java.lang.IllegalArgumentException,
                          RelationServiceNotRegisteredException,
                          RelationNotFoundException
Description copied from interface: RelationServiceMBean
Handles the update of the relation service role map when a role is changed.

It is called from RelationSupport setRole() and setRoles() and the relation service's setRole() and setRoles() methods.

The relation service will keep track the MBeans unregistration to maintain the consistency of the relation.

Specified by:
updateRoleMap in interface RelationServiceMBean

preRegister

public javax.management.ObjectName preRegister(javax.management.MBeanServer server,
                                               javax.management.ObjectName objectName)
                                        throws java.lang.Exception
Description copied from interface: javax.management.MBeanRegistration
This method is called by the MBeanServer before registration takes place. The MBean is passed a reference of the MBeanServer it is about to be registered with. The MBean must return the ObjectName it will be registered with. The MBeanServer can pass a suggested object depending upon how the MBean is registered.

The MBean can stop the registration by throwing an exception.The exception is forwarded to the invoker wrapped in an MBeanRegistrationException.

Specified by:
preRegister in interface javax.management.MBeanRegistration

postRegister

public void postRegister(java.lang.Boolean registered)
Description copied from interface: javax.management.MBeanRegistration
This method is called by the MBeanServer after registration takes place or when registration fails.

Specified by:
postRegister in interface javax.management.MBeanRegistration

preDeregister

public void preDeregister()
                   throws java.lang.Exception
Description copied from interface: javax.management.MBeanRegistration
This method is called by the MBeanServer before deregistration takes place.

The MBean can throw an exception, this will stop the deregistration. The exception is forwarded to the invoker wrapped in an MBeanRegistrationException.

Specified by:
preDeregister in interface javax.management.MBeanRegistration

postDeregister

public void postDeregister()
Description copied from interface: javax.management.MBeanRegistration
This method is called by the MBeanServer after deregistration takes place.

Specified by:
postDeregister in interface javax.management.MBeanRegistration

handleNotification

public void handleNotification(javax.management.Notification notification,
                               java.lang.Object handback)
Specified by:
handleNotification in interface javax.management.NotificationListener

getNotificationInfo

public javax.management.MBeanNotificationInfo[] getNotificationInfo()
Specified by:
getNotificationInfo in interface javax.management.NotificationBroadcaster

createMissingRoles

private void createMissingRoles(java.lang.String relationTypeName,
                                RoleList roleList)
                         throws java.lang.IllegalArgumentException,
                                RelationTypeNotFoundException
Create missing roles


retrieveRelationForId

private java.lang.Object retrieveRelationForId(java.lang.String relationId)
                                        throws java.lang.IllegalArgumentException,
                                               RelationNotFoundException
Get the relation for a relation id


retrieveTypeNameForId

private java.lang.String retrieveTypeNameForId(java.lang.String relationId)
                                        throws java.lang.IllegalArgumentException,
                                               RelationNotFoundException
Get the relation type name for a relation id


retrieveRelationTypeForName

private RelationType retrieveRelationTypeForName(java.lang.String relationTypeName)
                                          throws java.lang.IllegalArgumentException,
                                                 RelationTypeNotFoundException
Get the relation type for a relation type name


sendNotification

private void sendNotification(java.lang.String type,
                              java.lang.String description,
                              java.lang.String relationId,
                              java.util.List unregMBeans,
                              Role newRole,
                              java.util.List oldRoleValue)
                       throws java.lang.IllegalArgumentException,
                              RelationNotFoundException
Send a notification.


validateAndAddRelation

private void validateAndAddRelation(java.lang.String relationId,
                                    java.lang.Object relation,
                                    java.lang.String relationTypeName)
                             throws InvalidRelationIdException
Validate and add the relation.


validateRelationType

private void validateRelationType(RelationType relationType)
                           throws InvalidRelationTypeException
Validate a relation type.