Package ome.services.graphs
Class GraphPolicyRule
- java.lang.Object
-
- ome.services.graphs.GraphPolicyRule
-
public class GraphPolicyRule extends java.lang.ObjectA 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 GraphPolicyparseRules(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.voidsetChanges(java.lang.String changes)voidsetError(java.lang.String message)voidsetMatches(java.lang.String matches)java.lang.StringtoString()
-
-
-
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:
toStringin 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
-
-