wt.vc
Class VersionControlServerHelper

java.lang.Object
  extended bywt.vc.VersionControlServerHelper

public final class VersionControlServerHelper
extends Object



Supported API: false

Extendable: false


Field Summary
private static String CLASSNAME
           
private static String RESOURCE
           
static VersionControlSvrService service
          

Supported API: false
static String VC_ALL_DELETED_ITERATIONS
           
 
Constructor Summary
VersionControlServerHelper()
           
 
Method Summary
static void carryForwardVersionCreator(Iterated orignal, Iterated next)
           
static ControlBranch getControlBranch(Iterated iteration)
          

Supported API: false
static WTCollection getControlBranches(WTCollection iterations)
          

Supported API: false
static Iterated getLatestIteration(long branchId)
          Gets the "latest" iteration in specified branch.
static Iterated getLatestIteration(long branchId, Class iteratedClass)
          Gets the "latest" iteration of the given class in the specified branch.
static WTKeyedHashMap getLatestIteration(WTCollection objectSet)
          For each object in the passed Iterated collection, the latest iteration on its branch is extracted from the persistent store.
static WTArrayList[] groupByBranch(WTCollection iterations)
          To group iterations according to branch identifier.
static WTHashSet[] groupByMaster(WTCollection iterations)
          To group iterations according to master reference.
static void inflateControlBranchesOf(WTCollection wtCollOfIteratedObjs)
          

Supported API: false
static void initalizeIterationCookies(Iterated iteration)
          NOTE: This should only be a Server side API Initalize the IterationInfo and VersionInfo of the iterated object.
static void initalizeIterationCookies(WTCollection iterations)
          NOTE: This should only be a Server side API Initalize the IterationInfo and VersionInfo of the iterated object.
protected static void makeLatest(Iterated newLatestIteration)
           
protected static void makeLatest(Iterated oldLatestIteration, Iterated newLatestIteration)
           
static void removeControlBranchFor(Iterated iteration)
          This will remove a ControlBranch entry from the DataBase.
static Versionable restoreVersionable(VersionForeignKey key)
          

Supported API: false
static void setBranchIdentifier(Iterated iteration, long branchId)
          

Supported API: false
static void setControlBranch(Iterated iteration)
          

Supported API: false
static void setLatestIfNecessary(Iterated iteration)
           
static void setLatestIfNecessary(WTCollection objectSet)
          A multi-object method to set latest flag on a set of Iterated objects.
 
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 VersionControlSvrService service


Supported API: false


VC_ALL_DELETED_ITERATIONS

public static final String VC_ALL_DELETED_ITERATIONS
See Also:
Constant Field Values
Constructor Detail

VersionControlServerHelper

public VersionControlServerHelper()
Method Detail

getLatestIteration

public static Iterated getLatestIteration(long branchId)
                                   throws WTException,
                                          VersionControlException
Gets the "latest" iteration in specified branch.

Supported API: false

Parameters:
branchId -
Returns:
Iterated
Throws:
WTException
VersionControlException

initalizeIterationCookies

public static void initalizeIterationCookies(Iterated iteration)
                                      throws VersionControlException
NOTE: This should only be a Server side API Initalize the IterationInfo and VersionInfo of the iterated object.

Supported API: false

Parameters:
iteration -
Throws:
VersionControlException

getControlBranch

public static ControlBranch getControlBranch(Iterated iteration)
                                      throws VersionControlException


Supported API: false

Parameters:
iteration -
Returns:
ControlBranch
Throws:
VersionControlException

getControlBranches

public static WTCollection getControlBranches(WTCollection iterations)
                                       throws VersionControlException


Supported API: false

Parameters:
iterations -
Returns:
WTCollection
Throws:
VersionControlException

setControlBranch

public static void setControlBranch(Iterated iteration)


Supported API: false

Parameters:
iteration -

setBranchIdentifier

public static void setBranchIdentifier(Iterated iteration,
                                       long branchId)
                                throws VersionControlException


Supported API: false

Parameters:
iteration -
branchId -
Throws:
VersionControlException

removeControlBranchFor

public static void removeControlBranchFor(Iterated iteration)
                                   throws VersionControlException
This will remove a ControlBranch entry from the DataBase. Typically needed only for iteration supersede and Version deletes.

Supported API: false

Parameters:
iteration -
Throws:
VersionControlException

restoreVersionable

public static Versionable restoreVersionable(VersionForeignKey key)
                                      throws VersionControlException


Supported API: false

Parameters:
key -
Returns:
Versionable
Throws:
VersionControlException

inflateControlBranchesOf

public static void inflateControlBranchesOf(WTCollection wtCollOfIteratedObjs)
                                     throws VersionControlException


Supported API: false

Parameters:
wtCollOfIteratedObjs -
Throws:
VersionControlException

groupByMaster

public static WTHashSet[] groupByMaster(WTCollection iterations)
                                 throws VersionControlException
To group iterations according to master reference.

Supported API: false

Parameters:
iterations -
Returns:
WTHashSet[]
Throws:
VersionControlException

groupByBranch

public static WTArrayList[] groupByBranch(WTCollection iterations)
                                   throws VersionControlException
To group iterations according to branch identifier.

Supported API: false

Parameters:
iterations -
Returns:
WTArrayList[]
Throws:
VersionControlException

initalizeIterationCookies

public static void initalizeIterationCookies(WTCollection iterations)
                                      throws VersionControlException
NOTE: This should only be a Server side API Initalize the IterationInfo and VersionInfo of the iterated object.

Supported API: false

Parameters:
iterations -
Throws:
VersionControlException

getLatestIteration

public static Iterated getLatestIteration(long branchId,
                                          Class iteratedClass)
                                   throws WTException,
                                          VersionControlException
Gets the "latest" iteration of the given class in the specified branch.

Supported API: false

Parameters:
branchId -
iteratedClass -
Returns:
Iterated
Throws:
WTException
VersionControlException

carryForwardVersionCreator

public static void carryForwardVersionCreator(Iterated orignal,
                                              Iterated next)

setLatestIfNecessary

public static void setLatestIfNecessary(Iterated iteration)
                                 throws VersionControlException
Throws:
VersionControlException

makeLatest

protected static void makeLatest(Iterated newLatestIteration)
                          throws VersionControlException
Throws:
VersionControlException

makeLatest

protected static void makeLatest(Iterated oldLatestIteration,
                                 Iterated newLatestIteration)
                          throws VersionControlException
Throws:
VersionControlException

setLatestIfNecessary

public static void setLatestIfNecessary(WTCollection objectSet)
                                 throws WTException
A multi-object method to set latest flag on a set of Iterated objects. For each object in the collection which is later than the current latest, the latest flag is set, current latest's latest flag is removed, added to a collection. The old latest objects collection is updated in a single update call.

Throws:
WTException

getLatestIteration

public static WTKeyedHashMap getLatestIteration(WTCollection objectSet)
                                         throws WTException
For each object in the passed Iterated collection, the latest iteration on its branch is extracted from the persistent store. The latest iteration is put the return map as value whose key is the iterated object passed as argument.

Parameters:
objectSet - collection of Iterated objects
Returns:
a WTKeyedHashMap containing the passed object as key and its corresponding latest iteration as the value.
Throws:
WTException