|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectwt.ixb.util.IXBVersionHelper
helps publish objects with mapped version and iteration ids. -the setNewVersionIteration() method is useful to create new objects -the iterateOrRevise() method is useful for creating subsequent versions or iterations -the versionMappingType parameter in these methods determines the mapping policy -the version and iteration indexes are zero based.
Field Summary | |
static String |
CHECKOUT_WORKSPACE_NAME_KEY
|
private static boolean |
DEBUG
|
private static String |
MAP_NONE
versionMappingType value - NONE just create a new iteration for every new piv. |
private static String |
MAP_VERSION
versionMappingType value - VERSION revise the object if necessary, iterates otherwise |
private static String |
MAP_VERSION_ITERATION
versionMappingType value - VERSION_ITERATION revise the object if necessary, else creates new iteration with specified iteration id |
Constructor Summary | |
IXBVersionHelper()
|
Method Summary | |
static Workable |
checkinWorkable(Workable workable)
|
static Workable |
checkoutWorkable(Workable workable)
|
static Workable |
checkoutWorkable(Workable workable,
Folder checkoutFolder)
|
static int |
compareVersion(Versioned versioned,
int targetVersionIndex)
determine if part needs to be revised -1 if target version is before the versioned object 0 if target version is same as the versioned object 1 if target version is a successor |
static Versioned |
createPreviousIterator(Iterated iteration,
IntegerSeries iterationSeries)
|
private static void |
createTestPart(String number,
String versionMappingType)
|
private static String |
getEPMDocIdentifier(EPMDocument doc)
|
static int |
getIterationIndex(IntegerSeries iterationSeries)
|
static IntegerSeries |
getIterationSeries(int iterationIndex)
utility fn to create a series obj used to set iterations. |
static String |
getObjectIdentifier(Workable workable)
|
private static String |
getPartIdentifier(WTPart part)
|
static int |
getVersionIndex(String version)
|
static MultilevelSeries |
getVersionSeries(int versionIndex)
utility fn to create a series obj used to set versions currently returns 'A' for 0, 'D'for 3 ... |
private static String |
getWTDocIdentifier(WTDocument doc)
|
static int |
isSuccessor(Versioned versioned,
int targetVersionIndex,
int targetIterationIndex)
checks if target version,iteration is really a successor for example an object B.3 can have C.4 as a successor -2 if target version is before the versioned object -1 if target iteration is before the versioned object 0 if target is same as the versioned object 1 if target iteration is a successor 2 if target version is a successor |
private static Versioned |
iterate(Versioned source_object)
creates a new iteration for the versioned object iteration id is next in sequence |
private static Versioned |
iterate(Versioned source_object,
int targetIterationIndex)
creates a new iteration for the versioned object iterationIndex, if used, is the 0 based index to the target iteration id. |
static Versioned |
iterateOrRevise(Versioned versioned,
int targetVersionIndex,
int targetIterationIndex,
Boolean[] wasRevised)
|
private static Versioned |
iterateOrRevise(Versioned versioned,
int targetVersionIndex,
int targetIterationIndex,
String versionMappingType,
Boolean[] wasRevised)
iterates or revises a Versioned object The versionMappingType decides which mapping to apply - NONE, VERSION, VERSION_ITERATION versionIndex, if used, is the 0 based index to the target version id for example pass 0 for 'A', 3 for 'D' ,... |
static void |
main(String[] args)
|
private static void |
PP(String msg)
|
private static Versioned |
revise(Versioned source_object,
int targetVersionIndex)
revises a versioned object targetVersionIndex is the 0 based index to the version id for example pass 3 for 'D' ,... |
private static Versioned |
revise(Versioned source_object,
int targetVersionIndex,
int targetIterationIndex)
revises a versioned object targetVersionIndex is the 0 based index to the version id for example pass 3 for 'D' ,... |
private static void |
reviseTestPart(String number,
String versionMappingType)
|
static void |
setNewIteration(Versioned versioned,
int targetIterationIndex)
sets the iteration for a new Versioned object call this before the object is saved iterationIndex is the 0 based index to the target iteration id for example pass 0 for '1', 3 for '4' ,... |
static void |
setNewVersion(Versioned versioned,
int targetVersionIndex)
sets the version for a new Versioned object call this before the object is saved versionIndex is the 0 based index to the target version id for example pass 0 for 'A', 3 for 'D' ,... |
static void |
setNewVersionIteration(Versioned versioned,
int targetVersionIndex,
int targetIterationIndex)
|
private static void |
setNewVersionIteration(Versioned versioned,
int targetVersionIndex,
int targetIterationIndex,
String versionMappingType)
sets the version and iteration for a new Versioned object call this before the object is saved The versionMappingType decides which mapping to apply - NONE, VERSION, VERSION_ITERATION versionIndex, if used, is the 0 based index to the target version id for example pass 0 for 'A', 3 for 'D' ,... |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final String CHECKOUT_WORKSPACE_NAME_KEY
private static final String MAP_NONE
private static final String MAP_VERSION
private static final String MAP_VERSION_ITERATION
private static boolean DEBUG
Constructor Detail |
public IXBVersionHelper()
Method Detail |
public static void setNewVersionIteration(Versioned versioned, int targetVersionIndex, int targetIterationIndex) throws WTException
WTException
private static void setNewVersionIteration(Versioned versioned, int targetVersionIndex, int targetIterationIndex, String versionMappingType) throws WTException
WTException
private static Versioned iterateOrRevise(Versioned versioned, int targetVersionIndex, int targetIterationIndex, String versionMappingType, Boolean[] wasRevised) throws WTException
WTException
public static Versioned iterateOrRevise(Versioned versioned, int targetVersionIndex, int targetIterationIndex, Boolean[] wasRevised) throws WTException
WTException
public static void setNewVersion(Versioned versioned, int targetVersionIndex) throws WTException
WTException
public static void setNewIteration(Versioned versioned, int targetIterationIndex) throws WTException
WTException
public static int compareVersion(Versioned versioned, int targetVersionIndex) throws WTException
WTException
public static int isSuccessor(Versioned versioned, int targetVersionIndex, int targetIterationIndex) throws WTException
WTException
private static Versioned revise(Versioned source_object, int targetVersionIndex) throws WTException
WTException
private static Versioned revise(Versioned source_object, int targetVersionIndex, int targetIterationIndex) throws WTException
WTException
private static Versioned iterate(Versioned source_object, int targetIterationIndex) throws WTException
WTException
private static Versioned iterate(Versioned source_object) throws WTException
WTException
public static MultilevelSeries getVersionSeries(int versionIndex) throws WTException
WTException
public static int getVersionIndex(String version) throws WTException
WTException
public static IntegerSeries getIterationSeries(int iterationIndex) throws WTException
WTException
public static int getIterationIndex(IntegerSeries iterationSeries) throws WTException
WTException
public static Versioned createPreviousIterator(Iterated iteration, IntegerSeries iterationSeries) throws WTException
WTException
public static void main(String[] args)
private static void createTestPart(String number, String versionMappingType) throws Exception
Exception
private static void reviseTestPart(String number, String versionMappingType) throws Exception
Exception
public static Workable checkoutWorkable(Workable workable, Folder checkoutFolder) throws WTException
WTException
public static Workable checkoutWorkable(Workable workable) throws WTException
WTException
public static Workable checkinWorkable(Workable workable) throws WTException
WTException
private static String getPartIdentifier(WTPart part) throws WTException
WTException
private static String getEPMDocIdentifier(EPMDocument doc) throws WTException
WTException
private static String getWTDocIdentifier(WTDocument doc) throws WTException
WTException
public static String getObjectIdentifier(Workable workable) throws WTException
WTException
private static void PP(String msg)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |