public class ChangeHelper
extends Object
implements RemoteAccess
Modifier and Type | Field and Description |
---|---|
static String |
LATESTMODE_CREATE |
static String |
LATESTMODE_LINK |
static String |
LATESTMODE_MODIFY |
static int |
MAJOR |
static int |
MINOR |
Constructor and Description |
---|
ChangeHelper() |
Modifier and Type | Method and Description |
---|---|
static Persistable |
addToChangeActivity(Class linkClass,
Changeable2 changeable,
WTChangeActivity2 ca)
link a changeable to a change activity
|
static ChangeRecord2 |
addToChangeActivityResulting(Changeable2 changeable,
WTChangeActivity2 ca)
link a changeable to a change activity as resulting object
|
static WTChangeOrder2 |
addToChangeOrder(Object changeable,
Map meta)
TODO javadoc
|
static WTChangeActivity2 |
createChangeActivity(Changeable2 changeable,
WTChangeOrder2 co,
Map meta)
create a change activity , using the following information from the meta Map:
key
type
used for
default
Number
String
number for object, will get "-a" appended
null
CA-Description
String
description attribute
if empty checks the key Description
Description
String
description attribute
- no description supplied -
NeedDate
Timestamp
date needed
State
String
lifecycle state
RESOLVED
|
static WTChangeOrder2 |
createChangeOrder(Object changeable,
Map meta)
create a change order for a changeable, getting data from meta Map:
for now hardcode some things - may need changing if more flexible usecase is met
meta has to contain the following keys:
name
number (if empty use OIR)
delay (defaults to 30 (days))
state (defaults to RESOLVED)
description (default=empty)
|
static WTChangeOrder2 |
createChangeOrder2(Object changeable,
Map meta) |
static List<Changeable2> |
getChangeablesOfChangeOrder(WTChangeOrder2 co) |
static WTChangeOrder2 |
getChangeOrderByNumber(String changeNumber) |
static WTChangeActivity2 |
getLatestChangeActivity(Changeable2 changeObj,
String changeNumber,
boolean considerECM) |
static WTChangeActivity2 |
getLatestChangeActivity(Changeable2 changeObj,
String changeNumber,
boolean considerECM,
String latestMode) |
static WTChangeActivity2 |
getLatestChangeActivityForChangeable(Changeable2 changeable) |
static WTChangeActivity2 |
getLatestChangeActivityForChangeable(Changeable2 changeable,
String latestMode) |
static WTChangeOrder2 |
getLatestChangeOrder(Changeable2 changeObj,
String changeNumber,
boolean considerECM) |
static WTChangeOrder2 |
getLatestChangeOrder(Changeable2 changeObj,
String changeNumber,
boolean considerECM,
String latestMode) |
static WTChangeActivity2 |
getRelatedChangeActivity(WTChangeOrder2 co) |
static void |
loadChangesFromFile(String[] a)
TODO javadoc
|
public static final String LATESTMODE_MODIFY
public static final String LATESTMODE_CREATE
public static final String LATESTMODE_LINK
public static final int MAJOR
public static final int MINOR
public static WTChangeActivity2 getLatestChangeActivity(Changeable2 changeObj, String changeNumber, boolean considerECM) throws Exception
Exception
public static WTChangeActivity2 getLatestChangeActivity(Changeable2 changeObj, String changeNumber, boolean considerECM, String latestMode) throws Exception
Exception
public static WTChangeOrder2 getLatestChangeOrder(Changeable2 changeObj, String changeNumber, boolean considerECM) throws Exception
Exception
public static WTChangeOrder2 getLatestChangeOrder(Changeable2 changeObj, String changeNumber, boolean considerECM, String latestMode) throws Exception
Exception
public static WTChangeOrder2 getChangeOrderByNumber(String changeNumber) throws Exception
Exception
public static WTChangeActivity2 getRelatedChangeActivity(WTChangeOrder2 co) throws Exception
Exception
public static List<Changeable2> getChangeablesOfChangeOrder(WTChangeOrder2 co) throws Exception
Exception
public static WTChangeActivity2 createChangeActivity(Changeable2 changeable, WTChangeOrder2 co, Map meta) throws Exception
key | type | used for | default |
---|---|---|---|
Number | String | number for object, will get "-a" appended | null |
CA-Description | String | description attribute | if empty checks the key Description |
Description | String | description attribute | - no description supplied - |
NeedDate | Timestamp | date needed | |
State | String | lifecycle state | RESOLVED |
changeable
- the changeable objectco
- the change ordermeta
- Map with additional dataException
public static Persistable addToChangeActivity(Class linkClass, Changeable2 changeable, WTChangeActivity2 ca) throws Exception
linkClass
- the class to use to link objectschangeable
- the changeableca
- the change activityException
public static WTChangeActivity2 getLatestChangeActivityForChangeable(Changeable2 changeable) throws Exception
Exception
public static WTChangeActivity2 getLatestChangeActivityForChangeable(Changeable2 changeable, String latestMode) throws Exception
Exception
public static ChangeRecord2 addToChangeActivityResulting(Changeable2 changeable, WTChangeActivity2 ca) throws Exception
changeable
- the changeableca
- the change activityException
public static WTChangeOrder2 addToChangeOrder(Object changeable, Map meta) throws Exception
changeable
- meta
- Exception
public static void loadChangesFromFile(String[] a) throws Exception
a
- Exception
public static WTChangeOrder2 createChangeOrder(Object changeable, Map meta) throws Exception
create a change order for a changeable, getting data from meta Map: for now hardcode some things - may need changing if more flexible usecase is met meta has to contain the following keys: name number (if empty use OIR) delay (defaults to 30 (days)) state (defaults to RESOLVED) description (default=empty)
changeable
- the object to create change order formeta
- input dataException
public static WTChangeOrder2 createChangeOrder2(Object changeable, Map meta) throws Exception
Exception