Class FlowConfig


  • public class FlowConfig
    extends BaseConfig

    Configuration describing a TCS flow as a graph of TCS block instances. HOCON-based constructors perform validation against the HOCON flow schema.

    • Constructor Detail

      • FlowConfig

        public FlowConfig()

        Create a new empty flow config object.

      • FlowConfig

        public FlowConfig​(IFlow source)

        Create a new flow config object from the specified interface source.

        Parameters:
        source - source flow
      • FlowConfig

        public FlowConfig​(com.typesafe.config.Config config,
                          FlowValidationProblemList problems,
                          com.tibco.ep.dtm.configuration.hocon.schema.Validator validator)

        Create a new flow config object from HOCON configuration. Validate the HOCON against the flow schema; if there are any errors, put them in the problem list and construct an empty flow.

        Parameters:
        config - HOCON representation of the flow
        problems - validation problem list, added to with any validation errors
        validator - schema validator
    • Method Detail

      • getIdentification

        public IdentificationConfig getIdentification()

        Return identification information for this flow.

        Returns:
        identification
      • setIdentification

        public FlowConfig setIdentification​(IdentificationConfig identification)

        Set identification information for this flow.

        Parameters:
        identification - identification
        Returns:
        this object
      • getExportedEndpoints

        public ExportedEndpointsConfig getExportedEndpoints()

        Return exported endpoint information for this flow.

        Returns:
        exported endpoints
      • setExportedEndpoints

        public FlowConfig setExportedEndpoints​(ExportedEndpointsConfig exportedEndpoints)

        Set exported endpoint information for this flow.

        Parameters:
        exportedEndpoints - exported endpoints
        Returns:
        this object
      • getBlockInstances

        public Map<String,​BlockInstanceConfig> getBlockInstances()

        Return a map of the block instances in a flow, indexed by a block instance identifier unique within the flow.

        Returns:
        block instances
      • setBlockInstances

        public FlowConfig setBlockInstances​(Map<String,​BlockInstanceConfig> blockInstances)

        Set a map of the block instances in a flow, indexed by a block instance identifier unique within the flow.

        Parameters:
        blockInstances - block instances
        Returns:
        this object
      • addBlockInstance

        public FlowConfig addBlockInstance​(String instanceID,
                                           BlockInstanceConfig blockInstance)

        Add a block instance ID and associated config. Neither can be null.

        Parameters:
        instanceID - block instance ID
        blockInstance - instance configuration
        Returns:
        this object
      • getEdges

        public List<EdgeConfig> getEdges()

        Return a list of flow edges connecting block instances.

        Returns:
        flow edges
      • setEdges

        public FlowConfig setEdges​(List<EdgeConfig> edges)

        Set a list of flow edges connecting block instances.

        Parameters:
        edges - flow edges
        Returns:
        this object
      • addEdge

        public FlowConfig addEdge​(EdgeConfig edge)

        Add a flow edge. Cannot be null.

        Parameters:
        edge - flow edge to add
        Returns:
        this object
      • fillMap

        protected void fillMap​(Map<String,​Object> props)

        Add this object's properties to the specified map.

        Specified by:
        fillMap in class BaseConfig
        Parameters:
        props - map to fill
      • getIDFromConfig

        public static String getIDFromConfig​(com.typesafe.config.Config config)

        Return an ID for the specified HOCON tree, by looking in its identification key. If no such ID can be found, return null. Makes no assumptions about validity.

        Parameters:
        config - configuration to check
        Returns:
        desired block ID, null if none found