public class WorkflowHelper
extends Object
Modifier and Type | Field and Description |
---|---|
static String |
CVSVersion |
static State[] |
validReleaseStates |
static String |
VERSION |
Constructor and Description |
---|
WorkflowHelper() |
Modifier and Type | Method and Description |
---|---|
static WTChangeActivity2 |
addAsResultingItem(WTObject o,
Vector v)
Add object to a change activity.
|
static void |
addAsResultingItemToCA(WTChangeActivity2 ca,
Vector v)
Add objects to an existing change activity.
|
static void |
addRole(LifeCycleManaged o,
String role,
WTPrincipal u)
Add a role (with user) to an object.
|
static void |
addRole(RevisionControlled o,
String role,
WTPrincipal u)
Add a role (with user) to an object.
|
static boolean |
checkLCStatus(LifeCycleManaged lm)
Check lifecycle-status of an epmdoc and all sub components.
|
static ManagedBaseline |
createBaseLine(EPMDocument drw)
Create a baseline
|
static WTChangeActivity2 |
createChangeActivity(WTChangeOrder2 co)
Create change activity for a given change order
|
static WTChangeActivity2 |
createChangeActivity(WTChangeOrder2 co,
boolean addChangeables)
Create change activity for a given change order
|
static WTChangeActivity2 |
createChangeActivity(WTChangeOrder2 co,
Hashtable h)
Create change activity
|
static WTChangeOrder2 |
createChangeOrder(Hashtable h)
Create change order for a given change request and set need date
|
static WTChangeOrder2 |
createChangeOrder(WTChangeRequest2 cr)
Create change order for a given change request
|
static WTChangeOrder2 |
createChangeOrder(WTChangeRequest2 cr,
int diff)
Create change order for a given change request and set need date
|
static WTChangeOrder2 |
createChangeOrder(WTChangeRequest2 cr,
String name,
int diff)
Create change order for a given change request and set need date
|
static WTChangeRequest2 |
createChangeRequest(WTChangeIssue ci)
Create change request for a given change issue (problem report)
|
static WTChangeRequest2 |
createChangeRequest(WTChangeIssue ci,
String orderNumber)
Create change request for a given change issue (problem report)
|
static WTObject[] |
createCOCA(WTObject obj,
String description,
int diff,
Hashtable coAttribs)
Create a new Change Order and Change activity for a given object.
|
static WTPart |
createNewPart(String num,
String name,
String folder)
Create a wtpart with a webject/task
|
static WTPart |
createNewPartVersion(String num,
String name,
String folder)
Create a new part or revise an existing one.
|
static WTPart |
createNewPartVersion(String num,
String name,
String version,
String folder)
Create a new part or revise an existing one.
|
static WTPart |
createNewPartVersion(String num,
String name,
String version,
String folder,
RevisionControlled tiff)
Create a new part or revise an existing one.
|
static WTDocument |
createNewTiff(WTPart p,
String num,
String name,
String type,
String department,
String lc,
String folder)
Create a new tiff doc.
|
static WTDocument |
createNewTiffDocVersion(RevisionControlled p,
String num,
String name,
String type,
String department,
String lc,
String folder,
String cont)
Create a new tiff doc or revise an existing one.
|
static WTDocument |
createTiffForDrw(EPMDocument drw)
Create a tiff and add it to a vaultdrawing
|
static WTDocument |
createVaultDrawing(String num,
String version,
String name,
String folder,
String cont,
RevisionControlled p)
Create a typed document with a webject/task
|
static void |
deleteLink(String linkclass,
Persistable a,
String role,
Persistable b,
boolean checkOut)
Delete a link between two objects.
|
static void |
deletePredecessorLink(String linkclass,
RevisionControlled a,
String role,
RevisionControlled b,
boolean checkOut)
Search the link between object a and predecessor of b and delete it.
|
static WTPart |
doesPartExist(String num,
String version)
Check wether there exists a WTPart with the same number.
|
static WTDocument |
doesTiffExist(String num)
Check wether there exists a WTDocument with the same number.
|
static QueryResult |
getChangeablesAfter(ChangeActivityIfc ca)
Get affected data AFTER for a change activity
|
static QueryResult |
getChangeablesBefore(ChangeActivityIfc ca)
Get affected data BEFORE for a change activity
|
static WTChangeActivity2 |
getChangeActivity(WTObject o)
Get a change activity for a given object.
|
static EPMDocument |
getCompForDrw(EPMDocument drw)
Get the component (EPMDocument type CADASSEMBLY or CADCOMPONENT) for a given drawing.
|
static Vector |
getCompForDrw(EPMDocument drw,
Vector models)
Get the components (EPMDocument type CADASSEMBLY or CADCOMPONENT) for a given drawing.
|
static EPMDocument |
getEPMDocument(String num,
String vers)
Get EPMDocument for a given number and version
|
static WTPrincipal |
getPrincipalForRole(LifeCycleManaged o,
String role)
Add a role (with user) to an object.
|
static WTUser |
getReviewer(String userid,
String role)
Search all team templates where the user belongs to.
|
static WTUser |
getReviewer(WTUser u,
String role)
Search all team templates where the user belongs to.
|
static TeamTemplate |
getTeamTemplate(String userid,
String role)
Search all team templates where the user belongs to and the given
role ist also available.
|
static TeamTemplate |
getTeamTemplate(WTUser u,
String role)
Search all team templates where the user belongs to and the given
role ist also available.
|
static WTPrincipal |
getUserByRole(Role r,
TeamManaged o)
Get a user from a team of an object determined by a role.
|
static WTDocument |
getWTDocument(String num,
String vers)
Get wtdocument for a given number and version
|
static WTPart |
getWTPart(String num,
String vers)
Get wtpart for a given number and version
|
static Vector |
getWTPartForEPMDoc(EPMDocument epm)
Get WTPart for a given epmdocument.
|
static Vector |
getWTPartForEPMDocPassiveLink(EPMDocument epm)
Get WTPart for a given epmdocument by navigating over "passive" link.
|
static Group |
invokeTask(String taskURI,
Hashtable h,
String groupName)
invoke a tasks
|
static boolean |
isChangeableReleased(ChangeActivityIfc ca)
Check if all changeale data is released.
|
static boolean |
isGeneric(EPMDocument epmdoc)
Check wether epmdoc is generic
|
static boolean |
isValidReleaseStatus(State s)
Is state a valid release state.
|
static String |
linkDoc2WTPart(WTDocument doc,
EPMDocument e) |
static void |
linkDoc2WTPart(WTDocument doc,
WTPart part)
Link a doc to a part and delete the link from the part to the
predecessor version of the document.
|
static void |
linkDoc2WTPart(WTDocument doc,
WTPart part,
boolean checkOut)
Link a doc to a part and delete the link from the part to the
predecessor version of the document
|
static void |
linkDoc2WTParts(WTDocument doc,
Vector parts)
Link a doc to a part and delete the link from the part to the
predecessor version of the document.
|
static void |
linkDrw2WTPart(EPMDocument mydrw,
WTPart mypart)
Link a CADDrawing to a WTPart.
|
static void |
linkDrw2WTPart(EPMDocument mydrw,
WTPart mypart,
boolean checkOut)
Link a CADDrawing to a WTPart
|
static void |
linkDrw2WTParts(EPMDocument mydrw,
Vector v)
Link a CADDrawing to a vector of WTParts.
|
static String |
removeDrwExtension(String s)
Remove extension ".drw" from string.
|
static void |
replaceRole(LifeCycleManaged o,
String role,
WTPrincipal u)
Replace a role (with user) of an object.
|
static WTPart |
revisePart(WTPart part,
String version)
Revise part and set new part to a specific version.
|
static WTDocument |
reviseTiff(WTDocument doc)
Revise tiff doc.
|
static void |
setStateForObjects(State s,
Vector v)
Set state a vector of objects
|
static void |
setVersion(Versioned o,
String newversion)
Change Version of an object.
|
static void |
updateObject(WTObject wto,
Hashtable fields)
Update object, check out is not performed.
|
static void |
updateObject(WTObject o,
String name,
String value)
Update object, check out is not performed.
|
static void |
updateProcessVariable(Persistable obj,
String name,
Object value)
Update variable in a running process for a given object
|
static boolean |
updateReviewer(LifeCycleManaged o,
String submitter,
String reviewer)
Update reviewer based for a given object.
|
static void |
updateTeam(Role r,
WTPrincipal p,
TeamManaged o)
Update a team for an object.
|
static boolean |
versionLessThan(Versioned a,
Versioned b)
Compare version of objects
|
public static final String VERSION
public static final String CVSVersion
public static State[] validReleaseStates
public static boolean isValidReleaseStatus(State s)
State
- - state to verifypublic static String removeDrwExtension(String s)
String
- s the stringpublic static WTDocument createNewTiff(WTPart p, String num, String name, String type, String department, String lc, String folder)
epmDocument
- EPMDocument objectpublic static WTDocument reviseTiff(WTDocument doc)
WTDocument
- doc the document to revisepublic static WTPart revisePart(WTPart part, String version) throws WTException, WTPropertyVetoException
WTPart
- part the part to reviseString
- versionWTException
WTPropertyVetoException
public static WTDocument doesTiffExist(String num)
num
- String number of documentpublic static WTPart doesPartExist(String num, String version)
num
- String number of documentpublic static WTDocument createNewTiffDocVersion(RevisionControlled p, String num, String name, String type, String department, String lc, String folder, String cont) throws Exception
epmDocument
- EPMDocument objectException
public static WTPart createNewPartVersion(String num, String name, String folder) throws Exception
epmDocument
- EPMDocument objectException
public static WTPart createNewPartVersion(String num, String name, String version, String folder) throws Exception
epmDocument
- EPMDocument objectException
public static WTPart createNewPartVersion(String num, String name, String version, String folder, RevisionControlled tiff) throws Exception
String
- num - number of wtpart to create or reviseString
- name - name of wtpart to create or reviseString
- version - version of wtpart to create or reviseString
- folder - folder for new objectRevisionControlled
- tiff - tiff to create part version forException
public static void linkDrw2WTPart(EPMDocument mydrw, WTPart mypart)
mydrw
- EPMDocument the drawingmypart
- WTPart the WTPartpublic static void linkDrw2WTParts(EPMDocument mydrw, Vector v)
mydrw
- EPMDocument the drawingVector
- vector with partspublic static void linkDrw2WTPart(EPMDocument mydrw, WTPart mypart, boolean checkOut)
mydrw
- EPMDocument the drawingmypart
- WTPart the WTPartboolean
- specify wether to create a new iteration or not (checkout)public static void updateProcessVariable(Persistable obj, String name, Object value) throws WTException
obj
- Persistable any pbo with a workflowname
- String process variable namevalue
- Object process variable valueWTException
public static void linkDoc2WTPart(WTDocument doc, WTPart part)
doc
- WTDocument the documentpart
- WTPart the partpublic static void linkDoc2WTParts(WTDocument doc, Vector parts)
doc
- WTDocument the documentpart
- WTPart the partpublic static void deleteLink(String linkclass, Persistable a, String role, Persistable b, boolean checkOut) throws Exception
String
- linkclass between these objectsPersistable
- aString
- role of object aPersistable
- bboolean
- checkOut - true if object is checked outException
public static WTPrincipal getPrincipalForRole(LifeCycleManaged o, String role)
LifeCycleManaged
- o - the object to add the roleString
- role - the role to addwt.org.WTPrincipal
- u - user or group to add to rolepublic static boolean updateReviewer(LifeCycleManaged o, String submitter, String reviewer) throws WTException
LifeCycleManaged
- o - the object to add the roleboolean
- - true if updated objectWTException
public static void addRole(RevisionControlled o, String role, WTPrincipal u)
RevisionControlled
- o - the object to add the roleString
- role - the role to addwt.org.WTPrincipal
- u - user or group to add to rolepublic static void addRole(LifeCycleManaged o, String role, WTPrincipal u)
LifeCycleManaged
- o - the object to add the roleString
- role - the role to addwt.org.WTPrincipal
- u - user or group to add to rolepublic static void replaceRole(LifeCycleManaged o, String role, WTPrincipal u) throws WTException
LifeCycleManaged
- o - the object to replace the roleString
- role - the role to addwt.org.WTPrincipal
- u - user or group to replace to roleWTException
public static void deletePredecessorLink(String linkclass, RevisionControlled a, String role, RevisionControlled b, boolean checkOut)
String
- linkclass between these objectsRevisionControlled
- aString
- role of object aRevisionControlled
- bboolean
- checkOut - true if object is checked outpublic static void linkDoc2WTPart(WTDocument doc, WTPart part, boolean checkOut)
doc
- WTDocument the documentboolean
- specify wether create a new iteration or notpart
- WTPart the partpublic static ManagedBaseline createBaseLine(EPMDocument drw)
EPMDcoument
- drw - the drawing to create the baseline forpublic static WTUser getReviewer(WTUser u, String role)
String
- user - the user's idString
- role - role to searchpublic static WTUser getReviewer(String userid, String role)
String
- user - the user's idString
- role - role to searchpublic static TeamTemplate getTeamTemplate(String userid, String role)
String
- user - the user's idString
- role - the orlepublic static TeamTemplate getTeamTemplate(WTUser u, String role)
WTUser
- user - the user's idString
- role - the orlepublic static WTPart getWTPart(String num, String vers)
String
- num - number to serachString
- vers - version to serachpublic static EPMDocument getEPMDocument(String num, String vers)
String
- num - number to serachString
- vers - version to serachpublic static WTDocument getWTDocument(String num, String vers)
String
- num - number to serachString
- vers - version to serachpublic static boolean isGeneric(EPMDocument epmdoc)
epm
- EPMDocument the epmdocpublic static void setStateForObjects(State s, Vector v)
epm
- EPMDocument the genericpublic static Vector getWTPartForEPMDoc(EPMDocument epm)
epmDocument
- EPMDocument objectnavigateOverModel
- boolean navigate direct or over modelpublic static Vector getWTPartForEPMDocPassiveLink(EPMDocument epm)
epmDocument
- EPMDocument objectpublic static EPMDocument getCompForDrw(EPMDocument drw)
epm
- EPMDocument objectpublic static boolean checkLCStatus(LifeCycleManaged lm)
lm
- LifeCycleManaged objectpublic static WTChangeRequest2 createChangeRequest(WTChangeIssue ci, String orderNumber) throws WTException, Exception
WTChangeIssue
- ci - problem reportString
- orderNumber - order number of change requestWTException
Exception
public static WTChangeRequest2 createChangeRequest(WTChangeIssue ci) throws WTException, Exception
WTChangeIssue
- ci - problem reportWTException
Exception
public static WTChangeOrder2 createChangeOrder(WTChangeRequest2 cr) throws Exception
WTChangeRequest2
- cr - the change requestException
public static WTChangeOrder2 createChangeOrder(WTChangeRequest2 cr, int diff) throws Exception
WTChangeRequest2
- cr - the change requestint
- diff - need date is set to today+diff (in days)Exception
public static WTChangeOrder2 createChangeOrder(WTChangeRequest2 cr, String name, int diff) throws Exception
WTChangeRequest2
- cr - the change requestString
- name - name of change orderint
- diff - need date is set to today+diff (in days)Exception
public static WTChangeOrder2 createChangeOrder(Hashtable h) throws Exception
Hashtable
- h - Hashtable with values for change orderException
public static WTChangeActivity2 createChangeActivity(WTChangeOrder2 co) throws Exception
WTChangeOrder2
- cr - the change requestException
public static WTChangeActivity2 createChangeActivity(WTChangeOrder2 co, boolean addChangeables) throws Exception
WTChangeOrder2
- cr - the change requestboolean
- addChangeables - if true, add changeables from ChangeRequest also to change activityException
public static WTChangeActivity2 createChangeActivity(WTChangeOrder2 co, Hashtable h) throws Exception
WTChangeOrder2
- co - Hashtable with values for change activityHashtable
- h - Hashtable with values for change activityVector
- v - Vector with changeablesException
public static WTChangeActivity2 getChangeActivity(WTObject o) throws Exception
WTObject
- o - Object to add to a caException
public static WTObject[] createCOCA(WTObject obj, String description, int diff, Hashtable coAttribs) throws Exception
WTObject
- o - Object to add to a caException
public static WTChangeActivity2 addAsResultingItem(WTObject o, Vector v) throws Exception
WTObject
- o - Object to add to a caVector
- v - Additional objects to add to caException
public static void addAsResultingItemToCA(WTChangeActivity2 ca, Vector v) throws Exception
WTChangeActivity2
- - Object to add to a caVector
- v - objects to add to caException
public static WTDocument createVaultDrawing(String num, String version, String name, String folder, String cont, RevisionControlled p) throws Exception
Hashtable
- h - contains all parametersException
public static WTPart createNewPart(String num, String name, String folder) throws Exception
Hashtable
- h - contains all parametersException
public static Group invokeTask(String taskURI, Hashtable h, String groupName) throws Exception
String
- taskURI - name of task (uri)Hashtable
- h - contains all parametersString
- groupName - name of group to returnException
public static void updateTeam(Role r, WTPrincipal p, TeamManaged o)
Role
- r - the roleWTPrincipal
- p - user or group to addTeamManaged
- o - the objectpublic static WTPrincipal getUserByRole(Role r, TeamManaged o)
Role
- r - the roleTeamManaged
- o - the objectpublic static void setVersion(Versioned o, String newversion)
Versioned
- o - the objectpublic static void updateObject(WTObject o, String name, String value) throws Exception
WTObject
- o - the objectString
- name - parameter nameString
- value - parameter valueException
public static void updateObject(WTObject wto, Hashtable fields) throws Exception
WTObject
- o - the objectHashtable
- fields - parameters and valuesException
public static QueryResult getChangeablesBefore(ChangeActivityIfc ca)
ChangeActivityIfc
- ca - the change activitypublic static QueryResult getChangeablesAfter(ChangeActivityIfc ca)
ChangeActivityIfc
- ca - the change activitypublic static boolean isChangeableReleased(ChangeActivityIfc ca)
ChangeActivityIfc
- ca - the change activitypublic static boolean versionLessThan(Versioned a, Versioned b) throws VersionControlException
Versioned
- a - object aVersioned
- b - object bVersionControlException
public static WTDocument createTiffForDrw(EPMDocument drw) throws Exception
Versioned
- a - object aVersioned
- b - object bException
public static Vector getCompForDrw(EPMDocument drw, Vector models)
ReviewReport2
- rpublic static String linkDoc2WTPart(WTDocument doc, EPMDocument e) throws Exception
Exception