wt.inf.sharing
Class DefaultStructureSharingDelegate

java.lang.Object
  extended bywt.inf.sharing.DefaultStructureSharingDelegate
All Implemented Interfaces:
Externalizable, Serializable, StructureSharingDelegate

public class DefaultStructureSharingDelegate
extends Object
implements StructureSharingDelegate, Externalizable

Default structure sharing delegate. Methods in this class do nothing or return empty lists.

Supported API: false

Extendable: false

See Also:
Serialized Form

Field Summary
private static String CLASSNAME
           
static long EXTERNALIZATION_VERSION_UID
           
protected static long OLD_FORMAT_VERSION_UID
           
private static String RESOURCE
           
(package private) static long serialVersionUID
           
 
Constructor Summary
DefaultStructureSharingDelegate()
           
 
Method Summary
static ObjectIdentifier getOid(Object object)
           
 QueryResult getStructureObjects(Persistable struct_handle)
          Returns all objects in the structure to be shared given the handle.
 void processCheckIn(Iterated object)
          Adds and removes shared objects.
 void processCreateLink(BinaryLink link)
          Adds new objects to be shared.
 void processDeleteLink(Class link_class, QueryKey role_a_id, QueryKey role_b_id)
          Removes new objects from the shared table.
 void readExternal(ObjectInput input)
          Reads the non-transient fields of this class from an external source.
private  boolean readOldVersion(ObjectInput input, long readSerialVersionUID, boolean passThrough, boolean superDone)
          Reads the non-transient fields of this class from an external source, which is not the current version.
protected  boolean readVersion(DefaultStructureSharingDelegate thisObject, ObjectInput input, long readSerialVersionUID, boolean passThrough, boolean superDone)
          Reads the non-transient fields of this class from an external source.
 void writeExternal(ObjectOutput output)
          Writes the non-transient fields of this class to an external source.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

RESOURCE

private static final String RESOURCE
See Also:
Constant Field Values

CLASSNAME

private static final String CLASSNAME

serialVersionUID

static final long serialVersionUID
See Also:
Constant Field Values

EXTERNALIZATION_VERSION_UID

public static final long EXTERNALIZATION_VERSION_UID
See Also:
Constant Field Values

OLD_FORMAT_VERSION_UID

protected static final long OLD_FORMAT_VERSION_UID
See Also:
Constant Field Values
Constructor Detail

DefaultStructureSharingDelegate

public DefaultStructureSharingDelegate()
Method Detail

writeExternal

public void writeExternal(ObjectOutput output)
                   throws IOException
Writes the non-transient fields of this class to an external source.

Supported API: false

Specified by:
writeExternal in interface Externalizable
Parameters:
output -
Throws:
IOException

readExternal

public void readExternal(ObjectInput input)
                  throws IOException,
                         ClassNotFoundException
Reads the non-transient fields of this class from an external source.

Supported API: false

Specified by:
readExternal in interface Externalizable
Parameters:
input -
Throws:
IOException
ClassNotFoundException

readVersion

protected boolean readVersion(DefaultStructureSharingDelegate thisObject,
                              ObjectInput input,
                              long readSerialVersionUID,
                              boolean passThrough,
                              boolean superDone)
                       throws IOException,
                              ClassNotFoundException
Reads the non-transient fields of this class from an external source.

Supported API: false

Parameters:
thisObject -
input -
readSerialVersionUID -
passThrough -
superDone -
Returns:
boolean
Throws:
IOException
ClassNotFoundException

readOldVersion

private boolean readOldVersion(ObjectInput input,
                               long readSerialVersionUID,
                               boolean passThrough,
                               boolean superDone)
                        throws IOException,
                               ClassNotFoundException
Reads the non-transient fields of this class from an external source, which is not the current version.

Parameters:
input -
readSerialVersionUID -
passThrough -
superDone -
Returns:
boolean
Throws:
IOException
ClassNotFoundException

getStructureObjects

public QueryResult getStructureObjects(Persistable struct_handle)
                                throws WTException
Returns all objects in the structure to be shared given the handle.

Supported API: false

Specified by:
getStructureObjects in interface StructureSharingDelegate
Parameters:
struct_handle -
Returns:
QueryResult
Throws:
WTException

processCreateLink

public void processCreateLink(BinaryLink link)
                       throws WTException
Adds new objects to be shared. This method is called when a new link is created so that the SharedContainerMap can be appropriately updated. Typically when a new link is created between a shared object and an object that is not shared, this latter object should be added to the map.

Supported API: false

Specified by:
processCreateLink in interface StructureSharingDelegate
Parameters:
link -
Throws:
WTException

processDeleteLink

public void processDeleteLink(Class link_class,
                              QueryKey role_a_id,
                              QueryKey role_b_id)
Removes new objects from the shared table. This method is called when a link is deleted so that the SharedContainerMap can be appropriately updated. Typically when a link is deleted between two shared objects, it may be the case that one of them should be removed from the shared table. Exactly which object depends on the type of link. For example, for usage links, the object that plays the USES role should be removed.

Supported API: false

Specified by:
processDeleteLink in interface StructureSharingDelegate
Parameters:
link_class -
role_a_id -
role_b_id -

processCheckIn

public void processCheckIn(Iterated object)
                    throws WTException
Adds and removes shared objects. This method is called when an Iterated object is created. Typically when an object is checked in, new relationships are added or removed and new shared objects may be added or removed.

Supported API: false

Specified by:
processCheckIn in interface StructureSharingDelegate
Parameters:
object -
Throws:
WTException

getOid

public static ObjectIdentifier getOid(Object object)