|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectwt.vc.VersionControlHelper
public final class VersionControlHelper
Provides access to the VersionControlService Application Programming
Interface (API) via the static reference VersionControlHelper.service
and several helper methods. Only one of the helper methods makes server-side
access: isReviseAllowed(wt.vc.Versioned, boolean).
This API includes static methods to make new iterations/versions, find
the predecessor of an iteration/version, find all the iteration(s) of
a version, and get cookie information. These methods can be categorized
as locally and remotely invokeable. The local methods are getters of
information, typically from cookies, that are held in the client or server.
The remote methods serve as wrappers to services that promote server-side
functionality to clients.
Supported API: true
Extendable: false
Mastered,
Iterated,
Versioned,
VersionControlService,
Serialized Form| Field Summary | |
|---|---|
static VersionControlService |
service
Supported API: true |
| Method Summary | |
|---|---|
static Iterated |
assignIterationBranch(Iterated iteration,
long branchId,
boolean latest)
Assigns a branch id and latest flag on the given iterated object to the given branch id and latest flag. |
static Iterated |
assignIterationCreator(Iterated iteration,
WTPrincipalReference creator)
Assigns a creator on the given iterated object to the given principal. |
static IterationIdentifier |
firstIterationId(Iterated iteration)
For the given Iterated object, return the First IterationIdentifier for the series Supported API: true |
static long |
getBranchIdentifier(Iterated iteration)
Gets the value of the iteration's branch id typed as it is returned from the POM's OID pool. |
static LocalizableMessage |
getIterationDisplayIdentifier(String versionId,
String oneOffVersionId,
String iterationId)
Using IdentityFactory methods gets the displayable identifier of a version or iteration
of an object given the String values of the object's various identifiers. |
static LocalizableMessage |
getIterationDisplayIdentifier(Versioned version)
Get the displayable identifier of the object's iteration. |
static IterationIdentifier |
getIterationIdentifier(Iterated iteration)
Gets the series value of the iteration. |
static WTPrincipalReference |
getIterationModifier(Iterated iteration)
Gets the creator/updater (reference) of the iteration. |
static Iterated |
getLatestIteration(Iterated iteration,
boolean includeMarkedForDelete)
Gets the "latest" iteration in the same branch as the given one. |
static String |
getNote(Iterated iteration)
Gets the note explaining why the iteration was created. |
static OneOffVersionIdentifier |
getOneOffVersionIdentifier(OneOffVersioned version)
Gets the series value of the version. |
static SearchCondition |
getSearchCondition(Class target,
boolean latest)
Gets a SearchCondition to be appended to a query to find object(s) of the target class that are the "latest" iteration(s). |
static SearchCondition |
getSearchCondition(Class target,
long branchId)
Gets a SearchCondition to be appended to a query to find object(s) of the target class that are in a branch. |
static SearchCondition |
getSearchCondition(Class target,
Mastered master)
Gets a SearchCondition to be appended to a query to find object(s) of the target class that belong to the same master. |
static SearchCondition |
getSearchCondition(Class target,
WTCollection objects,
boolean notIntheBranch)
Gets a SearchCondition to be appended to a query to find object(s) of the target class that are in a branch. |
static WTPrincipalReference |
getVersionCreator(Iterated iteration)
Gets the creator (reference) of the version. |
static LocalizableMessage |
getVersionDisplayIdentifier(Versioned version)
Get the displayable identifier of the object's version. |
static VersionIdentifier |
getVersionIdentifier(Versioned version)
Gets the series value of the version. |
static boolean |
hasPredecessor(Iterated iteration)
Tests if the given iteration has a predecessor. |
static void |
incrementIterationId(Iterated iteration)
For the given Iteration, Increment the IterationIdentifier of the Iteration. |
static void |
incrementVersionId(Versioned version)
For the given Iteration, Increment the VersionIdentifier of the Iteration. |
static boolean |
isAOneOff(OneOffVersioned version)
Returns true if the given version is a one-off version. |
static boolean |
isLatestIteration(Iterated iteration)
Tests if the given iteration is the latest, or last one in the version branch. |
static boolean |
isReviseAllowed(Versioned version,
boolean viewBranch)
This method decides if a wt.vc.Versioned object can be revised. |
static VersionIdentifier |
newBranchVersionId(Versioned version)
Returns a new Version Identifier on the next control branch. |
static Mastered |
newMasterFor(Iterated iteration)
Constructs a new Mastered object for the given Iterated object using introspection to determine the appropriate master class for the iteration and reflection to invoke that master class's no-arg factory method. |
static IterationIdentifier |
nextIterationId(Iterated iteration)
For the given Iteration, answer the next IterationIdentifier in the series Supported API: true |
static VersionIdentifier |
nextVersionId(Versioned version)
For the given Iteration, answer the next VersionIdentifier in the series Supported API: true |
static void |
setIterationIdentifier(Iterated iteration,
IterationIdentifier identifier)
Sets the series value of the iteration. |
static void |
setIterationModifier(Iterated iteration,
WTPrincipalReference creator)
Sets the creator/updater of the iteration. |
static void |
setNote(Iterated iteration,
String note)
Sets the note explaining why the iteration was created. |
static void |
setVersionIdentifier(Versioned version,
VersionIdentifier identifier)
Sets the series value of the version. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final VersionControlService service
| Method Detail |
|---|
public static Iterated getLatestIteration(Iterated iteration,
boolean includeMarkedForDelete)
throws WTException,
VersionControlException
iteration - includeMarkedForDelete -
WTException
VersionControlException
public static void setVersionIdentifier(Versioned version,
VersionIdentifier identifier)
throws WTException,
VersionControlException,
WTPropertyVetoException,
SeriesIncrementInvalidException
version - identifier -
WTException
VersionControlException
WTPropertyVetoException
SeriesIncrementInvalidException
public static VersionIdentifier getVersionIdentifier(Versioned version)
throws VersionControlException
version -
VersionControlException
public static final void incrementVersionId(Versioned version)
throws WTException,
VersionControlException,
WTPropertyVetoException,
SeriesIncrementInvalidException
version -
WTException
VersionControlException
WTPropertyVetoException
SeriesIncrementInvalidExceptionnextVersion
public static final VersionIdentifier nextVersionId(Versioned version)
throws WTException,
VersionControlException,
WTPropertyVetoException,
SeriesIncrementInvalidException
version -
WTException
VersionControlException
WTPropertyVetoException
SeriesIncrementInvalidException
public static final VersionIdentifier newBranchVersionId(Versioned version)
throws WTException,
VersionControlException,
WTPropertyVetoException
version -
WTException
VersionControlException
WTPropertyVetoException
public static void setIterationIdentifier(Iterated iteration,
IterationIdentifier identifier)
throws WTException,
VersionControlException,
WTPropertyVetoException,
SeriesIncrementInvalidException
iteration - identifier -
WTException
VersionControlException
WTPropertyVetoException
SeriesIncrementInvalidException
public static final IterationIdentifier firstIterationId(Iterated iteration)
throws WTException,
VersionControlException,
WTPropertyVetoException
iteration -
WTException
VersionControlException
WTPropertyVetoException
public static IterationIdentifier getIterationIdentifier(Iterated iteration)
throws VersionControlException
iteration -
VersionControlException
public static final void incrementIterationId(Iterated iteration)
throws WTException,
VersionControlException,
WTPropertyVetoException,
SeriesIncrementInvalidException
iteration -
WTException
VersionControlException
WTPropertyVetoException
SeriesIncrementInvalidExceptionnextIteration
public static final IterationIdentifier nextIterationId(Iterated iteration)
throws WTException,
VersionControlException,
WTPropertyVetoException,
SeriesIncrementInvalidException
iteration -
WTException
VersionControlException
WTPropertyVetoException
SeriesIncrementInvalidException
public static long getBranchIdentifier(Iterated iteration)
throws VersionControlException
iteration -
VersionControlException
public static void setIterationModifier(Iterated iteration,
WTPrincipalReference creator)
throws WTException,
VersionControlException,
WTPropertyVetoException
iteration - creator -
WTException
VersionControlException
WTPropertyVetoException
public static WTPrincipalReference getIterationModifier(Iterated iteration)
throws VersionControlException,
WTException
iteration -
VersionControlException
WTException
public static WTPrincipalReference getVersionCreator(Iterated iteration)
throws VersionControlException,
WTException
iteration -
VersionControlException
WTException
public static void setNote(Iterated iteration,
String note)
throws WTException,
VersionControlException,
WTPropertyVetoException
iteration - note -
WTException
VersionControlException
WTPropertyVetoException
public static String getNote(Iterated iteration)
throws VersionControlException
iteration -
VersionControlException
public static SearchCondition getSearchCondition(Class target,
Mastered master)
throws VersionControlException,
QueryException
target - master -
VersionControlException
QueryException
public static SearchCondition getSearchCondition(Class target,
long branchId)
throws VersionControlException,
QueryException
target - branchId -
VersionControlException
QueryException
public static SearchCondition getSearchCondition(Class target,
boolean latest)
throws VersionControlException,
QueryException
For example, if the given boolean is false then all objects, except the latest iteration(s) will be returned. Otherwise, only the latest iteration(s) are returned.
target - latest -
VersionControlException
QueryExceptionpublic static boolean hasPredecessor(Iterated iteration)
iteration -
public static boolean isLatestIteration(Iterated iteration)
iteration -
public static boolean isAOneOff(OneOffVersioned version)
version -
public static OneOffVersionIdentifier getOneOffVersionIdentifier(OneOffVersioned version)
throws VersionControlException
version -
VersionControlException
public static Mastered newMasterFor(Iterated iteration)
throws WTException
iteration -
WTException
public static SearchCondition getSearchCondition(Class target,
WTCollection objects,
boolean notIntheBranch)
throws VersionControlException,
QueryException,
WTException
target - Target Classobjects - Collection of Iterated objects for which the branch identifiers are used in the search condition.notIntheBranch - Flag to represent NOT IN condition in the search condition.
VersionControlException
QueryException
WTException
public static boolean isReviseAllowed(Versioned version,
boolean viewBranch)
throws WTException
WTException
public static Iterated assignIterationCreator(Iterated iteration,
WTPrincipalReference creator)
throws WTException,
VersionControlException,
WTPropertyVetoException
iteration - creator -
WTException
VersionControlException
WTPropertyVetoException
public static Iterated assignIterationBranch(Iterated iteration,
long branchId,
boolean latest)
throws WTException,
VersionControlException,
WTPropertyVetoException
iteration - branchId - latest -
WTException
VersionControlException
WTPropertyVetoException
public static LocalizableMessage getVersionDisplayIdentifier(Versioned version)
throws VersionControlException
version -
VersionControlException
public static LocalizableMessage getIterationDisplayIdentifier(Versioned version)
throws VersionControlException
version -
VersionControlException
public static LocalizableMessage getIterationDisplayIdentifier(String versionId,
String oneOffVersionId,
String iterationId)
IdentityFactory methods gets the displayable identifier of a version or iteration
of an object given the String values of the object's various identifiers.
versionId - - String value of a Versioned object's VersionIdentifieroneOffVersionId - - String value of a OneOffVersioned object's OneOffVersionIdentifieriterationId - - String value of a Versioned object's IterationIdentifier
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||