Package org.apache.hop.workflow
Class WorkflowMeta
- java.lang.Object
-
- org.apache.hop.base.AbstractMeta
-
- org.apache.hop.workflow.WorkflowMeta
-
- All Implemented Interfaces:
Cloneable,Comparable<WorkflowMeta>,IChanged,IHasFilename,IUndo,IAttributes,IEngineMeta,INamedParameterDefinitions,IXml,IResourceExport
public class WorkflowMeta extends AbstractMeta implements Cloneable, Comparable<WorkflowMeta>, IXml, IResourceExport, IHasFilename
The definition of a Hop workflow is represented by a WorkflowMeta object. It is typically loaded from a .hwf file or it is generated dynamically. The declared parameters of the workflow definition are then queried using listParameters() and assigned values using calls to setParameterValue(..). WorkflowMeta provides methods to load, save, verify, etc.
-
-
Field Summary
Fields Modifier and Type Field Description protected String[]argumentsprotected booleanchangedActionsprotected booleanchangedHopsprotected booleanexpandingRemoteWorkflowprotected WorkflowMetaInfoinfoprotected Map<String,Boolean>loopCacheThe loop cache.boolean[]maxList of booleans indicating whether or not to remember the size and position of the different windows...protected StringstartActionNamestatic StringSTRING_SPECIAL_ERRORConstant = "ERROR"static StringSTRING_SPECIAL_OKConstant = "OK"static StringWORKFLOW_EXTENSIONprotected List<ActionMeta>workflowActionsprotected List<WorkflowHopMeta>workflowHopsprotected intworkflowStatusprotected StringworkflowVersionstatic StringXML_TAGprotected static StringXML_TAG_PARAMETERS-
Fields inherited from class org.apache.hop.base.AbstractMeta
attributesMap, changedFlag, changedNotes, contentChangedListeners, currentDirectoryChangedListeners, filename, filenameChangedListeners, maxUndo, metadataProvider, nameChangedListeners, namedParams, notes, runOptions, TYPE_UNDO_CHANGE, TYPE_UNDO_DELETE, TYPE_UNDO_NEW, TYPE_UNDO_POSITION, undo, undoPosition
-
-
Constructor Summary
Constructors Constructor Description WorkflowMeta()Instantiates a new workflow meta.WorkflowMeta(InputStream inputStream, IHopMetadataProvider metadataProvider, IVariables variables)Instantiates a new workflow meta.WorkflowMeta(String fname)Instantiates a new workflow meta.WorkflowMeta(IVariables variables, String fname, IHopMetadataProvider metadataProvider)Load the workflow from the XML file specifiedWorkflowMeta(Node workflowNode, IHopMetadataProvider metadataProvider, IVariables variables)Create a new WorkflowMeta object by loading it from a a DOM node.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddAction(int p, ActionMeta action)Adds the action.voidaddAction(ActionMeta action)Adds the action.voidaddDefaults()Adds the defaults.voidaddMissingAction(MissingAction missingAction)voidaddWorkflowHop(int p, WorkflowHopMeta hop)Adds the workflow hop.voidaddWorkflowHop(WorkflowHopMeta hop)Adds the workflow hop.voidcheckActions(List<ICheckResult> remarks, boolean onlySelected, IProgressMonitor monitor, IVariables variables, IHopMetadataProvider metadataProvider)Check all actions within the workflow.voidclear()Clears or reinitializes many of the WorkflowMeta properties.voidclearChanged()Clears the different changed flags of the workflow.Objectclone()Clones the workflow meta-data object.intcompare(WorkflowMeta j1, WorkflowMeta j2)Compares two workflow on name, filename, etc.intcompareTo(WorkflowMeta o)Compares this workflow's meta-data to the specified workflow's meta-data.List<IAction>composeActionList()Create a unique list of action interfacesbooleancontainsAction(ActionMeta actionMeta)intcountEntries(String name)Count actions.booleanequals(Object obj)Checks whether this workflow's meta-data object is equal to the specified object.StringexportResources(IVariables variables, Map<String,ResourceDefinition> definitions, IResourceNaming namingInterface, IHopMetadataProvider metadataProvider)Exports the object to a flat-file system, adding content with filename keys to a set of definitions.ActionMetafindAction(String name)Find an existing ActionMeta by it's name and numberActionMetafindNextAction(ActionMeta from, int cnt)Find next action.intfindNrNextActions(ActionMeta from)Find nr next actions.intfindNrPrevActions(ActionMeta from)Find nr prev actions.intfindNrPrevActions(ActionMeta to, boolean info)Find nr prev actions.ActionMetafindPrevAction(ActionMeta to, int nr)Find prev action.ActionMetafindPrevAction(ActionMeta to, int nr, boolean info)Find prev action.ActionMetafindStart()Find start.WorkflowHopMetafindWorkflowHop(String name)Find workflow hop.WorkflowHopMetafindWorkflowHop(ActionMeta from, ActionMeta to)Find workflow hop.WorkflowHopMetafindWorkflowHop(ActionMeta from, ActionMeta to, boolean includeDisabled)Find workflow hop.WorkflowHopMetafindWorkflowHopFrom(ActionMeta action)Find workflow hop from.WorkflowHopMetafindWorkflowHopTo(ActionMeta actionMeta)Find workflow hop to.ActionMetagetAction(int i)Gets the action.ActionMetagetAction(int x, int y, int iconsize)Gets the action copy.int[]getActionIndexes(List<ActionMeta> actions)Gets the action indexes.List<ActionMeta>getActions()Gets the workflow actions.ActionMeta[]getAllWorkflowGraphActions(String name)Gets the all workflow graph actions.WorkflowHopMeta[]getAllWorkflowHopsUsing(String name)Gets the all workflow hops using.StringgetAlternativeActionName(String name)Proposes an alternative action name when the original already exists...DategetCreatedDate()Gets the date the pipeline was created.StringgetCreatedUser()Gets the user by whom the pipeline was created.StringgetDescription()Gets the description of the workflow.StringgetExtendedDescription()Gets the extended description of the workflow.protected StringgetExtension()WorkflowMetaInfogetInfo()Gets infoStringgetLogChannelId()PointgetMaximum()Gets the maximum.PointgetMinimum()Get the minimum point on the canvas of a workflowList<MissingAction>getMissingActions()DategetModifiedDate()Gets the date the pipeline was modified.StringgetModifiedUser()Gets the user who last modified the pipeline.StringgetName()Get the name of the workflow.LoggingObjectTypegetObjectType()List<ResourceReference>getResourceDependencies(IVariables variables)Gets the resource dependencies.List<ActionMeta>getSelectedActions()Gets the selected actions.Point[]getSelectedLocations()Gets the selected locations.Point[]getSelectedNoteLocations()Get all the selected note locationsList<SqlStatement>getSqlStatements(IProgressMonitor monitor, IVariables variables)List<SqlStatement>getSqlStatements(IHopMetadataProvider metadataProvider, IProgressMonitor monitor, IVariables variables)Builds a list of all the SQL statements that this pipeline needs in order to work properly.ActionMetagetStart()Gets the start.StringgetStartActionName()List<StringSearchResult>getStringList(boolean searchTransforms, boolean searchDatabases, boolean searchNotes)Get a list of all the strings used in this workflow.List<String>getUsedVariables()Gets the used variables.WorkflowHopMetagetWorkflowHop(int i)Gets the workflow hop.List<WorkflowHopMeta>getWorkflowHops()Gets the workflow hops.intgetWorkflowStatus()Gets the status of the workflow.StringgetWorkflowVersion()Gets the version of the workflow.StringgetXml(IVariables variables)Gets the XML representation of this workflow.booleanhasChanged()booleanhasLoop(ActionMeta action)Checks for loop.booleanhasLoop(ActionMeta action, ActionMeta lookup)Checks for loop.booleanhasMissingPlugins()booleanhaveActionsChanged()Have actions changed.booleanhaveWorkflowHopsChanged()Have workflow hops changed.intindexOfAction(ActionMeta action)Index of action.intindexOfWorkflowHop(WorkflowHopMeta hop)Index of workflow hop.booleanisEmpty()booleanisEntryUsedInHops(ActionMeta action)Checks if is action used in hops.booleanisExpandingRemoteWorkflow()booleanisNameSynchronizedWithFilename()booleanisPathExist(IAction from, IAction to)voidloadXml(IVariables variables, String fname, IHopMetadataProvider metadataProvider)voidloadXml(Node workflowNode, String filename, IHopMetadataProvider metadataProvider, IVariables variables)Load a block of XML from an DOM node.intnrActions()Nr actions.intnrWorkflowHops()Nr workflow hops.ObjectrealClone(boolean doClear)Perform a real clone of the workflow meta-data object, including cloning all lists and copying all values.voidremoveAction(int i)Removes the action.voidremoveMissingAction(MissingAction missingAction)voidremoveWorkflowHop(int i)Removes the workflow hop.voidremoveWorkflowHop(WorkflowHopMeta hop)Removes a hop from the pipeline.voidrenameActionIfNameCollides(ActionMeta actionMeta)See if the name of the supplied action doesn't collide with any other action in the workflow.voidselectAll()Select all.voidsetAction(int idx, ActionMeta action)Sets the action.voidsetCreatedDate(Date createdDate)Sets the date the pipeline was created.voidsetCreatedUser(String createdUser)Sets the user by whom the pipeline was created.voidsetDescription(String description)Set the description of the workflow.voidsetExpandingRemoteWorkflow(boolean expandingRemoteWorkflow)voidsetExtendedDescription(String extendedDescription)Set the description of the workflow.voidsetInfo(WorkflowMetaInfo info)Sets infoprotected voidsetInternalEntryCurrentDirectory(IVariables variables)protected voidsetInternalFilenameHopVariables(IVariables variables)Sets the internal filename hop variables.voidsetInternalHopVariables(IVariables variables)This method sets various internal hop variables that can be used by the pipeline.protected voidsetInternalNameHopVariable(IVariables variables)Sets the internal name hop variable.voidsetModifiedDate(Date modifiedDate)Sets the date the pipeline was modified.voidsetModifiedUser(String modifiedUser)Sets the user who last modified the pipeline.voidsetName(String newName)Set the name.voidsetNameSynchronizedWithFilename(boolean nameSynchronizedWithFilename)voidsetStartActionName(String name)voidsetWorkflowStatus(int status)Set the status of the workflow.voidsetWorkflowVersion(String jobVersion)Set the version of the workflow.StringtoString()Gets a textual representation of the workflow.voidunselectAll()Unselect all.protected voidupdateCurrentDir(IVariables variables)-
Methods inherited from class org.apache.hop.base.AbstractMeta
addContentChangedListener, addCurrentDirectoryChangedListener, addFilenameChangedListener, addNameChangedListener, addNote, addNote, addObserver, addParameterDefinition, addUndo, canSave, clearNameChangedListeners, clearUndo, compare, deleteObserver, extractNameFromFilename, findDatabase, findDatabase, findHopServer, fireContentChangedListeners, fireContentChangedListeners, fireCurrentDirectoryChanged, fireFilenameChangedListeners, fireNameChangedListeners, getAttribute, getAttributes, getAttributesMap, getContentChangedListeners, getDatabaseNames, getDatabases, getFilename, getHopServerNames, getMaxUndo, getMetadataProvider, getNote, getNote, getNoteIndexes, getNotes, getParameterDefault, getParameterDescription, getSelectedNotes, getUndoSize, hashCode, haveNotesChanged, indexOfNote, isAlwaysShowRunOptions, isClearingLog, isSafeModeEnabled, isShowDialog, listParameters, lowerNote, nameFromFilename, nextUndo, notifyObservers, nrDatabases, nrNotes, previousUndo, raiseNote, removeAllParameters, removeContentChangedListener, removeCurrentDirectoryChangedListener, removeFilenameChangedListener, removeNameChangedListener, removeNote, setAlwaysShowRunOptions, setAttribute, setAttributes, setAttributesMap, setChanged, setChanged, setClearingLog, setFilename, setMaxUndo, setMetadataProvider, setNotes, setSafeModeEnabled, setShowDialog, viewNextUndo, viewPreviousUndo, viewThisUndo
-
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.apache.hop.core.file.IHasFilename
getFilename
-
-
-
-
Field Detail
-
WORKFLOW_EXTENSION
public static final String WORKFLOW_EXTENSION
- See Also:
- Constant Field Values
-
XML_TAG
public static final String XML_TAG
- See Also:
- Constant Field Values
-
info
protected WorkflowMetaInfo info
-
workflowVersion
protected String workflowVersion
-
workflowStatus
protected int workflowStatus
-
workflowActions
protected List<ActionMeta> workflowActions
-
workflowHops
protected List<WorkflowHopMeta> workflowHops
-
arguments
protected String[] arguments
-
changedActions
protected boolean changedActions
-
changedHops
protected boolean changedHops
-
startActionName
protected String startActionName
-
expandingRemoteWorkflow
protected boolean expandingRemoteWorkflow
-
STRING_SPECIAL_OK
public static final String STRING_SPECIAL_OK
Constant = "OK"- See Also:
- Constant Field Values
-
STRING_SPECIAL_ERROR
public static final String STRING_SPECIAL_ERROR
Constant = "ERROR"- See Also:
- Constant Field Values
-
max
public boolean[] max
List of booleans indicating whether or not to remember the size and position of the different windows...
-
XML_TAG_PARAMETERS
protected static final String XML_TAG_PARAMETERS
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
WorkflowMeta
public WorkflowMeta()
Instantiates a new workflow meta.
-
WorkflowMeta
public WorkflowMeta(String fname) throws HopXmlException
Instantiates a new workflow meta.- Parameters:
fname- the fname- Throws:
HopXmlException- the hop xml exception
-
WorkflowMeta
public WorkflowMeta(IVariables variables, String fname, IHopMetadataProvider metadataProvider) throws HopXmlException
Load the workflow from the XML file specified- Parameters:
variables-fname-metadataProvider-- Throws:
HopXmlException
-
WorkflowMeta
public WorkflowMeta(InputStream inputStream, IHopMetadataProvider metadataProvider, IVariables variables) throws HopXmlException
Instantiates a new workflow meta.- Parameters:
inputStream- the input streamvariables-- Throws:
HopXmlException- the hop xml exception
-
WorkflowMeta
public WorkflowMeta(Node workflowNode, IHopMetadataProvider metadataProvider, IVariables variables) throws HopXmlException
Create a new WorkflowMeta object by loading it from a a DOM node.- Parameters:
workflowNode- The node to load fromvariables-- Throws:
HopXmlException
-
-
Method Detail
-
clear
public void clear()
Clears or reinitializes many of the WorkflowMeta properties.- Overrides:
clearin classAbstractMeta
-
addDefaults
public void addDefaults()
Adds the defaults.
-
getStart
public ActionMeta getStart()
Gets the start.- Returns:
- the start
-
compare
public int compare(WorkflowMeta j1, WorkflowMeta j2)
Compares two workflow on name, filename, etc. The comparison algorithm is as follows:
- The first workflow's filename is checked first; if it has none, the workflow is created. If the second workflow does not come from a repository, -1 is returned.
- If the workflows are both created, the workflows' names are compared. If the first workflow has no name and the second one does, a -1 is returned. If the opposite is true, a 1 is returned.
- If they both have names they are compared as strings. If the result is non-zero it is returned.
- Parameters:
j1- the first workflow to comparej2- the second workflow to compare- Returns:
- 0 if the two workflows are equal, 1 or -1 depending on the values (see description above)
-
compareTo
public int compareTo(WorkflowMeta o)
Compares this workflow's meta-data to the specified workflow's meta-data. This method simply calls compare(this, o)- Specified by:
compareToin interfaceComparable<WorkflowMeta>- Parameters:
o- the o- Returns:
- the int
- See Also:
compare(WorkflowMeta, WorkflowMeta),Comparable.compareTo(Object)
-
equals
public boolean equals(Object obj)
Checks whether this workflow's meta-data object is equal to the specified object. If the specified object is not an instance of WorkflowMeta, false is returned. Otherwise the method returns whether a call to compare() indicates equality (i.e. compare(this, (WorkflowMeta)obj)==0).- Overrides:
equalsin classObject- Parameters:
obj- the obj- Returns:
- true, if successful
- See Also:
compare(WorkflowMeta, WorkflowMeta),Object.equals(Object)
-
clone
public Object clone()
Clones the workflow meta-data object.- Overrides:
clonein classObject- Returns:
- a clone of the workflow meta-data object
- See Also:
Object.clone()
-
realClone
public Object realClone(boolean doClear)
Perform a real clone of the workflow meta-data object, including cloning all lists and copying all values. If the doClear parameter is true, the clone will be cleared of ALL values before the copy. If false, only the copied fields will be cleared.- Parameters:
doClear- Whether to clear all of the clone's data before copying from the source object- Returns:
- a real clone of the calling object
-
getExtension
protected String getExtension()
- Specified by:
getExtensionin classAbstractMeta
-
clearChanged
public void clearChanged()
Clears the different changed flags of the workflow.- Specified by:
clearChangedin interfaceIChanged- Specified by:
clearChangedin interfaceIEngineMeta- Overrides:
clearChangedin classAbstractMeta
-
hasChanged
public boolean hasChanged()
- Specified by:
hasChangedin interfaceIChanged- Overrides:
hasChangedin classAbstractMeta
-
getXml
public String getXml(IVariables variables) throws HopException
Gets the XML representation of this workflow.- Specified by:
getXmlin interfaceIEngineMeta- Specified by:
getXmlin interfaceIXml- Parameters:
variables-- Returns:
- the XML representation of this workflow
- Throws:
HopException- if any errors occur during generation of the XML- See Also:
IXml.getXml(IVariables)
-
loadXml
public void loadXml(IVariables variables, String fname, IHopMetadataProvider metadataProvider) throws HopXmlException
- Throws:
HopXmlException
-
loadXml
public void loadXml(Node workflowNode, String filename, IHopMetadataProvider metadataProvider, IVariables variables) throws HopXmlException
Load a block of XML from an DOM node.- Parameters:
workflowNode- The node to load fromfilename- The filenamemetadataProvider- the MetaStore to usevariables-- Throws:
HopXmlException
-
getAction
public ActionMeta getAction(int x, int y, int iconsize)
Gets the action copy.- Parameters:
x- the xy- the yiconsize- the iconsize- Returns:
- the action copy
-
nrActions
public int nrActions()
Nr actions.- Returns:
- the int
-
nrWorkflowHops
public int nrWorkflowHops()
Nr workflow hops.- Returns:
- the int
-
getWorkflowHop
public WorkflowHopMeta getWorkflowHop(int i)
Gets the workflow hop.- Parameters:
i- the i- Returns:
- the workflow hop
-
getAction
public ActionMeta getAction(int i)
Gets the action.- Parameters:
i- the i- Returns:
- the action
-
addAction
public void addAction(ActionMeta action)
Adds the action.- Parameters:
action- the je
-
addWorkflowHop
public void addWorkflowHop(WorkflowHopMeta hop)
Adds the workflow hop.- Parameters:
hop- the hi
-
addAction
public void addAction(int p, ActionMeta action)Adds the action.- Parameters:
p- the paction- the si
-
addWorkflowHop
public void addWorkflowHop(int p, WorkflowHopMeta hop)Adds the workflow hop.- Parameters:
p- the phop- the hi
-
removeAction
public void removeAction(int i)
Removes the action.- Parameters:
i- the i
-
removeWorkflowHop
public void removeWorkflowHop(int i)
Removes the workflow hop.- Parameters:
i- the i
-
removeWorkflowHop
public void removeWorkflowHop(WorkflowHopMeta hop)
Removes a hop from the pipeline. Also marks that the pipeline's hops have changed.- Parameters:
hop- The hop to remove from the list of hops
-
indexOfWorkflowHop
public int indexOfWorkflowHop(WorkflowHopMeta hop)
Index of workflow hop.- Parameters:
hop- the workflow hop- Returns:
- the int
-
indexOfAction
public int indexOfAction(ActionMeta action)
Index of action.- Parameters:
action- the ActionMeta- Returns:
- the int
-
setAction
public void setAction(int idx, ActionMeta action)Sets the action.- Parameters:
idx- the idxaction- the jec
-
findAction
public ActionMeta findAction(String name)
Find an existing ActionMeta by it's name and number- Parameters:
name- The name of the action meta- Returns:
- The ActionMeta or null if nothing was found!
-
findWorkflowHop
public WorkflowHopMeta findWorkflowHop(String name)
Find workflow hop.- Parameters:
name- the name- Returns:
- the workflow hop meta
-
findWorkflowHopFrom
public WorkflowHopMeta findWorkflowHopFrom(ActionMeta action)
Find workflow hop from.- Parameters:
action- the action meta- Returns:
- the workflow hop meta
-
findWorkflowHop
public WorkflowHopMeta findWorkflowHop(ActionMeta from, ActionMeta to)
Find workflow hop.- Parameters:
from- the fromto- the to- Returns:
- the workflow hop meta
-
findWorkflowHop
public WorkflowHopMeta findWorkflowHop(ActionMeta from, ActionMeta to, boolean includeDisabled)
Find workflow hop.- Parameters:
from- the fromto- the toincludeDisabled- the include disabled- Returns:
- the workflow hop meta
-
findWorkflowHopTo
public WorkflowHopMeta findWorkflowHopTo(ActionMeta actionMeta)
Find workflow hop to.- Parameters:
actionMeta- the action meta- Returns:
- the workflow hop meta
-
findNrPrevActions
public int findNrPrevActions(ActionMeta from)
Find nr prev actions.- Parameters:
from- the from- Returns:
- the int
-
findPrevAction
public ActionMeta findPrevAction(ActionMeta to, int nr)
Find prev action.- Parameters:
to- the tonr- the nr- Returns:
- the action copy
-
findNrPrevActions
public int findNrPrevActions(ActionMeta to, boolean info)
Find nr prev actions.- Parameters:
to- the toinfo- the info- Returns:
- the int
-
findPrevAction
public ActionMeta findPrevAction(ActionMeta to, int nr, boolean info)
Find prev action.- Parameters:
to- the tonr- the nrinfo- the info- Returns:
- the action copy
-
findNrNextActions
public int findNrNextActions(ActionMeta from)
Find nr next actions.- Parameters:
from- the from- Returns:
- the int
-
findNextAction
public ActionMeta findNextAction(ActionMeta from, int cnt)
Find next action.- Parameters:
from- the fromcnt- the cnt- Returns:
- the action copy
-
hasLoop
public boolean hasLoop(ActionMeta action)
Checks for loop.- Parameters:
action- the action- Returns:
- true, if successful
-
hasLoop
public boolean hasLoop(ActionMeta action, ActionMeta lookup)
Checks for loop.- Parameters:
action- the actionlookup- the lookup- Returns:
- true, if successful
-
isEntryUsedInHops
public boolean isEntryUsedInHops(ActionMeta action)
Checks if is action used in hops.- Parameters:
action- the jge- Returns:
- true, if is action used in hops
-
countEntries
public int countEntries(String name)
Count actions.- Parameters:
name- the name- Returns:
- the int
-
getAlternativeActionName
public String getAlternativeActionName(String name)
Proposes an alternative action name when the original already exists...- Parameters:
name- The action name to find an alternative for..- Returns:
- The alternative action name.
-
getAllWorkflowGraphActions
public ActionMeta[] getAllWorkflowGraphActions(String name)
Gets the all workflow graph actions.- Parameters:
name- the name- Returns:
- the all workflow graph actions
-
getAllWorkflowHopsUsing
public WorkflowHopMeta[] getAllWorkflowHopsUsing(String name)
Gets the all workflow hops using.- Parameters:
name- the name- Returns:
- the all workflow hops using
-
selectAll
public void selectAll()
Select all.
-
unselectAll
public void unselectAll()
Unselect all.
-
getMaximum
public Point getMaximum()
Gets the maximum.- Returns:
- the maximum
-
getMinimum
public Point getMinimum()
Get the minimum point on the canvas of a workflow- Returns:
- Minimum coordinate of a transform in the workflow
-
getSelectedLocations
public Point[] getSelectedLocations()
Gets the selected locations.- Returns:
- the selected locations
-
getSelectedNoteLocations
public Point[] getSelectedNoteLocations()
Get all the selected note locations- Returns:
- The selected transform and notes locations.
-
getSelectedActions
public List<ActionMeta> getSelectedActions()
Gets the selected actions.- Returns:
- the selected actions
-
getActionIndexes
public int[] getActionIndexes(List<ActionMeta> actions)
Gets the action indexes.- Parameters:
actions- the actions- Returns:
- the action indexes
-
findStart
public ActionMeta findStart()
Find start.- Returns:
- the action copy
-
toString
public String toString()
Gets a textual representation of the workflow. If its name has been set, it will be returned, otherwise the classname is returned.
-
getSqlStatements
public List<SqlStatement> getSqlStatements(IProgressMonitor monitor, IVariables variables) throws HopException
- Throws:
HopException
-
getSqlStatements
public List<SqlStatement> getSqlStatements(IHopMetadataProvider metadataProvider, IProgressMonitor monitor, IVariables variables) throws HopException
Builds a list of all the SQL statements that this pipeline needs in order to work properly.- Returns:
- An ArrayList of SqlStatement objects.
- Throws:
HopException
-
getStringList
public List<StringSearchResult> getStringList(boolean searchTransforms, boolean searchDatabases, boolean searchNotes)
Get a list of all the strings used in this workflow.- Returns:
- A list of StringSearchResult with strings used in the workflow
-
getUsedVariables
public List<String> getUsedVariables()
Gets the used variables.- Returns:
- the used variables
-
haveActionsChanged
public boolean haveActionsChanged()
Have actions changed.- Returns:
- true, if successful
-
haveWorkflowHopsChanged
public boolean haveWorkflowHopsChanged()
Have workflow hops changed.- Returns:
- true, if successful
-
getWorkflowVersion
public String getWorkflowVersion()
Gets the version of the workflow.- Returns:
- The version of the workflow
-
getWorkflowStatus
public int getWorkflowStatus()
Gets the status of the workflow.- Returns:
- the status of the workflow
-
setWorkflowVersion
public void setWorkflowVersion(String jobVersion)
Set the version of the workflow.- Parameters:
jobVersion- The new version description of the workflow
-
setWorkflowStatus
public void setWorkflowStatus(int status)
Set the status of the workflow.- Parameters:
status- The new status description of the workflow
-
setInternalHopVariables
public void setInternalHopVariables(IVariables variables)
This method sets various internal hop variables that can be used by the pipeline.- Specified by:
setInternalHopVariablesin interfaceIEngineMeta- Specified by:
setInternalHopVariablesin classAbstractMeta- Parameters:
variables- the variables to set the internal Hop variables and values on
-
updateCurrentDir
protected void updateCurrentDir(IVariables variables)
-
setInternalNameHopVariable
protected void setInternalNameHopVariable(IVariables variables)
Sets the internal name hop variable.- Specified by:
setInternalNameHopVariablein classAbstractMeta- Parameters:
variables- the new internal name hop variable
-
setInternalFilenameHopVariables
protected void setInternalFilenameHopVariables(IVariables variables)
Sets the internal filename hop variables.- Specified by:
setInternalFilenameHopVariablesin classAbstractMeta- Parameters:
variables- the new internal filename hop variables
-
setInternalEntryCurrentDirectory
protected void setInternalEntryCurrentDirectory(IVariables variables)
-
checkActions
public void checkActions(List<ICheckResult> remarks, boolean onlySelected, IProgressMonitor monitor, IVariables variables, IHopMetadataProvider metadataProvider)
Check all actions within the workflow. Each Workflow Action has the opportunity to check their own settings.- Parameters:
remarks- List of CheckResult remarks inserted into by each ActiononlySelected- true if you only want to check the selected workflowsmonitor- Progress monitor (not presently in use)
-
getResourceDependencies
public List<ResourceReference> getResourceDependencies(IVariables variables)
Gets the resource dependencies.- Returns:
- the resource dependencies
-
exportResources
public String exportResources(IVariables variables, Map<String,ResourceDefinition> definitions, IResourceNaming namingInterface, IHopMetadataProvider metadataProvider) throws HopException
Description copied from interface:IResourceExportExports the object to a flat-file system, adding content with filename keys to a set of definitions. The supplied resource naming interface allows the object to name appropriately without worrying about those parts of the implementation specific details.- Specified by:
exportResourcesin interfaceIResourceExport- Parameters:
variables- The variable variables to resolve (environment) variables with.definitions- The map containing the filenames and contentnamingInterface- The resource naming interface allows the object to name appropriatelymetadataProvider- the central metadata to load non-hop specific metadata from- Returns:
- The filename for this object. (also contained in the definitions map)
- Throws:
HopException- in case something goes wrong during the export
-
renameActionIfNameCollides
public void renameActionIfNameCollides(ActionMeta actionMeta)
See if the name of the supplied action doesn't collide with any other action in the workflow.- Parameters:
actionMeta- The action copy to verify the name for.
-
getActions
public List<ActionMeta> getActions()
Gets the workflow actions.- Returns:
- the workflow actions
-
getWorkflowHops
public List<WorkflowHopMeta> getWorkflowHops()
Gets the workflow hops.- Returns:
- the workflow hops
-
composeActionList
public List<IAction> composeActionList()
Create a unique list of action interfaces- Returns:
-
getLogChannelId
public String getLogChannelId()
-
getObjectType
public LoggingObjectType getObjectType()
-
containsAction
public boolean containsAction(ActionMeta actionMeta)
-
getMissingActions
public List<MissingAction> getMissingActions()
-
addMissingAction
public void addMissingAction(MissingAction missingAction)
-
removeMissingAction
public void removeMissingAction(MissingAction missingAction)
-
hasMissingPlugins
public boolean hasMissingPlugins()
- Overrides:
hasMissingPluginsin classAbstractMeta
-
getStartActionName
public String getStartActionName()
-
setStartActionName
public void setStartActionName(String name)
-
isExpandingRemoteWorkflow
public boolean isExpandingRemoteWorkflow()
-
setExpandingRemoteWorkflow
public void setExpandingRemoteWorkflow(boolean expandingRemoteWorkflow)
-
isEmpty
public boolean isEmpty()
-
getInfo
public WorkflowMetaInfo getInfo()
Gets info- Returns:
- value of info
-
setInfo
public void setInfo(WorkflowMetaInfo info)
Sets info- Parameters:
info- value of info
-
getName
public String getName()
Get the name of the workflow. If the name is synchronized with the filename, we return the base filename.- Specified by:
getNamein interfaceIEngineMeta- Specified by:
getNamein classAbstractMeta- Returns:
- The name of the workflow
-
setName
public void setName(String newName)
Set the name.- Specified by:
setNamein interfaceIEngineMeta- Specified by:
setNamein classAbstractMeta- Parameters:
newName- The new name
-
isNameSynchronizedWithFilename
public boolean isNameSynchronizedWithFilename()
- Specified by:
isNameSynchronizedWithFilenamein interfaceIEngineMeta- Specified by:
isNameSynchronizedWithFilenamein classAbstractMeta- Returns:
- true if the name is derived from the filename
-
setNameSynchronizedWithFilename
public void setNameSynchronizedWithFilename(boolean nameSynchronizedWithFilename)
- Specified by:
setNameSynchronizedWithFilenamein interfaceIEngineMeta- Specified by:
setNameSynchronizedWithFilenamein classAbstractMeta- Parameters:
nameSynchronizedWithFilename- Set to true if the name is derived from the filename
-
getDescription
public String getDescription()
Gets the description of the workflow.- Specified by:
getDescriptionin classAbstractMeta- Returns:
- The description of the workflow
-
setDescription
public void setDescription(String description)
Set the description of the workflow.- Specified by:
setDescriptionin classAbstractMeta- Parameters:
description- The new description of the workflow
-
getExtendedDescription
public String getExtendedDescription()
Gets the extended description of the workflow.- Specified by:
getExtendedDescriptionin classAbstractMeta- Returns:
- The extended description of the workflow
-
setExtendedDescription
public void setExtendedDescription(String extendedDescription)
Set the description of the workflow.- Specified by:
setExtendedDescriptionin classAbstractMeta- Parameters:
extendedDescription- The new extended description of the workflow
-
getCreatedDate
public Date getCreatedDate()
Gets the date the pipeline was created.- Specified by:
getCreatedDatein interfaceIEngineMeta- Specified by:
getCreatedDatein classAbstractMeta- Returns:
- the date the pipeline was created.
-
setCreatedDate
public void setCreatedDate(Date createdDate)
Sets the date the pipeline was created.- Specified by:
setCreatedDatein interfaceIEngineMeta- Specified by:
setCreatedDatein classAbstractMeta- Parameters:
createdDate- The creation date to set.
-
setCreatedUser
public void setCreatedUser(String createdUser)
Sets the user by whom the pipeline was created.- Specified by:
setCreatedUserin interfaceIEngineMeta- Specified by:
setCreatedUserin classAbstractMeta- Parameters:
createdUser- The user to set.
-
getCreatedUser
public String getCreatedUser()
Gets the user by whom the pipeline was created.- Specified by:
getCreatedUserin interfaceIEngineMeta- Specified by:
getCreatedUserin classAbstractMeta- Returns:
- the user by whom the pipeline was created.
-
setModifiedDate
public void setModifiedDate(Date modifiedDate)
Sets the date the pipeline was modified.- Specified by:
setModifiedDatein interfaceIEngineMeta- Specified by:
setModifiedDatein classAbstractMeta- Parameters:
modifiedDate- The modified date to set.
-
getModifiedDate
public Date getModifiedDate()
Gets the date the pipeline was modified.- Specified by:
getModifiedDatein interfaceIEngineMeta- Specified by:
getModifiedDatein classAbstractMeta- Returns:
- the date the pipeline was modified.
-
setModifiedUser
public void setModifiedUser(String modifiedUser)
Sets the user who last modified the pipeline.- Specified by:
setModifiedUserin interfaceIEngineMeta- Specified by:
setModifiedUserin classAbstractMeta- Parameters:
modifiedUser- The user name to set.
-
getModifiedUser
public String getModifiedUser()
Gets the user who last modified the pipeline.- Specified by:
getModifiedUserin interfaceIEngineMeta- Specified by:
getModifiedUserin classAbstractMeta- Returns:
- the user who last modified the pipeline.
-
-