Class ExpressionHelper
java.lang.Object
com.ptc.windchill.option.expression.ExpressionHelper
A helper for working with Expressions.
Supported API: true
Extendable: false
Supported API: true
Extendable: false
-
Method Summary
Modifier and TypeMethodDescriptionstatic ComplexExpressionDatagetAssignedExpression(Expressionable ea, OptionSet optionset) API used to get the formatted expression of an Expressionable object.Bydefault API passes the expression through an ExternalFormatConvertor
Supported API: truestatic ComplexExpressionDatagetAssignedExpression(Expressionable ea, OptionSet optionset, boolean doConversion) API to get the formatted expression of an Expressionable object.static StringgetDisplayExpression(Expressionable expressionable, WTContainerRef containerRef) Get the display expression for this Expressionable in this container.static StringgetDisplayExpression(Expressionable expressionable, WTContainerRef containerRef, boolean showDescription) Get the display expression for this Expressionable in this container.static StringgetDisplayExpression(ExpressionAssignable expressionAssignable, WTContainerRef containerRef) Get the display expression for this ExpressionAssignable in this container.static StringgetDisplayExpression(ExpressionAssignable expressionAssignable, WTContainerRef containerRef, boolean showDescription) Get the display expression for this ExpressionAssignable in this container.
-
Method Details
-
getAssignedExpression
public static ComplexExpressionData getAssignedExpression(Expressionable ea, OptionSet optionset) throws WTException API used to get the formatted expression of an Expressionable object.Bydefault API passes the expression through an ExternalFormatConvertor
Supported API: true- Parameters:
expressionable- objects that can have expressions assigned like Part, Links etc.optionset- the OptionSet- Returns:
- ComplexExpressionData
- Throws:
WTException
-
getAssignedExpression
public static ComplexExpressionData getAssignedExpression(Expressionable ea, OptionSet optionset, boolean doConversion) throws WTException API to get the formatted expression of an Expressionable object. When doConversion is set to true, the API passes the expression through an ExternalFormatConvertor, if one has been defined. Else, it returns the expression in default format.
Supported API: true- Parameters:
expressionable- objects that can have expressions assigned like Part, Links etc.optionset- the OptionSetdoConversion- boolean- Returns:
- ComplexExpressionData
- Throws:
WTException
-
getDisplayExpression
public static String getDisplayExpression(ExpressionAssignable expressionAssignable, WTContainerRef containerRef) throws Exception Get the display expression for this ExpressionAssignable in this container.
Supported API: true- Parameters:
expressionAssignable- the objects that can have expressions assigned like Part, Links etc.containerRef- the container reference- Returns:
- returns a json string with display and invalid keys { display: "display value", invalid: true/false }
- Throws:
Exception
-
getDisplayExpression
public static String getDisplayExpression(ExpressionAssignable expressionAssignable, WTContainerRef containerRef, boolean showDescription) throws Exception Get the display expression for this ExpressionAssignable in this container.
Supported API: true- Parameters:
expressionAssignable- objects that can have expressions assigned like Part, Links etc.containerRef- the container referenceshowDescription- if flag is true then it shows descriptions along with expression string.- Returns:
- returns a json string with display and invalid keys { display: "display value", invalid: true/false }
- Throws:
Exception
-
getDisplayExpression
public static String getDisplayExpression(Expressionable expressionable, WTContainerRef containerRef) throws Exception Get the display expression for this Expressionable in this container.
Supported API: true- Parameters:
expressionable- objects that can have expressions assigned to them like Part, Links, occurrence etccontainerRef- the container reference- Returns:
- returns a json string with display and invalid keys { display: "display value", invalid: true/false }
- Throws:
Exception
-
getDisplayExpression
public static String getDisplayExpression(Expressionable expressionable, WTContainerRef containerRef, boolean showDescription) throws Exception Get the display expression for this Expressionable in this container.
Supported API: true- Parameters:
expressionable- objects that can have expressions assigned to to like Part, Links etccontainerRef- the container referenceshowDescription- if flag is true then it shows descriptions along with expression string.- Returns:
- returns a json string with display and invalid keys { display: "display value", invalid: true/false }
- Throws:
Exception
-