Package org.apache.hop.workflow.action
Class ActionBase
- java.lang.Object
-
- org.apache.hop.workflow.action.ActionBase
-
- All Implemented Interfaces:
Cloneable,IAttributes,ICheckResultSource,IExtensionData,IHasLogChannel,ILoggingObject,IVariables,IResourceHolder,IAction
- Direct Known Subclasses:
ActionDummy,ActionStart,MissingAction
public abstract class ActionBase extends Object implements IAction, Cloneable, ILoggingObject, IAttributes, IExtensionData, ICheckResultSource, IResourceHolder
Base class for the different types of workflow actions. Workflow actions can extend this base class to get access to common member variables and default method behavior. However, ActionBase does not implement IAction (although it implements most of the same methods), so individual action classes must implement IAction and specifically theexecute()method.
-
-
Field Summary
Fields Modifier and Type Field Description protected Map<String,Map<String,String>>attributesMapprotected StringcontainerObjectIdThe container object idprotected Map<String,String>entryTransformSetVariablesMapThe map for transform variable bindings for the actionprotected Map<String,Object>extensionDataMapprotected ILogChannellogThe log channel interface object, used for loggingprotected IWorkflowEngine<WorkflowMeta>parentWorkflowThe parent workflowprotected WorkflowMetaparentWorkflowMeta
-
Constructor Summary
Constructors Modifier Constructor Description protectedActionBase()Instantiates a new action base object.protectedActionBase(String name, String description)Instantiates a new action base object with the given name and description.protectedActionBase(String name, String description, String pluginId)protectedActionBase(ActionBase b)Copy constructor variant
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcheck(List<ICheckResult> remarks, WorkflowMeta workflowMeta, IVariables variables, IHopMetadataProvider metadataProvider)Allows Action objects to check themselves for consistencyvoidclear()Clears all variable valuesObjectclone()This method is called when a action is duplicated in HopGui.voidcopyFrom(IVariables variables)Copies variables from a given variable variables to this actionbooleanequals(Object obj)Checks if the Action object is equal to the specified objectStringexportResources(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.StringgetAttribute(String groupName, String key)Map<String,String>getAttributes(String groupName)Map<String,Map<String,String>>getAttributesMap()StringgetContainerId()Gets the container object idStringgetDescription()Gets the description of the actionStringgetDialogClassName()You can use this to point to an alternate class for the Dialog.StringgetEntryTransformSetVariable(String variableName)Gets the value of the specified EntryTransformSetVariableprotected Map<String,String>getEntryTransformSetVariablesMap()Gets a Map of variables set in EntryTransformSetVariablesMap<String,Object>getExtensionDataMap()StringgetFilename()Gets the filename of the action.ILogChannelgetLogChannel()Gets the log channel.StringgetLogChannelId()Gets the logging channel idLogLevelgetLogLevel()Gets the logging level for the actionIHopMetadataProvidergetMetadataProvider()StringgetName()Gets the name of the actionStringgetObjectCopy()Gets a string identifying a copy in a series of transformsStringgetObjectName()Gets the object nameLoggingObjectTypegetObjectType()Gets the logging object typeILoggingObjectgetParent()Gets the logging object interface's parentIVariablesgetParentVariables()Gets the parent variable variablesIWorkflowEngine<WorkflowMeta>getParentWorkflow()Gets the parent workflow.WorkflowMetagetParentWorkflowMeta()Return Gets the parent workflowMeta.StringgetPluginId()Gets the plugin id.StringgetRealFilename()Gets the real filename of the action, by substituting any environment variables present in the filename.String[]getReferencedObjectDescriptions()DategetRegistrationDate()Returns the registration date for the action.List<ResourceReference>getResourceDependencies(IVariables variables, WorkflowMeta workflowMeta)Gets a list of all the resource dependencies that the transform is depending on.List<SqlStatement>getSqlStatements(IHopMetadataProvider metadataProvider, IVariables variables)Gets the SQL statements needed by this action to execute successfully, given a set of variables.StringgetTypeDesc()Gets the plug-in type descriptionStringgetTypeId()Gets the high-level type of resource holder.DatabaseMeta[]getUsedDatabaseConnections()Gets all the database connections that are used by the action.StringgetVariable(String variableName)Gets the value of the specified variable, or returns a default value if no such variable existsStringgetVariable(String variableName, String defaultValue)Gets the value of the specified variable, or returns a default value if no such variable existsbooleangetVariableBoolean(String variableName, boolean defaultValue)Returns a boolean representation of the specified variable after performing any necessary substitution.String[]getVariableNames()Gets a list of variable names for the actionprotected IVariablesgetVariables()Gets the variable bindings for the action.StringgetXml()This method is called by Hop whenever a action needs to serialize its settings to XML.booleanhasChanged()Checks whether the action has changedinthashCode()voidinitializeFrom(IVariables parent)Sets the values of the action's variables to the values from the parent variablesbooleanisBasic()Checks if the logging level is basic.booleanisDebug()Checks if the logging level is debug.booleanisDetailed()Checks if the logging level is detailed.booleanisEvaluation()This method must return true if the action supports the true/false outgoing hops.booleanisForcingSeparateLogging()booleanisGatheringMetrics()booleanisPipeline()Checks if this action executes a pipelineboolean[]isReferencedObjectEnabled()booleanisRowlevel()Checks if the logging level is rowlevel.booleanisStart()Checks if the action has startedbooleanisUnconditional()This method must return true if the action supports the unconditional outgoing hop.booleanisWorkflow()Checks if the action executes a workflowIHasFilenameloadReferencedObject(int index, IHopMetadataProvider metadataProvider, IVariables variables)Load the referenced objectvoidloadXml(Node node)This method is called by Hop whenever a action needs to read its settings from XML.voidloadXml(Node entryNode, IHopMetadataProvider metadataProvider, IVariables variables)This method is called by Apache Hop whenever a action needs to read its settings from XML.voidlogBasic(String message)Logs the specified string at the basic level.voidlogBasic(String message, Object... arguments)Logs the specified string and arguments at the basic level.voidlogDebug(String message)Logs the specified string at the debug level.voidlogDebug(String message, Object... arguments)Logs the specified string and arguments at the debug level.voidlogDetailed(String message)Logs the specified string at the detailed level.voidlogDetailed(String message, Object... arguments)Logs the specified string and arguments at the detailed level.voidlogError(String message)Logs the specified string at the error level.voidlogError(String message, Object... arguments)Logs the specified string and arguments at the error level.voidlogError(String message, Throwable e)Logs the specified string and Throwable object at the error level.voidlogMinimal(String message)Logs the specified string at the minimal level.voidlogMinimal(String message, Object... arguments)Logs the specified string and arguments at the minimal level.voidlogRowlevel(String message)Logs the specified string at the row level.voidlogRowlevel(String message, Object... arguments)Logs the specified string and arguments at the row level.booleanresetErrorsBeforeExecution()Checks whether a reset of the number of errors is required before execution.Stringresolve(String aString)Substitutes any variable values into the given string, and returns the resolved stringString[]resolve(String[] aString)Substitutes any variable values into each of the given strings, and returns an array containing the resolved string(s)Stringresolve(String aString, IRowMeta rowMeta, Object[] rowData)voidsetAttribute(String groupName, String key, String value)voidsetAttributes(String groupName, Map<String,String> attributes)voidsetAttributesMap(Map<String,Map<String,String>> attributesMap)voidsetChanged()Sets that the action has changed (i.e.voidsetChanged(boolean ch)Sets whether the action has changedvoidsetContainerObjectId(String containerObjectId)Sets the container object idvoidsetDescription(String description)Sets the description for the action.voidsetEntryTransformSetVariable(String variableName, String variableValue)Sets the value of the specified EntryTransformSetVariablevoidsetForcingSeparateLogging(boolean forcingSeparateLogging)voidsetGatheringMetrics(boolean gatheringMetrics)voidsetLogLevel(LogLevel logLevel)Sets the logging level for the actionvoidsetMetadataProvider(IHopMetadataProvider metadataProvider)Sets the MetaStorevoidsetName(String name)Sets the name of the actionvoidsetParentVariables(IVariables parent)Sets the parent variable variablesvoidsetParentWorkflow(IWorkflowEngine<WorkflowMeta> parentWorkflow)Sets the parent workflow.voidsetParentWorkflowMeta(WorkflowMeta parentWorkflowMeta)At save and run time, the system will attempt to set the workflowMeta so that it can be accessed by the actions if necessary.voidsetPluginId(String pluginId)Sets the plugin id.voidsetVariable(String variableName, String variableValue)Sets the value of the specified variable to the specified valuevoidsetVariables(Map<String,String> map)Injects variables using the given Map.voidshareWith(IVariables variables)Shares a variable variables from another variable variables.StringtoString()Returns a string representation of the object.
-
-
-
Field Detail
-
entryTransformSetVariablesMap
protected Map<String,String> entryTransformSetVariablesMap
The map for transform variable bindings for the action
-
parentWorkflow
protected IWorkflowEngine<WorkflowMeta> parentWorkflow
The parent workflow
-
log
protected ILogChannel log
The log channel interface object, used for logging
-
containerObjectId
protected String containerObjectId
The container object id
-
parentWorkflowMeta
protected WorkflowMeta parentWorkflowMeta
-
-
Constructor Detail
-
ActionBase
protected ActionBase()
Instantiates a new action base object.
-
ActionBase
protected ActionBase(String name, String description)
Instantiates a new action base object with the given name and description.- Parameters:
name- the name of the actiondescription- the description of the action
-
ActionBase
protected ActionBase(String name, String description, String pluginId)
- Parameters:
name- the name of the actiondescription- the description of the actionpluginId- the pluginId of the action
-
ActionBase
protected ActionBase(ActionBase b)
Copy constructor variant- Parameters:
b- The action base to copy
-
-
Method Detail
-
equals
public boolean equals(Object obj)
Checks if the Action object is equal to the specified object- Overrides:
equalsin classObject- Returns:
- true if the two objects are equal, false otherwise
- See Also:
Object.equals(Object)
-
getTypeDesc
public String getTypeDesc()
Gets the plug-in type description- Returns:
- the plug-in type description
-
setName
public void setName(String name)
Sets the name of the action
-
getName
public String getName()
Gets the name of the action- Specified by:
getNamein interfaceIAction- Specified by:
getNamein interfaceICheckResultSource- Specified by:
getNamein interfaceIResourceHolder- Returns:
- the name of the action
- See Also:
ICheckResultSource.getName()
-
setDescription
public void setDescription(String description)
Sets the description for the action.- Specified by:
setDescriptionin interfaceIAction- Parameters:
description- the new description
-
getDescription
public String getDescription()
Gets the description of the action- Specified by:
getDescriptionin interfaceIAction- Specified by:
getDescriptionin interfaceICheckResultSource- Specified by:
getDescriptionin interfaceIResourceHolder- Returns:
- the description of the action
- See Also:
ICheckResultSource.getDescription()
-
getTypeId
public String getTypeId()
Description copied from interface:IResourceHolderGets the high-level type of resource holder.- Specified by:
getTypeIdin interfaceIResourceHolder- Returns:
- JOBENTRY, TRANSFORM, etc.
-
setChanged
public void setChanged()
Sets that the action has changed (i.e. a call to setChanged(true))- Specified by:
setChangedin interfaceIAction- See Also:
setChanged(boolean)
-
setChanged
public void setChanged(boolean ch)
Sets whether the action has changed- Specified by:
setChangedin interfaceIAction- Parameters:
ch- true if the action has changed, false otherwise
-
hasChanged
public boolean hasChanged()
Checks whether the action has changed- Specified by:
hasChangedin interfaceIAction- Returns:
- true if the action has changed, false otherwise
-
isStart
public boolean isStart()
Checks if the action has started
-
isWorkflow
public boolean isWorkflow()
Checks if the action executes a workflow- Specified by:
isWorkflowin interfaceIAction- Returns:
- true if the action executes a workflow, false otherwise
-
isPipeline
public boolean isPipeline()
Checks if this action executes a pipeline- Specified by:
isPipelinein interfaceIAction- Returns:
- true if this action executes a pipeline, false otherwise
-
getXml
public String getXml()
This method is called by Hop whenever a action needs to serialize its settings to XML. It is called when saving a workflow in HopGui. The method returns an XML string, containing the serialized settings. The string contains a series of XML tags, typically one tag per setting. The helper class org.apache.hop.core.xml.XmlHandler is typically used to construct the XML string.
-
loadXml
public void loadXml(Node node) throws HopXmlException
This method is called by Hop whenever a action needs to read its settings from XML. The XML node containing the action's settings is passed in as an argument. Again, the helper class org.apache.hop.core.xml.XmlHandler is typically used to conveniently read the settings from the XML node.- Parameters:
node- the top-level XML node- Throws:
HopXmlException- if any errors occur during the loading of the XML
-
loadXml
public void loadXml(Node entryNode, IHopMetadataProvider metadataProvider, IVariables variables) throws HopXmlException
Description copied from interface:IActionThis method is called by Apache Hop whenever a action needs to read its settings from XML. The XML node containing the action's settings is passed in as an argument. Again, the helper class org.apache.hop.core.xml.XmlHandler is typically used to conveniently read the settings from the XML node.- Specified by:
loadXmlin interfaceIAction- Parameters:
entryNode- the top-level XML nodemetadataProvider- The metadataProvider to optionally load from.- Throws:
HopXmlException- if any errors occur during the loading of the XML
-
clone
public Object clone()
This method is called when a action is duplicated in HopGui. It needs to return a deep copy of this action object. It is essential that the implementing class creates proper deep copies if the action configuration is stored in modifiable objects, such as lists or custom helper objects.
-
toString
public String toString()
Returns a string representation of the object. For ActionBase, this method returns the name- Overrides:
toStringin classObject- See Also:
Object.toString()
-
resetErrorsBeforeExecution
public boolean resetErrorsBeforeExecution()
Checks whether a reset of the number of errors is required before execution.- Specified by:
resetErrorsBeforeExecutionin interfaceIAction- Returns:
- true if a reset of the number of errors is required before execution, false otherwise
-
isEvaluation
public boolean isEvaluation()
This method must return true if the action supports the true/false outgoing hops. For ActionBase, this method always returns false- Specified by:
isEvaluationin interfaceIAction- Returns:
- false
-
isUnconditional
public boolean isUnconditional()
This method must return true if the action supports the unconditional outgoing hop. For ActionBase, this method always returns true- Specified by:
isUnconditionalin interfaceIAction- Returns:
- true
-
getSqlStatements
public List<SqlStatement> getSqlStatements(IHopMetadataProvider metadataProvider, IVariables variables) throws HopException
Gets the SQL statements needed by this action to execute successfully, given a set of variables. For ActionBase, this method returns an empty list.- Specified by:
getSqlStatementsin interfaceIAction- Parameters:
variables- a variable variables object containing variable bindingsmetadataProvider- the MetaStore to use- Returns:
- an empty list
- Throws:
HopException- if any errors occur during the generation of SQL statements
-
getFilename
public String getFilename()
Gets the filename of the action. For ActionBase, this method always returns null- Specified by:
getFilenamein interfaceIAction- Specified by:
getFilenamein interfaceILoggingObject- Returns:
- null
- See Also:
ILoggingObject.getFilename()
-
getRealFilename
public String getRealFilename()
Gets the real filename of the action, by substituting any environment variables present in the filename. For ActionBase, this method always returns null- Specified by:
getRealFilenamein interfaceIAction- Returns:
- null
-
getUsedDatabaseConnections
public DatabaseMeta[] getUsedDatabaseConnections()
Gets all the database connections that are used by the action. For ActionBase, this method returns an empty (non-null) array- Returns:
- an empty (non-null) array
-
copyFrom
public void copyFrom(IVariables variables)
Copies variables from a given variable variables to this action- Specified by:
copyFromin interfaceIVariables- See Also:
IVariables.copyFrom(IVariables)
-
resolve
public String resolve(String aString)
Substitutes any variable values into the given string, and returns the resolved string- Specified by:
resolvein interfaceIVariables- Returns:
- the string with any environment variables resolved and substituted
- See Also:
IVariables.resolve(String)
-
resolve
public String[] resolve(String[] aString)
Substitutes any variable values into each of the given strings, and returns an array containing the resolved string(s)- Specified by:
resolvein interfaceIVariables- See Also:
IVariables.resolve(String[])
-
resolve
public String resolve(String aString, IRowMeta rowMeta, Object[] rowData) throws HopValueException
- Specified by:
resolvein interfaceIVariables- Throws:
HopValueException
-
getParentVariables
public IVariables getParentVariables()
Gets the parent variable variables- Specified by:
getParentVariablesin interfaceIVariables- Returns:
- the parent variable variables
- See Also:
IVariables.getParentVariables()
-
setParentVariables
public void setParentVariables(IVariables parent)
Sets the parent variable variables- Specified by:
setParentVariablesin interfaceIVariables- See Also:
IVariables.setParentVariables( IVariables)
-
getVariable
public String getVariable(String variableName, String defaultValue)
Gets the value of the specified variable, or returns a default value if no such variable exists- Specified by:
getVariablein interfaceIVariables- Returns:
- the value of the specified variable, or returns a default value if no such variable exists
- See Also:
IVariables.getVariable(String, String)
-
getVariable
public String getVariable(String variableName)
Gets the value of the specified variable, or returns a default value if no such variable exists- Specified by:
getVariablein interfaceIVariables- Returns:
- the value of the specified variable, or returns a default value if no such variable exists
- See Also:
IVariables.getVariable(String)
-
getVariableBoolean
public boolean getVariableBoolean(String variableName, boolean defaultValue)
Returns a boolean representation of the specified variable after performing any necessary substitution. Truth values include case-insensitive versions of "Y", "YES", "TRUE" or "1".- Specified by:
getVariableBooleanin interfaceIVariables- Parameters:
variableName- the name of the variable to interrogate- Returns:
- a boolean representation of the specified variable after performing any necessary substitution
- See Also:
IVariables.getVariableBoolean(String, boolean)
-
initializeFrom
public void initializeFrom(IVariables parent)
Sets the values of the action's variables to the values from the parent variables- Specified by:
initializeFromin interfaceIVariables- See Also:
IVariables.initializeFrom( IVariables)
-
getVariableNames
public String[] getVariableNames()
Gets a list of variable names for the action- Specified by:
getVariableNamesin interfaceIVariables- Returns:
- a list of variable names
- See Also:
IVariables.getVariableNames()
-
setVariable
public void setVariable(String variableName, String variableValue)
Sets the value of the specified variable to the specified value- Specified by:
setVariablein interfaceIVariables- See Also:
IVariables.setVariable(String, String)
-
shareWith
public void shareWith(IVariables variables)
Shares a variable variables from another variable variables. This means that the object should take over the variables used as argument.- Specified by:
shareWithin interfaceIVariables- See Also:
IVariables.shareWith(IVariables)
-
setVariables
public void setVariables(Map<String,String> map)
Injects variables using the given Map. The behavior should be that the properties object will be stored and at the time the IVariables is initialized (or upon calling this method if the variables is already initialized). After injecting the link of the properties object should be removed.- Specified by:
setVariablesin interfaceIVariables- See Also:
IVariables.setVariables(Map)
-
check
public void check(List<ICheckResult> remarks, WorkflowMeta workflowMeta, IVariables variables, IHopMetadataProvider metadataProvider)
Allows Action objects to check themselves for consistency- Specified by:
checkin interfaceIAction- Parameters:
remarks- List of CheckResult objects indicating consistency statusworkflowMeta- the metadata object for the actionvariables- the variable variables to resolve string expressions with variables withmetadataProvider- the MetaStore to load common elements from
-
getResourceDependencies
public List<ResourceReference> getResourceDependencies(IVariables variables, WorkflowMeta workflowMeta)
Gets a list of all the resource dependencies that the transform is depending on. In ActionBase, this method returns an empty resource dependency list.- Specified by:
getResourceDependenciesin interfaceIAction- Returns:
- an empty list of ResourceReferences
- See Also:
ResourceReference
-
exportResources
public String exportResources(IVariables variables, Map<String,ResourceDefinition> definitions, IResourceNaming namingInterface, IHopMetadataProvider metadataProvider) throws HopException
Exports 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 interfaceIAction- 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 be named appropriatelymetadataProvider- the metadataProvider to load external metadata from- Returns:
- The filename for this object. (also contained in the definitions map)
- Throws:
HopException- in case something goes wrong during the export
-
getPluginId
public String getPluginId()
Gets the plugin id.- Specified by:
getPluginIdin interfaceIAction- Specified by:
getPluginIdin interfaceIResourceHolder- Returns:
- the plugin id
-
setPluginId
public void setPluginId(String pluginId)
Sets the plugin id.- Specified by:
setPluginIdin interfaceIAction- Parameters:
pluginId- the new plugin id
-
getDialogClassName
public String getDialogClassName()
You can use this to point to an alternate class for the Dialog. By default we return null. This means we simply add Dialog to the Action plugin class name.- Specified by:
getDialogClassNamein interfaceIAction- Returns:
- full class name of the action dialog class (null by default)
-
getVariables
protected IVariables getVariables()
Gets the variable bindings for the action.- Returns:
- the variable bindings for the action.
-
setParentWorkflow
public void setParentWorkflow(IWorkflowEngine<WorkflowMeta> parentWorkflow)
Sets the parent workflow.- Specified by:
setParentWorkflowin interfaceIAction- Parameters:
parentWorkflow- the new parent workflow
-
getParentWorkflow
public IWorkflowEngine<WorkflowMeta> getParentWorkflow()
Gets the parent workflow.- Specified by:
getParentWorkflowin interfaceIAction- Returns:
- the parent workflow
-
isBasic
public boolean isBasic()
Checks if the logging level is basic.- Returns:
- true if the logging level is basic, false otherwise
-
isDetailed
public boolean isDetailed()
Checks if the logging level is detailed.- Returns:
- true if the logging level is detailed, false otherwise
-
isDebug
public boolean isDebug()
Checks if the logging level is debug.- Returns:
- true if the logging level is debug, false otherwise
-
isRowlevel
public boolean isRowlevel()
Checks if the logging level is rowlevel.- Returns:
- true if the logging level is rowlevel, false otherwise
-
logMinimal
public void logMinimal(String message)
Logs the specified string at the minimal level.- Parameters:
message- the message
-
logMinimal
public void logMinimal(String message, Object... arguments)
Logs the specified string and arguments at the minimal level.- Parameters:
message- the messagearguments- the arguments
-
logBasic
public void logBasic(String message)
Logs the specified string at the basic level.- Parameters:
message- the message
-
logBasic
public void logBasic(String message, Object... arguments)
Logs the specified string and arguments at the basic level.- Parameters:
message- the messagearguments- the arguments
-
logDetailed
public void logDetailed(String message)
Logs the specified string at the detailed level.- Parameters:
message- the message
-
logDetailed
public void logDetailed(String message, Object... arguments)
Logs the specified string and arguments at the detailed level.- Parameters:
message- the messagearguments- the arguments
-
logDebug
public void logDebug(String message)
Logs the specified string at the debug level.- Parameters:
message- the message
-
logDebug
public void logDebug(String message, Object... arguments)
Logs the specified string and arguments at the debug level.- Parameters:
message- the messagearguments- the arguments
-
logRowlevel
public void logRowlevel(String message)
Logs the specified string at the row level.- Parameters:
message- the message
-
logRowlevel
public void logRowlevel(String message, Object... arguments)
Logs the specified string and arguments at the row level.- Parameters:
message- the messagearguments- the arguments
-
logError
public void logError(String message)
Logs the specified string at the error level.- Parameters:
message- the message
-
logError
public void logError(String message, Throwable e)
Logs the specified string and Throwable object at the error level.- Parameters:
message- the messagee- the e
-
logError
public void logError(String message, Object... arguments)
Logs the specified string and arguments at the error level.- Parameters:
message- the messagearguments- the arguments
-
getLogChannel
public ILogChannel getLogChannel()
Gets the log channel.- Specified by:
getLogChannelin interfaceIAction- Specified by:
getLogChannelin interfaceIHasLogChannel- Returns:
- the log channel
-
getLogChannelId
public String getLogChannelId()
Gets the logging channel id- Specified by:
getLogChannelIdin interfaceILoggingObject- Returns:
- the log channel id
- See Also:
ILoggingObject.getLogChannelId()
-
getObjectName
public String getObjectName()
Gets the object name- Specified by:
getObjectNamein interfaceILoggingObject- Returns:
- the object name
- See Also:
ILoggingObject.getObjectName()
-
getObjectCopy
public String getObjectCopy()
Gets a string identifying a copy in a series of transforms- Specified by:
getObjectCopyin interfaceILoggingObject- Returns:
- a string identifying a copy in a series of transforms
- See Also:
ILoggingObject.getObjectCopy()
-
getObjectType
public LoggingObjectType getObjectType()
Gets the logging object type- Specified by:
getObjectTypein interfaceILoggingObject- Returns:
- the logging object type
- See Also:
ILoggingObject.getObjectType()
-
getParent
public ILoggingObject getParent()
Gets the logging object interface's parent- Specified by:
getParentin interfaceILoggingObject- Returns:
- the logging object interface's parent
- See Also:
ILoggingObject.getParent()
-
getLogLevel
public LogLevel getLogLevel()
Gets the logging level for the action- Specified by:
getLogLevelin interfaceILoggingObject- See Also:
ILoggingObject.getLogLevel()
-
setLogLevel
public void setLogLevel(LogLevel logLevel)
Sets the logging level for the action- Parameters:
logLevel- the new log level
-
getContainerId
public String getContainerId()
Gets the container object id- Specified by:
getContainerIdin interfaceILoggingObject- Returns:
- the container object id
-
setContainerObjectId
public void setContainerObjectId(String containerObjectId)
Sets the container object id- Parameters:
containerObjectId- the container object id to set
-
getRegistrationDate
public Date getRegistrationDate()
Returns the registration date for the action. For ActionBase, this method always returns null- Specified by:
getRegistrationDatein interfaceILoggingObject- Returns:
- null
-
getReferencedObjectDescriptions
public String[] getReferencedObjectDescriptions()
- Specified by:
getReferencedObjectDescriptionsin interfaceIAction- Returns:
- The objects referenced in the transform, like a a pipeline, a workflow, a mapper, a reducer, a combiner, ...
-
isReferencedObjectEnabled
public boolean[] isReferencedObjectEnabled()
- Specified by:
isReferencedObjectEnabledin interfaceIAction- Returns:
- true for each referenced object that is enabled or has a valid reference definition.
-
loadReferencedObject
public IHasFilename loadReferencedObject(int index, IHopMetadataProvider metadataProvider, IVariables variables) throws HopException
Load the referenced object- Specified by:
loadReferencedObjectin interfaceIAction- Parameters:
index- the referenced object index to load (in case there are multiple references)metadataProvider- the metadataProvider to load fromvariables- the variable variables to use- Returns:
- the referenced object once loaded
- Throws:
HopException
-
isGatheringMetrics
public boolean isGatheringMetrics()
- Specified by:
isGatheringMetricsin interfaceILoggingObject
-
setGatheringMetrics
public void setGatheringMetrics(boolean gatheringMetrics)
- Specified by:
setGatheringMetricsin interfaceILoggingObject
-
isForcingSeparateLogging
public boolean isForcingSeparateLogging()
- Specified by:
isForcingSeparateLoggingin interfaceILoggingObject
-
setForcingSeparateLogging
public void setForcingSeparateLogging(boolean forcingSeparateLogging)
- Specified by:
setForcingSeparateLoggingin interfaceILoggingObject
-
getMetadataProvider
public IHopMetadataProvider getMetadataProvider()
-
setMetadataProvider
public void setMetadataProvider(IHopMetadataProvider metadataProvider)
Description copied from interface:IActionSets the MetaStore- Specified by:
setMetadataProviderin interfaceIAction- Parameters:
metadataProvider- The new MetaStore to use
-
setAttributesMap
public void setAttributesMap(Map<String,Map<String,String>> attributesMap)
- Specified by:
setAttributesMapin interfaceIAttributes
-
getAttributesMap
public Map<String,Map<String,String>> getAttributesMap()
- Specified by:
getAttributesMapin interfaceIAttributes
-
setAttribute
public void setAttribute(String groupName, String key, String value)
- Specified by:
setAttributein interfaceIAttributes
-
setAttributes
public void setAttributes(String groupName, Map<String,String> attributes)
- Specified by:
setAttributesin interfaceIAttributes
-
getAttributes
public Map<String,String> getAttributes(String groupName)
- Specified by:
getAttributesin interfaceIAttributes
-
getAttribute
public String getAttribute(String groupName, String key)
- Specified by:
getAttributein interfaceIAttributes
-
getExtensionDataMap
public Map<String,Object> getExtensionDataMap()
- Specified by:
getExtensionDataMapin interfaceIExtensionData
-
getParentWorkflowMeta
public WorkflowMeta getParentWorkflowMeta()
Description copied from interface:IActionReturn Gets the parent workflowMeta. This default method will throw an exception if a action attempts to call the getter when not implemented.- Specified by:
getParentWorkflowMetain interfaceIAction- Returns:
- The parent workflowMeta at save and during execution.
-
setParentWorkflowMeta
public void setParentWorkflowMeta(WorkflowMeta parentWorkflowMeta)
At save and run time, the system will attempt to set the workflowMeta so that it can be accessed by the actions if necessary.- Specified by:
setParentWorkflowMetain interfaceIAction- Parameters:
parentWorkflowMeta- the WorkflowMeta to which this IAction belongs
-
getEntryTransformSetVariablesMap
protected Map<String,String> getEntryTransformSetVariablesMap()
Gets a Map of variables set in EntryTransformSetVariables- Returns:
- a map of variable names and values
-
setEntryTransformSetVariable
public void setEntryTransformSetVariable(String variableName, String variableValue)
Sets the value of the specified EntryTransformSetVariable
-
-