Class SpelRule.Builder
java.lang.Object
com.helixframework.rules.rule.spel.SpelRule.Builder
- Enclosing class:
- SpelRule
Builds an instance of
SpelRule.-
Method Summary
Modifier and TypeMethodDescriptionbuild()Creates an instance ofSpelRule.withClassification(String value) Sets the rule classification.withDependencies(Set<Rule> value) Add rule dependencies to the rule.withDependency(Rule value) Add a rule dependency to the rule.withDescription(String value) Sets the rule description.withMaxRetries(Integer value) Adds a custom max retry count to the rule.withSpelParserConfiguration(org.springframework.expression.spel.SpelParserConfiguration value) Adds a custom spel parser configuration to the rule.Adds a tag to the rule.Adds tags to the rule.withTimeout(Duration value) Adds a custom timeout to the rule.
-
Method Details
-
withClassification
Sets the rule classification.- Parameters:
value- classification- Returns:
SpelRule.Builder
-
withDependency
Add a rule dependency to the rule.- Parameters:
value- rule dependency- Returns:
SpelRule.Builder
-
withDependencies
Add rule dependencies to the rule.- Parameters:
value- rule dependencies- Returns:
SpelRule.Builder
-
withDescription
Sets the rule description.- Parameters:
value- description- Returns:
SpelRule.Builder
-
withTag
Adds a tag to the rule.- Parameters:
tagName- tag nametagValue- tag value- Returns:
SpelRule.Builder
-
withTags
Adds tags to the rule.- Parameters:
value- tags- Returns:
SpelRule.Builder
-
withTimeout
Adds a custom timeout to the rule.- Parameters:
value- timeout- Returns:
SpelRule.Builder
-
withMaxRetries
Adds a custom max retry count to the rule.- Parameters:
value- max retries- Returns:
SpelRule.Builder
-
withSpelParserConfiguration
public SpelRule.Builder withSpelParserConfiguration(org.springframework.expression.spel.SpelParserConfiguration value) Adds a custom spel parser configuration to the rule.- Parameters:
value- spel parser configuration- Returns:
SpelRule.Builder
-
build
Creates an instance ofSpelRule.- Returns:
- a
SpelRule
-