Class BaseGraphPolicyAdjuster


  • public abstract class BaseGraphPolicyAdjuster
    extends ome.services.graphs.GraphPolicy
    The base class assists adjustment of an existing graph traversal policy.
    Since:
    5.1.0
    • Nested Class Summary

      • Nested classes/interfaces inherited from class ome.services.graphs.GraphPolicy

        ome.services.graphs.GraphPolicy.Ability, ome.services.graphs.GraphPolicy.Action, ome.services.graphs.GraphPolicy.Details, ome.services.graphs.GraphPolicy.Orphan
    • Field Summary

      • Fields inherited from class ome.services.graphs.GraphPolicy

        predicates
    • Constructor Summary

      Constructors 
      Constructor Description
      BaseGraphPolicyAdjuster​(ome.services.graphs.GraphPolicy graphPolicy)
      Construct a new graph policy adjuster.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      ome.services.graphs.GraphPolicy getCleanInstance()  
      protected boolean isAdjustedAfterReview​(ome.services.graphs.GraphPolicy.Details object)
      An opportunity to adjust each model object after the graph policy reviews it.
      protected boolean isAdjustedBeforeReview​(ome.services.graphs.GraphPolicy.Details object)
      An opportunity to adjust each model object before the graph policy reviews it.
      boolean isCondition​(java.lang.String name)  
      void noteDetails​(org.hibernate.Session session, ome.model.IObject object, java.lang.String realClass, long id)  
      void registerPredicate​(ome.services.graphs.GraphPolicyRulePredicate predicate)  
      java.util.Set<ome.services.graphs.GraphPolicy.Details> review​(java.util.Map<java.lang.String,​java.util.Set<ome.services.graphs.GraphPolicy.Details>> linkedFrom, ome.services.graphs.GraphPolicy.Details rootObject, java.util.Map<java.lang.String,​java.util.Set<ome.services.graphs.GraphPolicy.Details>> linkedTo, java.util.Set<java.lang.String> notNullable, boolean isErrorRules)  
      void setCondition​(java.lang.String name)  
      • Methods inherited from class ome.services.graphs.GraphPolicy

        allObjects
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • BaseGraphPolicyAdjuster

        public BaseGraphPolicyAdjuster​(ome.services.graphs.GraphPolicy graphPolicy)
        Construct a new graph policy adjuster.
        Parameters:
        graphPolicy - the graph policy that is to be adjusted
    • Method Detail

      • isAdjustedBeforeReview

        protected boolean isAdjustedBeforeReview​(ome.services.graphs.GraphPolicy.Details object)
        An opportunity to adjust each model object before the graph policy reviews it.
        Parameters:
        object - the model object before review
        Returns:
        if this object's details were changed by this adjustment
      • isAdjustedAfterReview

        protected boolean isAdjustedAfterReview​(ome.services.graphs.GraphPolicy.Details object)
        An opportunity to adjust each model object after the graph policy reviews it.
        Parameters:
        object - the model object after review
        Returns:
        if this object's details were changed by this adjustment
      • registerPredicate

        public void registerPredicate​(ome.services.graphs.GraphPolicyRulePredicate predicate)
        Overrides:
        registerPredicate in class ome.services.graphs.GraphPolicy
      • getCleanInstance

        public ome.services.graphs.GraphPolicy getCleanInstance()
        Specified by:
        getCleanInstance in class ome.services.graphs.GraphPolicy
      • setCondition

        public void setCondition​(java.lang.String name)
        Specified by:
        setCondition in class ome.services.graphs.GraphPolicy
      • isCondition

        public boolean isCondition​(java.lang.String name)
        Specified by:
        isCondition in class ome.services.graphs.GraphPolicy
      • noteDetails

        public void noteDetails​(org.hibernate.Session session,
                                ome.model.IObject object,
                                java.lang.String realClass,
                                long id)
        Overrides:
        noteDetails in class ome.services.graphs.GraphPolicy
      • review

        public final java.util.Set<ome.services.graphs.GraphPolicy.Details> review​(java.util.Map<java.lang.String,​java.util.Set<ome.services.graphs.GraphPolicy.Details>> linkedFrom,
                                                                                   ome.services.graphs.GraphPolicy.Details rootObject,
                                                                                   java.util.Map<java.lang.String,​java.util.Set<ome.services.graphs.GraphPolicy.Details>> linkedTo,
                                                                                   java.util.Set<java.lang.String> notNullable,
                                                                                   boolean isErrorRules)
                                                                            throws ome.services.graphs.GraphException
        Specified by:
        review in class ome.services.graphs.GraphPolicy
        Throws:
        ome.services.graphs.GraphException