wt.ufid
Class StandardUfidSrvService

java.lang.Object
  extended bywt.services.StandardManager
      extended bywt.ufid.CommonUfidService
          extended bywt.ufid.StandardUfidSrvService
All Implemented Interfaces:
Manager, NetFactor, Serializable, UfidSrvService

public class StandardUfidSrvService
extends CommonUfidService
implements UfidSrvService

Use the newStandardUfidSrvService static factory method(s), not the StandardUfidSrvService constructor, to construct instances of this class. Instances must be constructed using the static factory(s), in order to ensure proper initialization of the instance.



Supported API: false

Extendable: false

See Also:
Serialized Form

Field Summary
private static String CLASSNAME
           
private static String DISPLAY_NAME
           
private static String GUID
           
private static String RESOURCE
           
private static boolean VERBOSE
           
 
Fields inherited from class wt.services.StandardManager
 
Fields inherited from interface wt.services.Manager
MANAGER_SERVICE, STARTUP_AUTOMATIC, STARTUP_MANUAL, STATUS_EMERGENCY_SHUTDOWN, STATUS_EMERGENCY_SHUTTING_DOWN, STATUS_SHUTDOWN, STATUS_SHUTDOWN_ERRORS, STATUS_SHUTDOWN_FAILURE, STATUS_SHUTTING_DOWN, STATUS_STARTED, STATUS_STARTED_ERRORS, STATUS_STARTING_UP, STATUS_STARTUP_FAILURE
 
Constructor Summary
StandardUfidSrvService()
           
 
Method Summary
 void assignAndStoreUfid(Federatable object, Ufid ufid)
          

Supported API: false
 WTKeyedHashMap assignAndStoreUfid(WTKeyedHashMap map)
          The input map contains the Federatable objects as key and their corresponding Ufid as value.
 Federatable changeLastKnownDomain(Federatable object, String new_domain)
          

Supported API: false
 WTCollection changeLastKnownDomain(WTCollection objectSet, String newDomain)
          Change the last known domain of the objects in the collection to the new domain specified

Supported API: false
 boolean compareUfids(Ufid ufid1, Ufid ufid2)
          

Supported API: false
 Federatable findCorrespondingObject(Ufid ufid)
          

Supported API: false
 QueryResult findCorrespondingObjects(String guid)
          Answer the QueryResult of all local objects for the given GUID

Supported API: false
 HashMap findCorrespondingObjectSet(Vector ufids)
          Returns a map containing the the Ufid as key and corresponding Federatable as value

Supported API: false
 WTKeyedHashMap findCorrespondingObjectsForGuids(Vector guids)
          Returns a map with the guid as key and corresponding QueryResult as value

Supported API: false
 String getConceptualClassname()
          Deprecated.  
private  Federatable getLocalObject(Ufid ufid)
           
 Ufid getUfid(Federatable object)
          Returns the UFID of the Federatable.
private  String getUfidId(String oid, String guid)
           
private  HashMap getUfidMap(Vector ufids)
           
 WTKeyedHashMap getUfids(WTCollection objectSet)
          Returns a map with the Federatable object as key and its Ufid as value

Supported API: false
 boolean hasCorrespondingObject(Ufid ufid)
          Answers true if a local object for the given UFID exists in the repository

Supported API: false
static StandardUfidSrvService newStandardUfidSrvService()
          Default factory for the class.
protected  void performStartupProcess()
          

Supported API: false
private  Hashtable processUfids(Collection ufids)
           
 void setFederationInfoIfNecessary(Federatable object)
           
 void setUfid(Federatable object)
          Sets the UFID of the specified object.
 void setUfid(Federatable object, Ufid ufid)
          This should be used when ever a Federatable object is going to be Exported.
 void setUfid(WTCollection objectSet)
          Sets the UFID on each object in the objectSet.
 void setUfid(WTKeyedHashMap map)
          This should be used when ever a set of Federatable objects are going to be Exported.
 void storeUfidIfNecessary(Federatable target)
          

Supported API: false
 void storeUfidIfNecessary(WTCollection objectSet)
          

