Collaboration API Documentation

com.filenet.bso.api.collaboration
Interface RelationshipManager


public interface RelationshipManager

A class that implements the RelationshipManager interface provides functionality to manage relationships within a teamspace.

See Also:
Relationship, RelationshipInfo

Method Summary
 Relationship addRelationship(RelationshipInfo info)
          Add a new relationship object to the teamspace.
 java.util.Iterator getAllRelationships()
          Return an iterator over a collection of all the Relationship objects in this teamspace.
 Relationship getRelationshipByObjectID(java.lang.String relationshipID)
          Return a Relationship object which represents a particular relationship.
 java.util.Iterator getRelationships(java.lang.String fromID, int objectType)
          Return an iterator over a collection of Relationship objects which represents all relationships from a particular teamspace object to other objects.
 java.lang.String getRelationshipsXML(java.lang.String fromID, int objectType, java.util.Map propMap)
          Return the XML for all the relationship objects that are from a particular ID and also all objects that these relationships relate to.
 void refresh()
          Force refresh of relationship data.
 void removeRelationship(java.lang.String id)
          Remove a teamspace relationship.
 

Method Detail

getRelationshipByObjectID

public Relationship getRelationshipByObjectID(java.lang.String relationshipID)
Return a Relationship object which represents a particular relationship. This may be null if the relationship ID given does not match any relationships in the teamspace.

Note that the Relationship object returned by this call does not have as much information about the to-end of the relationship as Relationship objects returned by the getRelationships or getAllRelationships methods. Specifically, the getToID, getToTitle, getToCollabType and getToObjectType methods will not return meaningful information, even if the to-end object resides in the same object store as this teamspace.

Parameters:
relationshipID - The id of a relationship, required.
Returns:
A Relationship object.

getRelationships

public java.util.Iterator getRelationships(java.lang.String fromID,
                                           int objectType)
Return an iterator over a collection of Relationship objects which represents all relationships from a particular teamspace object to other objects.

Parameters:
fromID - the ID of the object on the "from" side of any relationships
objectType - the type of this object, either a Collaboration.TYPE_XYZ or BaseObject.TYPE_XYZ constant.
Returns:
A collection of Relationship objects.

getAllRelationships

public java.util.Iterator getAllRelationships()
Return an iterator over a collection of all the Relationship objects in this teamspace.
Returns:
A collection of Relationship objects.

getRelationshipsXML

public java.lang.String getRelationshipsXML(java.lang.String fromID,
                                            int objectType,
                                            java.util.Map propMap)
Return the XML for all the relationship objects that are from a particular ID and also all objects that these relationships relate to.

Parameters:
fromID - the ID of the object on the "from" side of any relationships
objectType - the type of this object, either a Collaboration.TYPE_XYZ or BaseObject.TYPE_XYZ constant.
propMap - a Map, keyed by Integer collaboration types, with values of a String[] holding all requested property names for that collaboration type. This may be null.
Returns:
an XML string containing all the retrieved relationship info and also the info on all to-end local objects.

refresh

public void refresh()
Force refresh of relationship data.

addRelationship

public Relationship addRelationship(RelationshipInfo info)
                             throws RelationshipException,
                                    ValidationException
Add a new relationship object to the teamspace.
Parameters:
info - the information about the new object
Returns:
the newly created object
Throws:
BadRelationshipObjectRefException - if the local objects at the from or to-end of the relationship are bad. This can happen if the ID is not found or, if found, if the object's base type (Document, Folder, CustomObject or VersionSeries) is not what is expected. RelationshipException is a superclass of this exception.
BothEndsOfRelationshipSameException - if the same ID is used for both ends of the relationship. RelationshipException is a superclass of this exception.
java.lang.IllegalArgumentException - if anything is wrong with the fields in the RelationshipInfo object

removeRelationship

public void removeRelationship(java.lang.String id)
Remove a teamspace relationship. This deletes the relationship from the CE. This also checks the setting of the IsRelationshipProtected property and refuse to delete (throwing) if true.
Parameters:
id - the ID of the relationship

Collaboration API Documentation

Copyright © 2002 - 2004 FileNet Corporation. All rights reserved.