Class BTDataCollectionTemplateCheckExpressions
java.lang.Object
overit.geocall.bl.BusinessTask<CheckerEvent<TreeModel<DataCollectionNode>>>
overit.geocallapp.utilities.core.bl.common.check.checker.task.AbstractCheckerBusinessTask<TreeModel<DataCollectionNode>>
overit.geocallapp.wfm.core.bl.datacollection.template.task.BTDataCollectionTemplateCheckExpressions
- All Implemented Interfaces:
Serializable,Tool
@Event(DataCollectionTemplateCheckExpressionsEvent.class)
public class BTDataCollectionTemplateCheckExpressions
extends AbstractCheckerBusinessTask<TreeModel<DataCollectionNode>>
Business task in order to check the
When the
DataCollectionNodeExpressionsEvaluator. When the
DataCollectionTemplateCheckExpressionsEvent is launched
the BT notices the call and checks the DataCollectionNodeExpressionsEvaluator basing on the event's input. Visibility:
- node expressions that belong to the same current user's operation center
- Since:
- 12.0
- See Also:
- GCApi:
- task
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected List<CheckIssue> checkExpressionsSyntax(TreeModel<DataCollectionNode> treeModel, DataCollectionEntityExpressions node, DataCollectionNodeExpressionsEvaluator expressionsEvaluator, PoolKit poolKit) Checks the expressions syntax.protected List<CheckIssue> checkNotExistingReferences(DataCollectionEntityExpressions node, Set<DataCollectionNodeExpressionsToken> tokens, Set<DataCollectionNodeExpressionsToken> availableTokens) Checks if there are not existing references.protected List<CheckIssue> computeCheckIssues(TreeModel<DataCollectionNode> treeModel, PoolKit poolKit) Computes check issues.protected Set<DataCollectionNodeExpressionsToken> getAvailableTokens(TreeModel<DataCollectionNode> treeModel, DataCollectionNodeExpressionsEvaluator expressionsEvaluator) Returns the available tokens.getClassProperties(Class<? extends DataCollectionNodeExpressionsGrammarKeyword> grammarKeywordClass) Returns the class properties.protected DataCollectionNodeExpressionsEvaluatorgetExpressionsEvaluator(TreeModel<DataCollectionNode> treeModel, PoolKit poolKit) Returns the expressions evaluator.protected Set<DataCollectionEntityExpressions> Returns the nodes with expressions.protected Set<DataCollectionNodeExpressionsToken> getReferencedTokens(DataCollectionNodeExpressions expressions) Returns the referenced tokens.protected static Stream<DataCollectionNodeExpressionsToken> getTokenStream(String keywordName, Class<? extends DataCollectionNodeExpressionsGrammarKeyword> grammarKeywordClass) Returns the token stream.Methods inherited from class overit.geocallapp.utilities.core.bl.common.check.checker.task.AbstractCheckerBusinessTask
addCheckIssuesToCheckResult, body, initCheckResultMethods inherited from class overit.geocall.bl.BusinessTask
start, start, startAlone, startInBackground
-
Constructor Details
-
BTDataCollectionTemplateCheckExpressions
public BTDataCollectionTemplateCheckExpressions()
-
-
Method Details
-
computeCheckIssues
protected List<CheckIssue> computeCheckIssues(TreeModel<DataCollectionNode> treeModel, PoolKit poolKit) throws DAException, DAValidateException Computes check issues.- Specified by:
computeCheckIssuesin classAbstractCheckerBusinessTask<TreeModel<DataCollectionNode>>- Parameters:
treeModel- theTreeModelpoolKit- thePoolKit- Returns:
- a list of check issue elements of type CheckIssue
- Throws:
DAException- the DA exceptionDAValidateException- the DA validate exception- See Also:
-
getExpressionsEvaluator
protected DataCollectionNodeExpressionsEvaluator getExpressionsEvaluator(TreeModel<DataCollectionNode> treeModel, PoolKit poolKit) Returns the expressions evaluator. -
getAvailableTokens
protected Set<DataCollectionNodeExpressionsToken> getAvailableTokens(TreeModel<DataCollectionNode> treeModel, DataCollectionNodeExpressionsEvaluator expressionsEvaluator) Returns the available tokens.- Parameters:
treeModel- theTreeModelexpressionsEvaluator- theDataCollectionNodeExpressionsEvaluator- Returns:
- the available tokens
-
getTokenStream
protected static Stream<DataCollectionNodeExpressionsToken> getTokenStream(String keywordName, Class<? extends DataCollectionNodeExpressionsGrammarKeyword> grammarKeywordClass) Returns the token stream.- Parameters:
keywordName- the keyword namegrammarKeywordClass- the grammar keyword class- Returns:
- the token stream
-
getClassProperties
protected static List<String> getClassProperties(Class<? extends DataCollectionNodeExpressionsGrammarKeyword> grammarKeywordClass) Returns the class properties.- Parameters:
grammarKeywordClass- theClass<? extends DataCollectionNodeExpressionsGrammarKeyword>- Returns:
- a list of string elements of type String
-
getNodesWithExpressions
protected Set<DataCollectionEntityExpressions> getNodesWithExpressions(AbstractTreeModel<DataCollectionNode, ?> tree) Returns the nodes with expressions.- Parameters:
tree- theAbstractTreeModel<DataCollectionNode,?> - Returns:
- the nodes with expressions
-
getReferencedTokens
protected Set<DataCollectionNodeExpressionsToken> getReferencedTokens(DataCollectionNodeExpressions expressions) Returns the referenced tokens.- Parameters:
expressions- theDataCollectionNodeExpressions- Returns:
- the referenced tokens
-
checkNotExistingReferences
protected List<CheckIssue> checkNotExistingReferences(DataCollectionEntityExpressions node, Set<DataCollectionNodeExpressionsToken> tokens, Set<DataCollectionNodeExpressionsToken> availableTokens) Checks if there are not existing references.- Parameters:
node- theDataCollectionNodetokens- theSet<DataCollectionNodeExpressionsToken>availableTokens- theSet<DataCollectionNodeExpressionsToken>- Returns:
- a list of check issue elements of type CheckIssue
- See Also:
-
checkExpressionsSyntax
protected List<CheckIssue> checkExpressionsSyntax(TreeModel<DataCollectionNode> treeModel, DataCollectionEntityExpressions node, DataCollectionNodeExpressionsEvaluator expressionsEvaluator, PoolKit poolKit) Checks the expressions syntax.- Parameters:
treeModel- theTreeModelnode- theDataCollectionNodeexpressionsEvaluator- theDataCollectionNodeExpressionsEvaluatorpoolKit- thePoolKit- Returns:
- a list of check issue elements of type CheckIssue
- See Also:
-