Supported API: false
private  boolean valueNotInMap(WTKeyedHashMap map, Ufid ufid)
           
 
Methods inherited from class wt.services.StandardManager
emergencyShutdown, emergencyShutdownComplete, emergencyShuttingDown, getClassInfo, getManagerService, getManagerStatus, getName, getStartupType, init, initialize, initialize, isStarted, newStandardManager, newStandardManager, performEmergencyShutdownProcess, performShutdownProcess, registerEvents, setManagerService, shutdown, shutdownFailure, shutdownSuccess, shuttingDown, started, startedErrors, startingUp, startup, startupFailure, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

RESOURCE

private static final String RESOURCE
See Also:
Constant Field Values

CLASSNAME

private static final String CLASSNAME

GUID

private static final String GUID

DISPLAY_NAME

private static final String DISPLAY_NAME

VERBOSE

private static final boolean VERBOSE
Constructor Detail

StandardUfidSrvService

public StandardUfidSrvService()
Method Detail

getConceptualClassname

public String getConceptualClassname()
Deprecated.  

Returns the conceptual (modeled) name for the class.

Supported API: false

Specified by:
getConceptualClassname in interface NetFactor
Overrides:
getConceptualClassname in class StandardManager
Returns:
String

performStartupProcess

protected void performStartupProcess()
                              throws ManagerException


Supported API: false

Overrides:
performStartupProcess in class StandardManager
Throws:
ManagerException

newStandardUfidSrvService

public static StandardUfidSrvService newStandardUfidSrvService()
                                                        throws WTException
Default factory for the class.

Supported API: false

Returns:
StandardUfidSrvService
Throws:
WTException

setUfid

public void setUfid(Federatable object)
Sets the UFID of the specified object. If the object is local the ufid will be basis the Local Repository. If the object is a Remote object, the Ufid will be reconstituted from the RemoteObjectInfo. If the object is a locally owned remote object, then the Ufid will be build from its orignal guid and remoteId but with the local repositories domain.

Supported API: false

Specified by:
setUfid in interface UfidSrvService
Parameters:
object -

setUfid

public void setUfid(Federatable object,
                    Ufid ufid)
This should be used when ever a Federatable object is going to be Exported. This method employs delegates to do the actual work, this way any object that has special needs when setting the Ufid, can be implemented in a delegate.

Supported API: false

Specified by:
setUfid in interface UfidSrvService
Parameters:
object -
ufid -

getUfid

public Ufid getUfid(Federatable object)
             throws UfidException
Returns the UFID of the Federatable. Null if it has not been set.

Supported API: false

Specified by:
getUfid in interface UfidSrvService
Parameters:
object -
Returns:
Ufid
Throws:
UfidException

changeLastKnownDomain

public Federatable changeLastKnownDomain(Federatable object,
                                         String new_domain)


Supported API: false

Specified by:
changeLastKnownDomain in interface UfidSrvService
Parameters:
object -
new_domain -
Returns:
Federatable

compareUfids

public boolean compareUfids(Ufid ufid1,
                            Ufid ufid2)


Supported API: false

Specified by:
compareUfids in interface UfidSrvService
Parameters:
ufid1 -
ufid2 -
Returns:
boolean

findCorrespondingObjects

public QueryResult findCorrespondingObjects(String guid)
Answer the QueryResult of all local objects for the given GUID

Supported API: false

Specified by:
findCorrespondingObjects in interface UfidSrvService
Parameters:
guid -
Returns:
QueryResult

findCorrespondingObject

public Federatable findCorrespondingObject(Ufid ufid)
                                    throws UfidException


Supported API: false

Specified by:
findCorrespondingObject in interface UfidSrvService
Parameters:
ufid -
Returns:
Federatable
Throws:
UfidException

hasCorrespondingObject

public boolean hasCorrespondingObject(Ufid ufid)
                               throws UfidException
Answers true if a local object for the given UFID exists in the repository

Supported API: false

Specified by:
hasCorrespondingObject in interface UfidSrvService
Parameters:
ufid -
Returns:
boolean
Throws:
UfidException

assignAndStoreUfid

