Class FilterBySegmentationNode


  • public class FilterBySegmentationNode
    extends TrueFalseNode
    Filters the flow by user segmentation.
    Since:
    12.0.0
    Version:
    $Revision: 23716 $ $Date: 2020-03-26 18:26:08 -0300 (Thu, 26 Mar 2020) $
    • Constructor Detail

      • FilterBySegmentationNode

        public FilterBySegmentationNode​(String id,
                                        String name,
                                        UserSegmentationData userSegmentationData,
                                        String userSegmentationId,
                                        FlowNode trueNextNode)
        Creates a new instance
        Parameters:
        id - the node identifier
        name - the node name
        userSegmentationData - the user segmentation filter the flow context will be evaluated against
        userSegmentationId - the user segmentation identifier
        trueNextNode - the next node to be executed, if the condition evaluates to true.
        Since:
        12.0.0
      • FilterBySegmentationNode

        public FilterBySegmentationNode​(org.json.JSONObject object,
                                        FlowEntry flowEntry)
                                 throws PortalException
        Creates a new instance from the given JSON object.
        Parameters:
        object - the JSON object.
        flowEntry - the flow entry this node belongs to.
        Throws:
        PortalException
        Since:
        12.0.0
    • Method Detail

      • validateStateAndLog

        public boolean validateStateAndLog​(boolean checkAllNextNodes)
        Description copied from class: FlowNode
        To permit edition when JSON flow is saved incorrectly in data base, the flow node constructor by JSON parameter need allows to load flow node variables without exception when something already is wrong. So, to prevents exception on flow node execution and prevent to save flow when flow node is invalid state, this methods will check if all variables is OK and log otherwise.
        Overrides:
        validateStateAndLog in class TrueFalseNode
        Parameters:
        checkAllNextNodes - check all next nodes nodes.
        Returns:
        true if all variable state is OK.
      • toJSONObject

        public org.json.JSONObject toJSONObject()
        Description copied from class: FlowNode
        Returns the JSON representation of this node. This method is the counterpart of #FlowNode(JSONObject) constructor.
        Overrides:
        toJSONObject in class TrueFalseNode
        Returns:
        the JSON representation of this node.
      • evaluate

        public boolean evaluate​(FlowContext flowContext)
                         throws PortalException
        Description copied from class: TrueFalseNode
        Evaluates the given flow context. Returns true if the context matches the condition or false otherwise.
        Specified by:
        evaluate in class TrueFalseNode
        Parameters:
        flowContext - the context
        Returns:
        true if the context matches the condition or false otherwise.
        Throws:
        PortalException