Package ome.services.graphs
Class GraphPolicyRule
- java.lang.Object
-
- ome.services.graphs.GraphPolicyRule
-
public class GraphPolicyRule extends java.lang.Object
A graph policy rule specifies a component of aGraphPolicy
. It is designed to be conveniently created using Spring by supplying configuration metadata to the bean container.- Since:
- 5.1.0
-
-
Constructor Summary
Constructors Constructor Description GraphPolicyRule()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static GraphPolicy
parseRules(GraphPathBean graphPathBean, java.util.Collection<GraphPolicyRule> rules)
Convert the text-based rules as specified in the configuration metadata into a policy applicable in model object graph traversal.void
setChanges(java.lang.String changes)
void
setError(java.lang.String message)
void
setMatches(java.lang.String matches)
java.lang.String
toString()
-
-
-
Method Detail
-
setMatches
public void setMatches(java.lang.String matches)
- Parameters:
matches
- the match conditions for this policy rule, comma-separated
-
setChanges
public void setChanges(java.lang.String changes)
- Parameters:
changes
- the changes caused by this policy rule, comma-separated
-
setError
public void setError(java.lang.String message)
- Parameters:
message
- the error message triggered by this policy rule
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
parseRules
public static GraphPolicy parseRules(GraphPathBean graphPathBean, java.util.Collection<GraphPolicyRule> rules) throws GraphException
Convert the text-based rules as specified in the configuration metadata into a policy applicable in model object graph traversal. (A more advanced effort could construct an efficient decision tree, but that optimization may be premature.)- Parameters:
graphPathBean
- the graph path beanrules
- the rules to apply- Returns:
- a policy for graph traversal by
GraphTraversal
- Throws:
GraphException
- if the text-based rules could not be parsed
-
-