wt.clients.vc
Class VersionTaskLogic

java.lang.Object
  extended bywt.clients.vc.VersionTaskLogic

public class VersionTaskLogic
extends Object

Class VersionTaskLogic is a utility class which provides static methods for manipulating Versioned objects. These methods encapsulate the necessary server-side processing

Supported API: false

Extendable: false

See Also:
wt.vc.version.Versioned

Nested Class Summary
static class VersionTaskLogic.Server
          Inner class that acts a lightweight service which executes methods on the server to reduce unnecessary client to server traffic and data transfer.
 
Field Summary
private static String MESSAGES_RESOURCE
           
private static String SERVER_CLASS
           
private static String versionID
           
 
Constructor Summary
VersionTaskLogic()
           
 
Method Summary
static QueryResult getAllVersions(Mastered master)
          Returns all versions which correspond to the given Mastered object.
static Timestamp getCreationDate(Versionable versionable)
          Returns the create stamp for the given versionable object.
static Timestamp getCreationDate(Versioned versioned)
          Returns the create stamp for the given versionable object.
static WTPrincipal getCreator(Versioned versioned)
          Returns the WTPrincipal which created the given Versioned object.
static String getCurrentIterationIdentifier(Versioned versioned)
          Returns a String representation of the iteration identifier of the current Iteration of the given Versioned object.
static WTPrincipal getUpdater(Versioned versioned)
          Returns the WTPrincipal which most recently updated the given Versioned object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

versionID

private static final String versionID
See Also:
Constant Field Values

MESSAGES_RESOURCE

private static String MESSAGES_RESOURCE

SERVER_CLASS

private static final String SERVER_CLASS
Constructor Detail

VersionTaskLogic

public VersionTaskLogic()
Method Detail

getAllVersions

public static QueryResult getAllVersions(Mastered master)
                                  throws WTException
Returns all versions which correspond to the given Mastered object.

Supported API: false

Parameters:
master - the Mastered object for which all versions are to be returned
Returns:
a QueryResult containing all Versioned objects which are versions of the given master
Throws:
WTException - if an error occurs retrieving all versions of the given master
See Also:
wt.vc.version.Mastered, wt.vc.version.Versioned

getCurrentIterationIdentifier

public static String getCurrentIterationIdentifier(Versioned versioned)
                                            throws VersionControlException,
                                                   WTPropertyVetoException,
                                                   WTException
Returns a String representation of the iteration identifier of the current Iteration of the given Versioned object.

Supported API: false

Parameters:
versioned - the Versioned object for which the iteration identifier is returned
Returns:
the iteration identifier of the current iteration of the given Version in String format
Throws:
VersionException - if an error occurs retrieving the iteration identifier
WTPropertyVetoException - if an error occurs retrieving the iteration identifier
WTException - if an error occurs retrieving the iteration identifier
VersionControlException

getCreator

public static WTPrincipal getCreator(Versioned versioned)
                              throws VersionControlException,
                                     WTException
Returns the WTPrincipal which created the given Versioned object. If no creator is found, null is returned.

Supported API: false

Parameters:
versioned - the Versioned object for which the creator is returned
Returns:
the WTPrincipal which created the given Versioned object; returns null if no creator is found
Throws:
VersionException - if an error occurs retrieving the creator
WTException - if an error occurs retrieving the creator
VersionControlException
See Also:
wt.vc.version.Versioned

getUpdater

public static WTPrincipal getUpdater(Versioned versioned)
                              throws VersionControlException,
                                     WTException
Returns the WTPrincipal which most recently updated the given Versioned object. If no updater is found, null is returned.

Supported API: false

Parameters:
versioned - the Versioned object for which the updater is returned
Returns:
the WTPrincipal which updated the given Versioned object; returns null if no updater is found
Throws:
VersionException - if an error occurs retrieving the updater
WTException - if an error occurs retrieving the updater
VersionControlException
See Also:
wt.vc.version.Versioned

getCreationDate

public static Timestamp getCreationDate(Versionable versionable)
                                 throws WTException
Returns the create stamp for the given versionable object. The create stamp is taken from the create stamp of the first iteration in the given version.

Returns:
the Timestamp on which this version was created
Throws:
WTException

getCreationDate

public static Timestamp getCreationDate(Versioned versioned)
                                 throws WTException
Returns the create stamp for the given versionable object. The create stamp is taken from the create stamp of the first iteration in the given version.

Parameters:
versioned - the Versionable object whose create stamp is returned
Returns:
the Timestamp on which this version was created
Throws:
WTException