Package com.ptc.windchill.esi.ov
Class DefaultExpressionRendererDelegate
java.lang.Object
com.ptc.windchill.esi.ov.DefaultExpressionRendererDelegate
- All Implemented Interfaces:
ExpressionRendererDelegateIfc
public class DefaultExpressionRendererDelegate
extends Object
implements ExpressionRendererDelegateIfc
Default implementation of ExpressionRendererDelegateIfc. Implementation uses ExpressionHelper API to render
expressions.The class is intended to be extended by customizers to modify rendering of the expression as required and
to add or modify validation for expressions during rendering process.
Supported API: true
Extendable: false
- Class validates expression for occurance of Alias or Custom Java Functions used in expressions on expressionable and notifies renderer
- Returns the representation for expression
- When set optional wt.property "com.ptc.windchill.esi.AllowPublishingWithoutAlias" it allows publication to move ahead by ignoring Alias otherwise aborts publication
- When set optional wt.property "com.ptc.windchill.esi.AllowPublishingWithoutJavaFunction" it allows publication to move ahead by ignoring Java Functions otherwise aborts publication
Supported API: true
Extendable: false
-
Field Summary
Fields inherited from interface com.ptc.windchill.esi.ov.ExpressionRendererDelegateIfc
DISPLAY, EXPRESSION -
Method Summary
Modifier and TypeMethodDescriptiongetExpression(Expressionable expressionable, OptionSet optionSet, ESITarget target, VdbBuilder builder) Retrieve expression string for given expressionable object.voidvalidate(Collection<Persistable> expressionables, OptionSet optionSet, ESITarget target, VdbBuilder builder) Validate expressions and check if it uses alias or functions.voidvalidate(Expressionable expressionable, OptionSet optionSet, ESITarget target, VdbBuilder builder) Validate expressions and check if it uses alias or functions.
-
Method Details
-
getExpression
public String getExpression(Expressionable expressionable, OptionSet optionSet, ESITarget target, VdbBuilder builder) throws ExpressionRendererException Retrieve expression string for given expressionable object. Calls single object validate API when expressions are not validated before.
Supported API: true
Extendable: true- Specified by:
getExpressionin interfaceExpressionRendererDelegateIfc- Parameters:
expressionable- - The expressionable object for which expression needs to be rendered.optionSet- - Assigned Option Set valid for expressionable object that can be used to formulate expression if required.target- - The distibution target that is being processed in an ESI transactionbuilder- - An instance of VdbBuilder that renderer is using- Returns:
- - An expression representation to be rendered in ESI Response
- Throws:
ExpressionRendererException- See Also:
-
validate
public void validate(Expressionable expressionable, OptionSet optionSet, ESITarget target, VdbBuilder builder) throws WTException Validate expressions and check if it uses alias or functions. If present, indicate user such occurrences.
Use multi object API for better performance and cache result instead of this single object API.
Supported API: true- Specified by:
validatein interfaceExpressionRendererDelegateIfc- Parameters:
expressionable- - The expressionable object for which expression needs to be validated.optionSet- - Assigned Option Set valid for expressionable object that can be used to formulate expression if required.target- - The distibution target that is being processed in an ESI transactionbuilder- - An instance of VdbBuilder that renderer is using- Throws:
WTException- - The WTException for validation error.- See Also:
-
validate
public void validate(Collection<Persistable> expressionables, OptionSet optionSet, ESITarget target, VdbBuilder builder) throws WTException Validate expressions and check if it uses alias or functions. If present, indicate user such occurrences.
Supported API: true
- Specified by:
validatein interfaceExpressionRendererDelegateIfc- Parameters:
expressionables- - The collection expressionable objects for which expression needs to be validated.optionSet- - Assigned Option Set valid for expressionable object that can be used to formulate expression if required.target- - The distibution target that is being processed in an ESI transactionbuilder- - An instance of VdbBuilder that renderer is usinggetbuilder-- Throws:
WTException- See Also:
-