@Component public class FlowManagerImpl extends com.marklogic.client.ext.helper.LoggingObject implements FlowManager
FLOW_FILE_EXTENSION
Constructor and Description |
---|
FlowManagerImpl() |
Modifier and Type | Method and Description |
---|---|
Flow |
createFlow(java.lang.String flowName)
Creates a flow
|
Flow |
createFlowFromJSON(com.fasterxml.jackson.databind.JsonNode json)
Creates a flow from a given JsonNode
|
Flow |
createFlowFromJSON(java.lang.String json)
Creates a flow from a given JSON string
|
protected void |
deleteDocumentsInDirectory(java.lang.String directory) |
void |
deleteFlow(java.lang.String flowName)
Deletes a flow
|
protected void |
deleteMappingArtifacts(Flow flow,
Step removedStep) |
protected void |
deleteRelatedStepArtifacts(Flow flow,
Step removedStep)
For certain step types, when the step is deleted, we need to do some cleanup of artifacts on disk and in the
staging and final databases.
|
void |
deleteStep(Flow flow,
java.lang.String key) |
protected void |
deleteStepDefinitionArtifacts(Step removedStep,
StepDefinition.StepDefinitionType stepTypeOfRemovedStep) |
Flow |
getFlow(java.lang.String flowName)
Retrieves a named flow
|
java.lang.String |
getFlowAsJSON(java.lang.String flowName)
Returns a flow based on the provided name as JSON string
|
java.util.List<java.lang.String> |
getFlowNames()
Retrieves a list of names of flows installed on the MarkLogic server
|
java.util.List<Flow> |
getFlows()
Retrieves a list of flows installed on the MarkLogic server
|
Step |
getStep(Flow flow,
java.lang.String stepNum)
Deprecated.
|
java.util.Map<java.lang.String,Step> |
getSteps(Flow flow)
Deprecated.
|
protected boolean |
isCustomMapping(Step removedStep) |
boolean |
isFlowExisted(java.lang.String flowName)
Check if a flow has existed
|
protected boolean |
mappingIsReferencedByAFlow(Step removedStep) |
void |
saveFlow(Flow flow)
Saves a flow to disk
|
void |
setHubConfig(HubConfig hubConfig)
Set the HubConfig
|
void |
setSteps(Flow flow,
java.util.Map<java.lang.String,Step> stepMap)
Deprecated.
|
protected boolean |
stepIsReferencedByAFlow(java.lang.String stepName,
StepDefinition.StepDefinitionType stepType) |
public void setHubConfig(HubConfig hubConfig)
FlowManager
setHubConfig
in interface FlowManager
hubConfig
- - the hubConfig to usepublic Flow getFlow(java.lang.String flowName)
FlowManager
getFlow
in interface FlowManager
flowName
- - name of the flowpublic java.lang.String getFlowAsJSON(java.lang.String flowName)
FlowManager
getFlowAsJSON
in interface FlowManager
flowName
- - name of the flowpublic java.util.List<Flow> getFlows()
FlowManager
getFlows
in interface FlowManager
public java.util.List<java.lang.String> getFlowNames()
FlowManager
getFlowNames
in interface FlowManager
public Flow createFlow(java.lang.String flowName)
FlowManager
createFlow
in interface FlowManager
flowName
- - name of the flowpublic Flow createFlowFromJSON(java.lang.String json)
FlowManager
createFlowFromJSON
in interface FlowManager
json
- - string representation of the flowpublic Flow createFlowFromJSON(com.fasterxml.jackson.databind.JsonNode json)
FlowManager
createFlowFromJSON
in interface FlowManager
json
- - JsonNode representation of the flowpublic void deleteFlow(java.lang.String flowName)
FlowManager
deleteFlow
in interface FlowManager
flowName
- - name of the flowpublic void deleteStep(Flow flow, java.lang.String key)
deleteStep
in interface FlowManager
key
- the step map key corresponding to the step to deletepublic void saveFlow(Flow flow)
FlowManager
saveFlow
in interface FlowManager
flow
- - the flow object to be savedpublic boolean isFlowExisted(java.lang.String flowName)
FlowManager
isFlowExisted
in interface FlowManager
flowName
- a flow name@Deprecated public java.util.Map<java.lang.String,Step> getSteps(Flow flow)
FlowManager
getSteps
in interface FlowManager
flow
- a flow object@Deprecated public Step getStep(Flow flow, java.lang.String stepNum)
FlowManager
getStep
in interface FlowManager
flow
- a flow objectstepNum
- step key@Deprecated public void setSteps(Flow flow, java.util.Map<java.lang.String,Step> stepMap)
FlowManager
setSteps
in interface FlowManager
flow
- a flow objectstepMap
- a map of stepsprotected void deleteRelatedStepArtifacts(Flow flow, Step removedStep)
flow
- removedStep
- protected boolean stepIsReferencedByAFlow(java.lang.String stepName, StepDefinition.StepDefinitionType stepType)
stepName
- stepType
- protected boolean mappingIsReferencedByAFlow(Step removedStep)
removedStep
- protected boolean isCustomMapping(Step removedStep)
protected void deleteStepDefinitionArtifacts(Step removedStep, StepDefinition.StepDefinitionType stepTypeOfRemovedStep)
protected void deleteDocumentsInDirectory(java.lang.String directory)