public void assignAndStoreUfid(Federatable object,
                               Ufid ufid)
                        throws UfidException


Supported API: false

Specified by:
assignAndStoreUfid in interface UfidSrvService
Parameters:
object -
ufid -
Throws:
UfidException

storeUfidIfNecessary

public void storeUfidIfNecessary(Federatable target)
                          throws WTException


Supported API: false

Specified by:
storeUfidIfNecessary in interface UfidSrvService
Parameters:
target -
Throws:
WTException

assignAndStoreUfid

public WTKeyedHashMap assignAndStoreUfid(WTKeyedHashMap map)
                                  throws UfidException
The input map contains the Federatable objects as key and their corresponding Ufid as value.

Supported API: false

Specified by:
assignAndStoreUfid in interface UfidSrvService
Parameters:
map -
Returns:
WTKeyedHashMap
Throws:
UfidException

changeLastKnownDomain

public WTCollection changeLastKnownDomain(WTCollection objectSet,
                                          String newDomain)
Change the last known domain of the objects in the collection to the new domain specified

Supported API: false

Specified by:
changeLastKnownDomain in interface UfidSrvService
Parameters:
objectSet - Map of Federatable objects as key and corresponding new domain string as value
newDomain -
Returns:
WTCollection

findCorrespondingObjectSet

public HashMap findCorrespondingObjectSet(Vector ufids)
                                   throws UfidException
Returns a map containing the the Ufid as key and corresponding Federatable as value

Supported API: false

Specified by:
findCorrespondingObjectSet in interface UfidSrvService
Parameters:
ufids - Vector of Ufids for which corresponding objects are needed.
Returns:
HashMap
Throws:
UfidException

findCorrespondingObjectsForGuids

public WTKeyedHashMap findCorrespondingObjectsForGuids(Vector guids)
Returns a map with the guid as key and corresponding QueryResult as value

Supported API: false

Specified by:
findCorrespondingObjectsForGuids in interface UfidSrvService
Parameters:
guids - Vector of guids
Returns:
WTKeyedHashMap

getUfids

public WTKeyedHashMap getUfids(WTCollection objectSet)
                        throws UfidException
Returns a map with the Federatable object as key and its Ufid as value

Supported API: false

Specified by:
getUfids in interface UfidSrvService
Parameters:
objectSet -
Returns:
WTKeyedHashMap
Throws:
UfidException

setUfid

public void setUfid(WTCollection objectSet)
Sets the UFID on each object in the objectSet. If the object is local the ufid will be basis the Local Repository. If the object is a Remote object, the Ufid will be reconstituted from the RemoteObjectInfo. If the object is a locally owned remote object, then the Ufid will be build from its orignal guid and remoteId but with the local repositories domain.

Supported API: false

Specified by:
setUfid in interface UfidSrvService
Parameters:
objectSet -

setUfid

public void setUfid(WTKeyedHashMap map)
This should be used when ever a set of Federatable objects are going to be Exported. This method employs delegates to do the actual work, this way any object that has special needs when setting the Ufid, can be implemented in a delegate.

Supported API: false

Specified by:
setUfid in interface UfidSrvService
Parameters:
map - Map with the Federatable object as key and its corresponding Ufid as value

storeUfidIfNecessary

public void storeUfidIfNecessary(WTCollection objectSet)
                          throws WTException


Supported API: false

Specified by:
storeUfidIfNecessary in interface UfidSrvService
Parameters:
objectSet -
Throws:
WTException

setFederationInfoIfNecessary

public void setFederationInfoIfNecessary(Federatable object)
                                  throws WTPropertyVetoException
Throws:
WTPropertyVetoException

getLocalObject

private Federatable getLocalObject(Ufid ufid)
                            throws UfidException
Throws:
UfidException

processUfids

private Hashtable processUfids(Collection ufids)

getUfidMap

private HashMap getUfidMap(Vector ufids)

getUfidId

private String getUfidId(String oid,
                         String guid)

valueNotInMap

private boolean valueNotInMap(WTKeyedHashMap map,
                              Ufid ufid)
                       throws UfidException
Throws:
UfidException