public class WFUtil
extends java.lang.Object
Constructor and Description |
---|
WFUtil() |
Modifier and Type | Method and Description |
---|---|
static org.jdom.Document |
getActivitiesDocument(java.lang.String ticket,
java.lang.String pageSetName)
Returns the Activities XML for the given page set name, or
null
if the page set does not have workflow activities configured. |
static org.jdom.Document |
getRoleDocument(java.lang.String ticket,
java.lang.String pageSetName,
java.lang.String roleName)
Get the role document for the given role name and page set.
|
static WFRule[] |
parseWFRules(org.jdom.Element wFRulesElement) |
static WizardRole |
parseWizardRole(org.jdom.Document roleXml)
Parses the wizard role XML into a WizardRole object.
|
static java.lang.String |
stringifyOperator(java.lang.String operator)
Stringifies a non-proximity date rule operator.
|
static java.lang.String |
stringifyProximityOperator(java.lang.String operator,
org.jdom.Element rule)
Stringifies a roximity date rule operator.
|
static java.lang.String |
stringifyRule(org.jdom.Element rule)
Takes the given rule element and returns it as a human readable string.
|
public static WFRule[] parseWFRules(org.jdom.Element wFRulesElement)
public static WizardRole parseWizardRole(org.jdom.Document roleXml)
roleXml
- the role XML documentpublic static java.lang.String stringifyRule(org.jdom.Element rule) throws java.lang.Exception
rule
- the rule XMLjava.lang.Exception
- if an error occurs.public static java.lang.String stringifyProximityOperator(java.lang.String operator, org.jdom.Element rule) throws java.lang.Exception
operator
- the operatorrule
- the Rule element. This is needed to get the proximity days.java.lang.Exception
- if an error occursIOpenContentRule
public static java.lang.String stringifyOperator(java.lang.String operator)
operator
- the operatorIOpenContentRule
public static org.jdom.Document getActivitiesDocument(java.lang.String ticket, java.lang.String pageSetName) throws java.lang.Exception
null
if the page set does not have workflow activities configured. This method retrieves the
activities object by looking at the related activities on the page set definition,
and then grabs the first one (there should only ever be one child relation.ticket
- the oc ticketpageSetName
- the name of the page setnull
if it does not existjava.lang.Exception
public static org.jdom.Document getRoleDocument(java.lang.String ticket, java.lang.String pageSetName, java.lang.String roleName) throws java.lang.Exception
ticket
- the OC ticketroleName
- the name of the role to retrievepageSetName
- the name of the page setjava.lang.Exception
- if an error occurs