public class FlowValidationUtil extends Object
Constructor and Description |
---|
FlowValidationUtil() |
Modifier and Type | Method and Description |
---|---|
static Optional<? extends XProcessingElement> |
findElementInCompletePath(XProcessingElement processingElement,
Class<? extends XProcessingElement> elementClazz)
This method can be used to find a given
XProcessingElement type is present in the complete out-going path
(including "On Exception" out ports) of the specified XProcessingElement instance. |
static Optional<? extends XProcessingElement> |
findElementInNonExceptionalPath(XProcessingElement processingElement,
Class<? extends XProcessingElement> elementClazz)
This method can be used to find a given
XProcessingElement type is present in the out-going path of the
specified XProcessingElement instance. |
static Map<String,List<XProcessingElement>> |
getMultipleOutPortElements(XProcessingElement processingElement)
This method can be used to obtain a Map of
List of XProcessingElement s of OutPort annotated
fields in the given XProcessingElement object which accept a List of XProcessingElements. |
static Map<String,XProcessingElement> |
getOutPortElements(XProcessingElement processingElement)
This method can be used to obtain a
XProcessingElement Map of OutPort annotated fields which only
accept one XProcessingElement in the given XProcessingElement object. |
static Map<String,Object> |
getParameters(XConnectorOperationElement connectorOperationElement)
This method can be used to obtain a Map of list of
Parameter annotated fields in the given
XConnectorOperationElement object where the key of the map would be the field name and the value would be
the initialized value for that particular field. |
static Map<String,Object> |
getParameters(XProcessingElement processingElement)
This method can be used to obtain a Map of list of
Parameter annotated fields in the given
XProcessingElement object where the key of the map would be the field name and the value would be
the initialized value for that particular field. |
static Map<String,Object> |
getSidePortElements(XProcessingElement processingElement)
This method can be used to obtain a
Object Map of BeanRef annotated fields
in the given XProcessingElement object. |
static boolean |
isFlowComplete(IngressConnectorElement ingressConnector) |
public static Map<String,XProcessingElement> getOutPortElements(XProcessingElement processingElement)
XProcessingElement
Map of OutPort
annotated fields which only
accept one XProcessingElement in the given XProcessingElement
object. The key of the map is the name of
the field and the value is the XProcessingElement
connected to that out port.
It should be noted that, this will only consider OutPorts that accept exactly one XProcessingElement and out of
those this map will contain an entry for a particular OutPort
annotated field, iff that field is initialized
with a non-null value. i.e only when that out port is connected to another XProcessingElement
.
processingElement
- Instance of XProcessingElement
where the OutPort
annotated
fields should be returned.XProcessingElement
for each connected out portpublic static Map<String,List<XProcessingElement>> getMultipleOutPortElements(XProcessingElement processingElement)
List
of XProcessingElement
s of OutPort
annotated
fields in the given XProcessingElement
object which accept a List of XProcessingElements.
The key of the map is the name of the field and the value is the list of XProcessingElement
s connected
to that out port.
It should be noted that, this will only consider OutPorts that accept a List
of XProcessingElements
and out of those this map will contain an entry for a particular OutPort
annotated field, iff that field
is initialized with a non-null value. i.e only when that out port is connected to at least one another
XProcessingElement
.
processingElement
- Instance of XProcessingElement
where the OutPort
annotated
fields should be returned.XProcessingElement
s for each connected out portpublic static Map<String,Object> getSidePortElements(XProcessingElement processingElement)
Object
Map of BeanRef
annotated fields
in the given XProcessingElement
object. The key of the map is the name of the fields and the value is the
Object
which is referred by the bean reference (connected to the side port)
It should be noted that, this map will contain an entry for a particular BeanRef
annotated field,
iff that field in initialized with a non-null value. i.e. only when that side port is connected to another
element.
processingElement
- Instance of XProcessingElement
where the BeanRef
annotated
fields should be returned.Object
for each connected side portpublic static Map<String,Object> getParameters(XProcessingElement processingElement)
Parameter
annotated fields in the given
XProcessingElement
object where the key of the map would be the field name and the value would be
the initialized value for that particular field.
It should be noted that, this Map will contains ONLY field which are initialized with a non null value.
processingElement
- Instance of XProcessingElement
where the Parameter
annotated
fields should be returned.HashMap
where the key would be String
and the value is of type Object
public static Map<String,Object> getParameters(XConnectorOperationElement connectorOperationElement)
Parameter
annotated fields in the given
XConnectorOperationElement
object where the key of the map would be the field name and the value would be
the initialized value for that particular field.
It should be noted that, this Map will contains ONLY field which are initialized with a non null value.
connectorOperationElement
- Instance of XConnectorOperationElement
where the Parameter
annotated fields should be returnedHashMap
where the key would be String
and the value is of type Object
public static Optional<? extends XProcessingElement> findElementInNonExceptionalPath(XProcessingElement processingElement, Class<? extends XProcessingElement> elementClazz)
XProcessingElement
type is present in the out-going path of the
specified XProcessingElement
instance.
It should be noted that when checking the out-going path, this method will skip all the paths constructed via elements connected to "On Exception" out port.
processingElement
- XProcessingElement
instance where the out-going path should be inspected for a
particular XProcessingElement
type objectelementClazz
- class of the XProcessingElement
object which should be present in the out-going pathOptional
instance which wraps the required type of XProcessingElement
public static Optional<? extends XProcessingElement> findElementInCompletePath(XProcessingElement processingElement, Class<? extends XProcessingElement> elementClazz)
XProcessingElement
type is present in the complete out-going path
(including "On Exception" out ports) of the specified XProcessingElement
instance.processingElement
- XProcessingElement
instance where the out-going path should be inspected for a
particular XProcessingElement
type objectelementClazz
- class of the XProcessingElement
object which should be present in the out-going pathOptional
instance which wraps the required type of XProcessingElement
public static boolean isFlowComplete(IngressConnectorElement ingressConnector)
Copyright © 2016–2019 AdroitLogic. All rights reserved.