wt.ufid
Class FederatableServerHelper

java.lang.Object
  extended bywt.ufid.FederatableServerHelper

public class FederatableServerHelper
extends Object



Supported API: false

Extendable: false


Nested Class Summary
protected static class FederatableServerHelper.OwnerRepositoryUtil
          Class to bundle query spec's for the Repository class *
protected static class FederatableServerHelper.RemoteObjectUtil
          Utility class for magement of the RemoteObjectInfo *
private static class FederatableServerHelper.ReposCache
           
static class FederatableServerHelper.RepositoryCache
           
protected static class FederatableServerHelper.RepositoryUtil
          Class to bundle query spec's for the Repository class *
 
Field Summary
private static String CLASSNAME
           
private static String RESOURCE
           
static UfidSrvService service
          

Supported API: false
private static boolean VERBOSE
           
 
Constructor Summary
FederatableServerHelper()
           
 
Method Summary
static Repository createRepository(Repository repos)
           
static void deleteUfid(Federatable object)
          This method is to be used to delete UFID information from database when instead of deleting the Federatable object, the object is disabled (WTUser & WTGroups) For all other objects that are deleted from the database, event listeners in the Ufid service will manage the delete of the ufid.
static QueryResult findCorrespondingObjects(Vector ufids)
          

Supported API: false
static WTCollection getLocallyOwnedAmong(WTCollection objectSet)
          From the given set of objects, returns a subset of objects which are locally owned.
static Repository getLocalRepository()
          Answer the Repository of the current system.
static Repository getOwningRepository(Federatable localObject)
          This will return the Repository that has been spcified as the Owning Repository.
static WTCollection getRemotelyOwnedAmong(WTCollection objectSet)
          From the given set of objects, returns a subset of objects which are remotely owned.
static Repository getRepository(ObjectIdentifier oid)
          This will answer a Repository based on the guid String.
static Repository getRepository(String guid)
          This will answer a Repository based on the guid String.
private static Repository getRepositoryFromDB(String guid)
           
static boolean isBirthRepository(Federatable object)
          This will answer the Repository from which the object was created.
static boolean isBirthRepository(Ufid ufid)
          This will answer the Repository from which the object was created.
static boolean isLocallyOwned(Federatable object)
          Answers true if the Federatable is localy owned.
static boolean knownRepository(Repository repos)
          For the specified Repository, a check will be made on the local system to determine if the given repository has already been persisted on this system.
static void makeObjectLocal(Federatable object)
          

Supported API: false
static void makeObjectRemote(Federatable object, Repository newRepository)
          

Supported API: false
static Repository queryForLocalRepository()
           
static Repository queryForRepository(Repository repos)
           
 
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

service

public static final UfidSrvService service


Supported API: false


VERBOSE

private static final boolean VERBOSE
Constructor Detail

FederatableServerHelper

public FederatableServerHelper()
Method Detail

isLocallyOwned

public static boolean isLocallyOwned(Federatable object)
                              throws UfidException
Answers true if the Federatable is localy owned. This means that there is an entry in the OwnerRepositoryLocalObjec link table for the specified object.

Supported API: false

Parameters:
object -
Returns:
boolean
Throws:
UfidException

knownRepository

public static boolean knownRepository(Repository repos)
                               throws UfidException
For the specified Repository, a check will be made on the local system to determine if the given repository has already been persisted on this system.

Supported API: false

Parameters:
repos -
Returns:
boolean
Throws:
UfidException

getRepository

public static Repository getRepository(String guid)
                                throws UfidException
This will answer a Repository based on the guid String. If none is found null is returned.

Supported API: false

Parameters:
guid -
Returns:
Repository
Throws:
UfidException

getRepository

public static Repository getRepository(ObjectIdentifier oid)
                                throws UfidException
This will answer a Repository based on the guid String. If none is found null is returned.

Supported API: false

Parameters:
oid -
Returns:
Repository
Throws:
UfidException

getLocalRepository

public static Repository getLocalRepository()
                                     throws UfidException
Answer the Repository of the current system. There should only ever be a single Repository representing the local system.

Supported API: false

Returns:
Repository
Throws:
UfidException

getOwningRepository

public static Repository getOwningRepository(Federatable localObject)
                                      throws UfidException
This will return the Repository that has been spcified as the Owning Repository. There can only be one owning repository for an object. Null is returned if there is no owning repository. This will be the case for local objects, and any remote object for which ownership had been taken.

Supported API: false

Parameters:
localObject -
Returns:
Repository
Throws:
UfidException

isBirthRepository

public static boolean isBirthRepository(Ufid ufid)
                                 throws UfidException
This will answer the Repository from which the object was created. This will work for either remote or local objects. In the case of a local objec it will answer the local Repository.

Supported API: false

Parameters:
ufid -
Returns:
boolean
Throws:
UfidException

isBirthRepository

public static boolean isBirthRepository(Federatable object)
                                 throws UfidException
This will answer the Repository from which the object was created. This will work for either remote or local objects. In the case of a local objec it will answer the local Repository.

Supported API: false

Parameters:
object -
Returns:
boolean
Throws:
UfidException

makeObjectRemote

public static void makeObjectRemote(Federatable object,
                                    Repository newRepository)
                             throws UfidException


Supported API: false

Parameters:
object -
newRepository -
Throws:
UfidException

makeObjectLocal

public static void makeObjectLocal(Federatable object)
                            throws UfidException


Supported API: false

Parameters:
object -
Throws:
UfidException

getLocallyOwnedAmong

public static WTCollection getLocallyOwnedAmong(WTCollection objectSet)
                                         throws WTException
From the given set of objects, returns a subset of objects which are locally owned. This means that there is no entry in the OwningRepositoryLocalObject table for the entries in the subset.

Supported API: false

Parameters:
objectSet -
Returns:
WTCollection
Throws:
WTException

getRemotelyOwnedAmong

public static WTCollection getRemotelyOwnedAmong(WTCollection objectSet)
                                          throws WTException
From the given set of objects, returns a subset of objects which are remotely owned. This means that there is an entry in the OwningRepositoryLocalObject table from the entries in the subset.

Supported API: false

Parameters:
objectSet -
Returns:
WTCollection
Throws:
WTException

deleteUfid

public static void deleteUfid(Federatable object)
                       throws UfidException
This method is to be used to delete UFID information from database when instead of deleting the Federatable object, the object is disabled (WTUser & WTGroups) For all other objects that are deleted from the database, event listeners in the Ufid service will manage the delete of the ufid.

Supported API: false

Parameters:
object -
Throws:
UfidException

findCorrespondingObjects

public static QueryResult findCorrespondingObjects(Vector ufids)
                                            throws UfidException


Supported API: false

Returns:
Federatable
Throws:
UfidException

queryForLocalRepository

public static final Repository queryForLocalRepository()
                                                throws WTException
Throws:
WTException

queryForRepository

public static final Repository queryForRepository(Repository repos)
                                           throws WTException
Throws:
WTException

createRepository

public static final Repository createRepository(Repository repos)
                                         throws WTException
Throws:
WTException

getRepositoryFromDB

private static Repository getRepositoryFromDB(String guid)
                                       throws WTException
Throws:
WTException