|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.tivoli.twg.engine.TWGObject
com.tivoli.twg.engine.TWGRelationship
The TWGRelationship
class is used to represent
relationship "nodes" within a relationship set
(TWGRelationshipSet
). TWGRelationship
objects cannot be shared between TWGRelationshipSets
.
Each TWGRelationship
object consists of a list of one or
more links
, each of which is upward
(towards
the root of a tree representation) or downward
(away
from the root). peer
relationships are represented by
two downward links under the same TWGRelationship
object.
One upward
link (if any exist) must be marked
primary
, allowing a simple tree view to be presented.
Each link is directed to either a TWGManagedObject
(downward
links only) or another
TWGRelationship
. Also, each TWGRelationship
instance is either named or contains a reference to a
TWGManagedObject
which "is" the middle of the
TWGRelationship
(i.e. the server
in a
client-server
relationship might be set to the middle
reference, with one downward
link for each client,
while the TWGRelationship
representing a "Workgroup"
would just be named based on the workgroup name).
TWGRelationship
instances should be assigned ID
strings when constructed, to allow easier lookup of existing
instances in a TWGRelationshipSet
by
TWGAssociation
subclasses. If an ID isn't provided,
the ID will be generated based on the object ID of the
TWGRelationship
instance.
TWGAssociation
,
TWGManagedObject
,
TWGRelationshipSet
,
IntValueSet
Field Summary | |
---|---|
static int |
ATTRIB_FLAGS_USE_REL_DATA
Attribute flag denoting console should use mo data instead of ro |
static long |
NO_IS_A_MANAGED_OBJECT
No is-a managed object associated with relationship |
static long |
NO_PRIMARY_UPLINK_ID
ID returned when no primary uplink is defined |
Constructor Summary | |
---|---|
TWGRelationship(TWGRelationship parent,
TWGRelationshipSet rel_set,
java.lang.String relationship_id)
Constructor for relationship instance : creates instance of relationship with given parent relationship and given relationship set. |
|
TWGRelationship(TWGRelationship parent,
TWGRelationshipSet rel_set,
java.lang.String relationship_id,
TWGImageSet imageset)
Constructor for relationship instance : creates instance of relationship with given parent relationship and given relationship set. |
Method Summary | |
---|---|
void |
AddDownLink(long oid)
Add downward link to object ID |
void |
AddDownLink(LongValueSet oids)
Add downward link to object IDs |
void |
AddDownLink(TWGManagedObject obj)
Add downward link to TWGManagedObject instance |
void |
AddDownLink(TWGRelationship obj)
Add downward link to TWGRelationship instance |
void |
AddUpLink(TWGRelationship obj)
Add upward link to TWGRelationship |
void |
AttachObjectToConsole(TWGActiveConsole act_con)
Associate the object with the given TWGActiveConsole instance. |
boolean |
containsDownLink(long oid)
Test if given object is a down-link |
void |
Delete()
Delete method for object |
void |
DetachObjectFromAllConsoles()
Disassociate the object from all TWGActiveConsoles . |
void |
DetachObjectFromConsole(TWGActiveConsole act_con)
Disassociate the object from the given TWGActiveConsole
instance. |
java.lang.String |
GetConShadowClass()
Get name of console shadow class. |
LongValueSet |
getDownLinks()
Get the set of downlinks for this relationship |
TWGManagedObject |
getIsAObject()
Get object associated with relationship |
java.lang.String |
getName()
Get name of relationship (use default locale) |
java.lang.String |
getName(java.util.Locale loc)
Get name of relationship (using given locale) |
long |
getPrimaryUplinkID()
Get object ID of the primary up-link, or NO_PRIMARY_UPLINK_ID if
none defined. |
java.lang.String |
getRelationshipID()
Get relationship ID string |
byte[] |
GetShadowRecord(java.util.Locale locale)
Get buffer containing current values of the shadowed attributes to be delivered to the console shadow class. |
long |
GetShadowVersion()
Get object state version. |
boolean |
isRelationshipConsoleInfo()
Test if the console should get the image to display and the name to label the object with from the relationship object rather than from the managed object for the case where the relationship object is a managed object. |
void |
removeAllLinksToManagedObject(TWGManagedObject mo)
Remove all links to given managed object: used when TWGManagedObject is deleted. |
void |
removeAllLinksToManagedObjectList(IntValueSet mo_set)
Remove all links to list of managed object IDs |
void |
removeAllLinksToManagedObjectList(LongValueSet mo_set)
Remove all links to list of managed object IDs |
void |
RemoveDownLink(long oid)
Remove downward link to object ID |
void |
RemoveDownLink(LongValueSet oids)
Remove downward link to object IDs |
void |
RemoveDownLink(TWGManagedObject obj)
Remove downward link to TWGManagedObject |
void |
RemoveDownLink(TWGRelationship obj)
Remove downward link to TWGRelationship |
void |
RemoveUpLink(TWGRelationship obj)
Remove upward link to TWGRelationship |
void |
setIsAObject(TWGManagedObject obj)
Set managed object association with relationship |
void |
setName(java.lang.String n)
Set name of relationship |
void |
setName(java.lang.String nameid,
java.lang.String namerb)
Set name of relationship using resouce bundle name and ID |
void |
setPrimaryUplinkID(long new_oid)
Set object ID of the primary up-link, or zero if none defined |
void |
setRelationshipConsoleInfo(boolean useRelData)
Set attribute flag indicating that for this relationship object, if the relationship is a managed object, then the console should get the image to display and the name to label the object with from the relationship object instead of from the managed object. |
void |
setRelationshipID(java.lang.String new_id)
Set relationship ID string |
void |
UpdateShadowVersion()
Update object state version. |
Methods inherited from class com.tivoli.twg.engine.TWGObject |
---|
AllObjects, AllObjects, Destroy, DumpTWGObjects, FindObject, isDeleted, isNewObject, isPersistent, isPersistent, isValid, isValid, ObjectID, setDistinctObjectID, SetObjectID |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final long NO_PRIMARY_UPLINK_ID
public static final long NO_IS_A_MANAGED_OBJECT
public static final int ATTRIB_FLAGS_USE_REL_DATA
Constructor Detail |
public TWGRelationship(TWGRelationship parent, TWGRelationshipSet rel_set, java.lang.String relationship_id) throws InvalidObjectIDException
parent
is specified, a
downlink from the parent
to the new relationship object
is automatically added.
parent
- - Parent ("primary up-link") TWGRelationship
,
or null if nonerel_set
- - TWGRelationshipSet
to contain new
TWGRelationship
relationship_id
- - ID string of relationship object
InvalidObjectIDException
- if invalid object
InvalidObjectIDException
public TWGRelationship(TWGRelationship parent, TWGRelationshipSet rel_set, java.lang.String relationship_id, TWGImageSet imageset) throws InvalidObjectIDException
parent
is specified, a
downlink from the parent
to the new relationship object
is automatically added.
parent
- - Parent ("primary up-link") TWGRelationship
,
or null if nonerel_set
- - TWGRelationshipSet
to contain new
TWGRelationship
relationship_id
- - ID string of relationship objectimageset
- - Set of images for association - images needed:
index 0 is 16x16 'open'
index 1 is 16x16 'closed'
index 2 is 32x32 'open'
index 3 is 32x32 'closed'
null if no images for relationship
InvalidObjectIDException
- if invalid object
InvalidObjectIDException
Method Detail |
public void Delete()
Delete
in class TWGObject
public void AddDownLink(TWGManagedObject obj) throws InvalidObjectIDException
TWGManagedObject
instance
obj
- - object to be added
InvalidObjectIDException
- if invalid object
InvalidObjectIDException
public void AddDownLink(TWGRelationship obj) throws InvalidObjectIDException
TWGRelationship
instance
obj
- - object to be added
InvalidObjectIDException
- if invalid object
InvalidObjectIDException
public void AddDownLink(long oid)
oid
- - object ID to be addedpublic void AddDownLink(LongValueSet oids)
oids
- - object IDs to be addedpublic void RemoveDownLink(TWGManagedObject obj) throws InvalidObjectIDException
TWGManagedObject
obj
- - object to be removed
InvalidObjectIDException
- if invalid object
InvalidObjectIDException
public void RemoveDownLink(TWGRelationship obj) throws InvalidObjectIDException
TWGRelationship
obj
- - object to be removed
InvalidObjectIDException
- if invalid object
InvalidObjectIDException
public void RemoveDownLink(long oid)
oid
- - object ID to be removedpublic void RemoveDownLink(LongValueSet oids)
oids
- - object IDs to be removedpublic void AddUpLink(TWGRelationship obj) throws InvalidObjectIDException
TWGRelationship
obj
- - object to be added
InvalidObjectIDException
- if invalid object
InvalidObjectIDException
public void RemoveUpLink(TWGRelationship obj) throws InvalidObjectIDException
TWGRelationship
obj
- - object to be removed
InvalidObjectIDException
- if invalid object
InvalidObjectIDException
public boolean containsDownLink(long oid)
down-link
oid
- - object ID to be tested
public java.lang.String getName()
public java.lang.String getName(java.util.Locale loc)
loc
- - locale of request
public void setName(java.lang.String n)
n
- - new namepublic void setName(java.lang.String nameid, java.lang.String namerb)
nameid
- - identifier for namenamerb
- - name of resouce bundle containing namepublic void setIsAObject(TWGManagedObject obj) throws InvalidObjectIDException
obj
- - TWGManagedObject
associated with
relationship, or null if none
InvalidObjectIDException
- if
invalid object
InvalidObjectIDException
public TWGManagedObject getIsAObject()
TWGManagedObject
, or null if nonepublic java.lang.String getRelationshipID()
public void setRelationshipID(java.lang.String new_id)
new_id
- - new ID string valuepublic void setRelationshipConsoleInfo(boolean useRelData)
useRelData
- if true, use the data from the relationship object,
otherwise use the data from the managed object.public boolean isRelationshipConsoleInfo()
public void UpdateShadowVersion()
TWGActiveConsole.nextShadowVersion()
to update its
internal state_version
attribute (a long
instance variable).
This method should be called by any methods of the object's class or subclasses which modify attributes which are send to the shadow objects on the console).
UpdateShadowVersion
in interface TWGBaseShadowedObject
public long GetShadowVersion()
state_version
.
GetShadowVersion
in interface TWGBaseShadowedObject
state_version
attribute valuepublic java.lang.String GetConShadowClass()
GetConShadowClass
in interface TWGBaseShadowedObject
com.tivoli.twg.engine.TWGConObject
subclass
which object shadows topublic byte[] GetShadowRecord(java.util.Locale locale)
GetShadowRecord
in interface TWGBaseShadowedObject
locale
- - Locale
of requested data
public void AttachObjectToConsole(TWGActiveConsole act_con)
TWGActiveConsole
instance.
This method should simply call the
TWGActiveConsole.objectAddToConsole()
method.
AttachObjectToConsole
in interface TWGConsoleSpecShadowedObject
act_con
- - Active console instance to be associated withpublic void DetachObjectFromConsole(TWGActiveConsole act_con)
TWGActiveConsole
instance. This method should simply call the
TWGActiveConsole.objectRemoveFromConsole()
method.
DetachObjectFromConsole
in interface TWGConsoleSpecShadowedObject
act_con
- - Active console instance to be disassociated frompublic void DetachObjectFromAllConsoles()
TWGActiveConsoles
.
This method should simply call the
TWGActiveConsole.objectRemoveFromAllConsoles()
method.
DetachObjectFromAllConsoles
in interface TWGConsoleSpecShadowedObject
public long getPrimaryUplinkID()
NO_PRIMARY_UPLINK_ID
if
none defined.
NO_PRIMARY_UPLINK_ID
if nonepublic void setPrimaryUplinkID(long new_oid)
new_oid
- - new value for uplink object, or
NO_PRIMARY_UPLINK_ID
if nonepublic LongValueSet getDownLinks()
public void removeAllLinksToManagedObject(TWGManagedObject mo)
TWGManagedObject
is deleted.
mo
- - managed object to be scrubbed from
TWGRelationship
public void removeAllLinksToManagedObjectList(LongValueSet mo_set)
mo_set
- - list of managed object IDs to be scrubbedpublic void removeAllLinksToManagedObjectList(IntValueSet mo_set)
mo_set
- - list of managed object persistent IDs to be scrubbed
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |