|
Collaboration API Documentation | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.filenet.bso.api.collaboration.data.RelationshipInfo
The RelationshipInfo
class is a collection of data used to create a Relationship
object in a teamspace.
A teamspace relationship is created by generating a RelationshipInfo
object from the
CollaborationFactory
and adding it to the teamspace using the teamspace's
RelationshipManager
object.
CollaborationFactory
,
RelationshipManager
,
Relationship
, Serialized FormConstructor Summary | |
protected |
RelationshipInfo()
Default constructor. |
|
RelationshipInfo(int fromType,
java.lang.String fromID,
int toType,
java.lang.String toID,
java.lang.String toVersionID)
Construct a relationship from a teamspace object to a local object which resides in the same object store as the teamspace. |
|
RelationshipInfo(int fromType,
java.lang.String fromID,
int toType,
java.lang.String extObjectStore,
java.lang.String extID,
java.lang.String extVersionID,
java.lang.String title)
Construct a relationship from a teamspace object to an external object. |
|
RelationshipInfo(int fromType,
java.lang.String fromID,
java.lang.String extURL,
java.lang.String title)
Construct a relationship from a teamspace object to a URL. |
|
RelationshipInfo(int fromType,
java.lang.String fromID,
filenet.vw.api.VWAttachment attachment)
Construct a relationship from a teamspace object to an eProcess attachment. |
Method Summary | |
void |
fixupVerifyRelationship(com.filenet.wcm.api.ObjectStore store)
Verify and attempt to repair the RelationshipInfo object. |
boolean |
getIsRelationshipProtected()
Get the IsRelationshipProtected property. |
RelationshipInfo |
getOtherWay()
Returns a RelationshipInfo object for the opposite direction of a two-way
relationship if this object has isTwoWay set. |
java.lang.String |
getOwnerID()
Get the owner ID setting for this relationship. |
com.filenet.wcm.api.Properties |
getProperties()
Get the extra properties to be set on this relationship object. |
java.lang.String |
getRelationshipFromID()
Get the RelationshipFromID property. |
int |
getRelationshipFromType()
Get the RelationshipFromType property. |
java.lang.String |
getRelationshipToExtID()
Get the RelationshipExternalID property. |
java.lang.String |
getRelationshipToExtObjectStore()
Get the RelationshipExternalObjectStore property. |
java.lang.String |
getRelationshipToExtURL()
Get the RelationshipExternalURL property. |
java.lang.String |
getRelationshipToExtVersionID()
Get the RelationshipExternalVersionID property. |
java.lang.String |
getRelationshipToID()
Get the RelationshipToID property. |
int |
getRelationshipToType()
Get the RelationshipToType property. |
java.lang.String |
getRelationshipToVersionID()
Get the RelationshipToVersionID property. |
java.lang.String |
getTitle()
Get the relationship's Title property. |
boolean |
isEmptyAttachment()
|
boolean |
isTwoWay()
Determine whether this relationship is two-way. |
void |
setIsRelationshipProtected(boolean isRelationshipProtected)
Set relationship protection. |
void |
setIsTwoWay(boolean isTwoWay)
Set the two-way flag. |
void |
setOwnerID(java.lang.String ownerID)
Set the owner ID for this relationship. |
void |
setProperties(com.filenet.wcm.api.Properties relationshipProps)
Set extra properties for this relationship object. |
void |
setRelationshipFromID(java.lang.String id)
Set the from-end's ID. |
void |
setRelationshipFromType(int type)
Set the from-end's type. |
void |
setRelationshipToExtID(java.lang.String id)
Set the external to-end's ID. |
void |
setRelationshipToExtObjectStore(java.lang.String obs)
Set the external to-end's object store ID. |
void |
setRelationshipToExtURL(java.lang.String url)
Set the external URL. |
void |
setRelationshipToExtVersionID(java.lang.String id)
Set the external to-end's document version ID. |
void |
setRelationshipToID(java.lang.String id)
Set the local to-end's ID. |
void |
setRelationshipToType(int type)
Set the to-end's type. |
void |
setRelationshipToVersionID(java.lang.String id)
Set the local to-end's document version ID. |
void |
setTitle(java.lang.String title)
Set the title for the relationship object. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
protected RelationshipInfo()
public RelationshipInfo(int fromType, java.lang.String fromID, int toType, java.lang.String toID, java.lang.String toVersionID)
fromType
- The type of object on the from-end of the relationship. This should
be one of the RELTYPE
constants defined in Relationship
,
one of the collaboration types defined in Collaboration
, or
BaseObject
's TYPE_DOCUMENT
, TYPE_VERSIONSERIES
or
TYPE_FOLDER
.
fromID
- The ID of the object on the from-end of the relationship. If this
is a Document
object, the ID should be that of the document's
VersionSeries
, rather than the document itself.
toType
- The type of the object on the to-end of the relationship. This should
be one of the RELTYPE
constants defined in Relationship
,
one of the collaboration types defined in Collaboration
, or
BaseObject
's TYPE_DOCUMENT
, TYPE_VERSIONSERIES
or
TYPE_FOLDER
.
toID
- The ID of a local object on the to-end of the relationship. The object
should be in the same object store as that of the teamspace. Also, if toType
is RELTYPE_LOCAL_DOCUMENT
, this ID should be that of the document's
version series, rather than the document itself.
toVersionID
- The ID of a specific document on the to-end of the relationship or
the special constant, Relationship.RELEASED_VERSION
. This should only be set
if this is a RELTYPE_LOCAL_DOCUMENT
, and even then only if the current
version is not desired. Otherwise, this parameter should be null
. If this is set to
RELEASED_VERSION
, the latest released version
is used rather than a specific document version.public RelationshipInfo(int fromType, java.lang.String fromID, int toType, java.lang.String extObjectStore, java.lang.String extID, java.lang.String extVersionID, java.lang.String title)
fromType
- the type of the object on the from-end of the relationship. This should
be one of the RELTYPE
constants defined in Relationship
,
one of the collaboration types defined in Collaboration
or
BaseObject
's TYPE_DOCUMENT
, TYPE_VERSIONSERIES
or
TYPE_FOLDER
.
fromID
- the ID of the object on the from-end of the relationship. If this
is a Document
object, then the ID should be that of the document's
VersionSeries
rather than the document itself.
toType
- the type of the object on the to-end of the relationship. This should
be one of the RELTYPE
constants defined in Relationship
,
one of the collaboration types defined in Collaboration
or
BaseObject
's TYPE_DOCUMENT
, TYPE_VERSIONSERIES
or
TYPE_FOLDER
.
extObjectStore
- the object store of the object at the to-end of the relationship. This
may be either the name of the object store or its GUID.
extID
- the ID of a external object on the to-end of the relationship. If this is a
Document
object, then the ID should be that of the VersionSeries
rather than the document itself.
extVersionID
- the ID of a specific document on the to-end of the relationship or
the special constant, Relationship.RELEASED_VERSION
. This should only be set
if this is a RELTYPE_EXTERNAL_DOCUMENT
, and even then only if the current
version is not desired, otherwise this should be null
. If this is set to
RELEASED_VERSION
, then the latest released version
is used rather than a specific document version.
title
- the name of this relationship. This may be null
but should be
set later with setTitle
since external objects should always have a title.public RelationshipInfo(int fromType, java.lang.String fromID, java.lang.String extURL, java.lang.String title)
fromType
- the type of the object on the from-end of the relationship. This should
be one of the RELTYPE
constants defined in Relationship
,
one of the collaboration types defined in Collaboration
or
BaseObject
's TYPE_DOCUMENT
, TYPE_VERSIONSERIES
or
TYPE_FOLDER
.
fromID
- the ID of the object on the from-end of the relationship. If this
is a Document
object, then the ID should be that of the document's
VersionSeries
rather than the document itself.
extURL
- the URL
title
- the name of this relationship. This may be null
in which
case the title will be set to extURL
's value.public RelationshipInfo(int fromType, java.lang.String fromID, filenet.vw.api.VWAttachment attachment)
fromType
- the type of the object on the from-end of the relationship. This should
be one of the RELTYPE
constants defined in Relationship
,
one of the collaboration types defined in Collaboration
or
BaseObject
's TYPE_DOCUMENT
, TYPE_VERSIONSERIES
or
TYPE_FOLDER
.
fromID
- the ID of the object on the from-end of the relationship. If this
is a Document
object, then the ID should be that of the document's
VersionSeries
rather than the document itself.
attachment
- an eProcess attachment which defines the to-end of the relationshipMethod Detail |
public boolean isEmptyAttachment()
public void setTitle(java.lang.String title)
title
- The new value of the relationship's title.public java.lang.String getTitle()
null
.public void setRelationshipFromType(int type)
type
- The new value for the from-end's type.public int getRelationshipFromType()
RelationshipFromType
property. This is a required property of a
Relationship object which specifies the type of object the from-end of the relationship is
referencing. This type should only be types RELTYPE_LOCAL_DOCUMENT
,
RELTYPE_LOCAL_FOLDER
or RELTYPE_LOCAL_CUSTOMOBJECT
.RelationshipFromType
property.public void setRelationshipFromID(java.lang.String id)
id
- The new value for the from-end's ID.public java.lang.String getRelationshipFromID()
RelationshipFromID
property. This is a required property of a
Relationship
object which specifies the ID of the from-end of a relationship.
If this object is a Document
, then the Document
's
VersionSeries
ID will be returned.RelationshipFromID
property.public void setRelationshipToType(int type)
type
- The new value for the to-end's type.public int getRelationshipToType()
RelationshipToType
property. This is a required property of a
relationship which specifies what the to-end of the relationship is referencing.RelationshipToType
property.public void setRelationshipToID(java.lang.String id)
id
- The new value for the local to-end's ID.public java.lang.String getRelationshipToID()
RelationshipToID
property. This is set to the ID of a local,
same object store as the Collaboration store, object that is the to-end of this relationship.
In the case of a local Document
, this will be the ID of the
Document
's VersionSeries
. If the to-end is not local, then this
will be null
.RelationshipToID
property.public void setRelationshipToVersionID(java.lang.String id)
id
- The new value for the local to-end's version ID.public java.lang.String getRelationshipToVersionID()
RelationshipToVersionID
property. This is set to the ID of a
specific version of a local Document
that is by the to-end of a relationship
or to the Relationship.RELEASED_VERSION
constant.
This, by implication, means the to type is a RELTYPE_LOCAL_DOCUMENT
.
In other cases, this will be null
.RelationshipToVersionID
property.public void setRelationshipToExtObjectStore(java.lang.String obs)
obs
- The new value for the external object store ID.public java.lang.String getRelationshipToExtObjectStore()
RelationshipExternalObjectStore
property. This is set to either the
ID or the name of an object store that is being referenced by the to-end of a relationship.
Returns null
if the relationship is not to an external object.RelationshipExternalObjectStore
property.public void setRelationshipToExtID(java.lang.String id)
id
- The new value for the external to-end's ID.public java.lang.String getRelationshipToExtID()
RelationshipExternalID
property. This will be set to the ID of some
external object that is being referenced by the to-end of a relationship. This object will
be outside the Collaboration object store. In the case of a Document
, this will
be the VersionSeries
of that Document
. Returns null
if this relationship is not to an external object.RelationshipExternalID
property.public void setRelationshipToExtVersionID(java.lang.String id)
id
- The new value for the external to-end's version ID.public java.lang.String getRelationshipToExtVersionID()
RelationshipExternalVersionID
property. This will only be set to
the ID of some Document
object or the Relationship.RELEASED_VERSION
constant for a RELTYPE_EXTERNAL_DOCUMENT
on the to-end of the relationship.
Otherwise, this will return null
.RelationshipExternalVersionID
property.public void setRelationshipToExtURL(java.lang.String url)
url
- The new value for the external to-end's version ID.public java.lang.String getRelationshipToExtURL()
RelationshipExternalURL
property.RelationshipExternalURL
propertypublic void setIsRelationshipProtected(boolean isRelationshipProtected)
removeRelationship
method.isRelationshipProtected
- Set to true
to protect this relationship.public boolean getIsRelationshipProtected()
IsRelationshipProtected
property. If this is true
, the
API code will not delete the Relationship using the removeRelationship
method.IsRelationshipProtected
property.public void setIsTwoWay(boolean isTwoWay)
isTwoWay
- true
if this relationship is two-way.public boolean isTwoWay()
true
if this is a two-way relationship.public void setOwnerID(java.lang.String ownerID)
ownerID
- The owner ID.public java.lang.String getOwnerID()
public void setProperties(com.filenet.wcm.api.Properties relationshipProps)
relationshipProps
- The new properties to set.public com.filenet.wcm.api.Properties getProperties()
public RelationshipInfo getOtherWay()
RelationshipInfo
object for the opposite direction of a two-way
relationship if this object has isTwoWay
set.null
if the current object does not have
isTwoWay
set to true
.java.lang.IllegalStateException
- if fixupVerifyRelationship.public void fixupVerifyRelationship(com.filenet.wcm.api.ObjectStore store)
RelationshipInfo
object. This will turn a external to-object
into a local to-object, if possible, and will also turn document IDs into version series IDs,
if needed.store
- The object store containing the "from" object.java.lang.IllegalArgumentException
- if something isn't valid. Typically occurs when a property
is set when it should not be for the particular RELTYPE
, or the property is not set when it should be.BsoRuntimeException
- if a problem is detected with a local ID.
|
Collaboration API Documentation | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |