|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.pentaho.di.job.entry.JobEntryBase
public class JobEntryBase
Base class for the different types of job-entries. Job entries can extend this base class to get access
to common member variables and default method behavior. However, JobEntryBase does not implement JobEntryInterface
(although it implements most of the same methods), so individual job entry classes must implement JobEntryInterface
and specifically the execute()
method.
Constructor Summary | |
---|---|
JobEntryBase()
Instantiates a new job entry base object. |
|
JobEntryBase(String name,
String description)
Instantiates a new job entry base object with the given name and description. |
Method Summary | |
---|---|
void |
check(List<CheckResultInterface> remarks,
JobMeta jobMeta)
Support for overrides not having to put in a check method. |
void |
clear()
Clears all variable values |
Object |
clone()
This method is called when a job entry is duplicated in Spoon. |
void |
copyVariablesFrom(VariableSpace space)
Copies variables from a given variable space to this job entry |
String |
environmentSubstitute(String aString)
Substitutes any variable values into the given string, and returns the resolved string |
String[] |
environmentSubstitute(String[] aString)
Substitutes any variable values into each of the given strings, and returns an array containing the resolved string(s) |
boolean |
equals(Object obj)
Checks if the JobEntry object is equal to the specified object |
boolean |
evaluates()
This method must return true if the job entry supports the true/false outgoing hops. |
String |
exportResources(VariableSpace space,
Map<String,ResourceDefinition> definitions,
ResourceNamingInterface namingInterface,
Repository repository)
Exports the object to a flat-file system, adding content with filename keys to a set of definitions. |
boolean |
getBooleanValueOfVariable(String variableName,
boolean defaultValue)
Returns a boolean representation of the specified variable after performing any necessary substitution. |
String |
getContainerObjectId()
Gets the container object id |
String |
getDescription()
Gets the description of the job entry |
String |
getDialogClassName()
This returns the expected name for the dialog that edits a job entry. |
String |
getFilename()
Gets the filename of the job entry. |
String |
getHolderType()
Returns the holder type for the job entry |
LogChannelInterface |
getLogChannel()
Gets the log channel. |
String |
getLogChannelId()
Gets the logging channel id |
LogLevel |
getLogLevel()
Gets the logging level for the job entry |
String |
getName()
Gets the name of the job entry |
String |
getObjectCopy()
Gets a string identifying a copy in a series of steps |
ObjectId |
getObjectId()
Gets the object id |
String |
getObjectName()
Gets the object name |
ObjectRevision |
getObjectRevision()
Gets the revision of the object with respect to a repository |
LoggingObjectType |
getObjectType()
Gets the logging object type |
LoggingObjectInterface |
getParent()
Gets the logging object interface's parent |
Job |
getParentJob()
Gets the parent job. |
VariableSpace |
getParentVariableSpace()
Gets the parent variable space |
String |
getPluginId()
Gets the plugin id. |
String |
getRealFilename()
Gets the real filename of the job entry, by substituting any environment variables present in the filename. |
Date |
getRegistrationDate()
Returns the registration date for the job entry. |
Repository |
getRepository()
Gets the repository for the job entry. |
RepositoryDirectory |
getRepositoryDirectory()
Gets the directory of the job entry in the repository. |
List<ResourceReference> |
getResourceDependencies(JobMeta jobMeta)
Gets a list of all the resource dependencies that the step is depending on. |
List<SQLStatement> |
getSQLStatements(Repository repository)
Gets the SQL statements needed by this job entry to execute successfully. |
List<SQLStatement> |
getSQLStatements(Repository repository,
VariableSpace space)
Gets the SQL statements needed by this job entry to execute successfully, given a set of variables. |
String |
getTypeDesc()
Gets the plug-in type description |
String |
getTypeId()
Deprecated. in favor of getPluginId() |
DatabaseMeta[] |
getUsedDatabaseConnections()
Gets all the database connections that are used by the job entry. |
String |
getVariable(String variableName)
Gets the value of the specified variable, or returns a default value if no such variable exists |
String |
getVariable(String variableName,
String defaultValue)
Gets the value of the specified variable, or returns a default value if no such variable exists |
String |
getXML()
This method is called by PDI whenever a job entry needs to serialize its settings to XML. |
boolean |
hasChanged()
Checks whether the job entry has changed |
boolean |
hasRepositoryReferences()
Checks whether the job entry has repository references. |
void |
initializeVariablesFrom(VariableSpace parent)
Sets the values of the job entry's variables to the values from the parent variables |
void |
injectVariables(Map<String,String> prop)
Injects variables using the given Map. |
boolean |
isBasic()
Checks if the logging level is basic. |
boolean |
isDebug()
Checks if the logging level is debug. |
boolean |
isDetailed()
Checks if the logging level is detailed. |
boolean |
isDummy()
Checks if the job entry is a dummy entry |
boolean |
isEvaluation()
Checks if the job entry is an evaluation. |
boolean |
isFTP()
Checks if this job entry performs an FTP operation |
boolean |
isHTTP()
Checks if this job entry performs an HTTP operation |
boolean |
isJob()
Checks if the job entry executes a job |
boolean |
isMail()
Checks if the job entry sends email |
boolean |
isRowlevel()
Checks if the logging level is rowlevel. |
boolean |
isSFTP()
Checks if this job entry performs an SFTP operation |
boolean |
isShell()
Checks if the job entry executes a shell program |
boolean |
isSpecial()
Checks if the job entry is of a special type (Start, Dummy, etc.) |
boolean |
isStart()
Checks if the job entry has started |
boolean |
isTransformation()
Checks if this job entry executes a transformation |
boolean |
isUnconditional()
This method must return true if the job entry supports the unconditional outgoing hop. |
String[] |
listVariables()
Gets a list of variable names for the job entry |
void |
loadRep(Repository rep,
ObjectId id_jobentry,
List<DatabaseMeta> databases,
List<SlaveServer> slaveServers)
This method is called by PDI whenever a job entry needs to read its configuration from a PDI repository. |
void |
loadXML(Node entrynode,
List<DatabaseMeta> databases,
List<SlaveServer> slaveServers)
This method is called by PDI whenever a job entry needs to read its settings from XML. |
void |
logBasic(String message)
Logs the specified string at the basic level. |
void |
logBasic(String message,
Object... arguments)
Logs the specified string and arguments at the basic level. |
void |
logDebug(String message)
Logs the specified string at the debug level. |
void |
logDebug(String message,
Object... arguments)
Logs the specified string and arguments at the debug level. |
void |
logDetailed(String message)
Logs the specified string at the detailed level. |
void |
logDetailed(String message,
Object... arguments)
Logs the specified string and arguments at the detailed level. |
void |
logError(String message)
Logs the specified string at the error level. |
void |
logError(String message,
Object... arguments)
Logs the specified string and arguments at the error level. |
void |
logError(String message,
Throwable e)
Logs the specified string and Throwable object at the error level. |
void |
logMinimal(String message)
Logs the specified string at the minimal level. |
void |
logMinimal(String message,
Object... arguments)
Logs the specified string and arguments at the minimal level. |
void |
logRowlevel(String message)
Logs the specified string at the row level. |
void |
logRowlevel(String message,
Object... arguments)
Logs the specified string and arguments at the row level. |
void |
lookupRepositoryReferences(Repository repository)
Looks up the references after import |
void |
parseRepositoryObjects(Repository rep)
Parses the repository objects. |
boolean |
resetErrorsBeforeExecution()
Checks whether a reset of the number of errors is required before execution. |
void |
saveRep(Repository rep,
ObjectId id_job)
This method is called by PDI whenever a job entry needs to save its settings to a PDI repository. |
void |
setChanged()
Sets that the job entry has changed (i.e. |
void |
setChanged(boolean ch)
Sets whether the job entry has changed |
void |
setContainerObjectId(String containerObjectId)
Sets the container object id |
void |
setDescription(String Description)
Sets the description for the job entry. |
void |
setID(long id)
Sets the id for the job entry |
void |
setLogLevel(LogLevel logLevel)
Sets the logging level for the job entry |
void |
setName(String name)
Sets the name of the job entry |
void |
setObjectId(ObjectId id)
Sets the object id. |
void |
setParentJob(Job parentJob)
Sets the parent job. |
void |
setParentVariableSpace(VariableSpace parent)
Sets the parent variable space |
void |
setPluginId(String configId)
Sets the plugin id. |
void |
setRepository(Repository repository)
Sets the repository for the job entry. |
void |
setTypeId(String typeId)
Deprecated. in favor of setPluginId() |
void |
setVariable(String variableName,
String variableValue)
Sets the value of the specified variable to the specified value |
void |
shareVariablesWith(VariableSpace space)
Shares a variable space from another variable space. |
String |
toString()
Returns a string representation of the object. |
Methods inherited from class java.lang.Object |
---|
getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public JobEntryBase()
public JobEntryBase(String name, String description)
name
- the name of the job entrydescription
- the description of the job entryMethod Detail |
---|
public boolean equals(Object obj)
equals
in class Object
Object.equals(java.lang.Object)
public void clear()
public void setObjectId(ObjectId id)
id
- the new object idpublic void setID(long id)
id
- the new idpublic ObjectId getObjectId()
getObjectId
in interface CheckResultSourceInterface
getObjectId
in interface LoggingObjectInterface
getObjectId
in interface ResourceHolderInterface
CheckResultSourceInterface.getObjectId()
public String getTypeDesc()
public void setName(String name)
name
- the new namepublic String getName()
getName
in interface CheckResultSourceInterface
getName
in interface ResourceHolderInterface
CheckResultSourceInterface.getName()
public void setDescription(String Description)
Description
- the new descriptionpublic String getDescription()
getDescription
in interface CheckResultSourceInterface
getDescription
in interface ResourceHolderInterface
CheckResultSourceInterface.getDescription()
public void setChanged()
setChanged(boolean)
public void setChanged(boolean ch)
ch
- true if the job entry has changed, false otherwisepublic boolean hasChanged()
public boolean isStart()
public boolean isDummy()
public boolean isEvaluation()
public boolean isJob()
public boolean isMail()
public boolean isShell()
public boolean isSpecial()
public boolean isTransformation()
public boolean isFTP()
public boolean isSFTP()
public boolean isHTTP()
public String getXML()
public void loadXML(Node entrynode, List<DatabaseMeta> databases, List<SlaveServer> slaveServers) throws KettleXMLException
entrynode
- the top-level XML nodedatabases
- the list of databasesslaveServers
- the list of slave servers
KettleXMLException
- if any errors occur during the loading of the XMLpublic void parseRepositoryObjects(Repository rep) throws KettleException
rep
- the repository
KettleException
- if any errors occur during parsingpublic void loadRep(Repository rep, ObjectId id_jobentry, List<DatabaseMeta> databases, List<SlaveServer> slaveServers) throws KettleException
rep
- the repository objectid_jobentry
- the id of the job entrydatabases
- the list of databasesslaveServers
- the list of slave servers
KettleException
- if any errors occur during the loadpublic void saveRep(Repository rep, ObjectId id_job) throws KettleException
rep
- the repository objectid_job
- the id_job
KettleException
- if any errors occur during the savepublic Object clone()
clone
in class Object
public String toString()
toString
in class Object
Object.toString()
public boolean resetErrorsBeforeExecution()
public boolean evaluates()
public boolean isUnconditional()
public List<SQLStatement> getSQLStatements(Repository repository) throws KettleException
repository
- the repository
KettleException
- if any errors occur during the generation of SQL statementspublic List<SQLStatement> getSQLStatements(Repository repository, VariableSpace space) throws KettleException
repository
- the repository objectspace
- a variable space object containing variable bindings
KettleException
- if any errors occur during the generation of SQL statementspublic String getFilename()
getFilename
in interface LoggingObjectInterface
LoggingObjectInterface.getFilename()
public String getRealFilename()
public DatabaseMeta[] getUsedDatabaseConnections()
public void copyVariablesFrom(VariableSpace space)
copyVariablesFrom
in interface VariableSpace
space
- the space to copy the variables from.VariableSpace.copyVariablesFrom(org.pentaho.di.core.variables.VariableSpace)
public String environmentSubstitute(String aString)
environmentSubstitute
in interface VariableSpace
aString
- The string to substitute.
VariableSpace.environmentSubstitute(java.lang.String)
public String[] environmentSubstitute(String[] aString)
environmentSubstitute
in interface VariableSpace
aString
- The array of strings that wants its variables to be replaced.
VariableSpace.environmentSubstitute(java.lang.String[])
public VariableSpace getParentVariableSpace()
getParentVariableSpace
in interface VariableSpace
VariableSpace.getParentVariableSpace()
public void setParentVariableSpace(VariableSpace parent)
setParentVariableSpace
in interface VariableSpace
parent
- The parent variable space to setVariableSpace.setParentVariableSpace(org.pentaho.di.core.variables.VariableSpace)
public String getVariable(String variableName, String defaultValue)
getVariable
in interface VariableSpace
variableName
- The name of the variabledefaultValue
- The default value in case the variable could not be
found
VariableSpace.getVariable(java.lang.String, java.lang.String)
public String getVariable(String variableName)
getVariable
in interface VariableSpace
variableName
- The name of the variable
VariableSpace.getVariable(java.lang.String)
public boolean getBooleanValueOfVariable(String variableName, boolean defaultValue)
getBooleanValueOfVariable
in interface VariableSpace
variableName
- the name of the variable to interrogatedefaultValue
- The default value to return.
VariableSpace.getBooleanValueOfVariable(java.lang.String, boolean)
public void initializeVariablesFrom(VariableSpace parent)
initializeVariablesFrom
in interface VariableSpace
parent
- the parent to start from, or null if root.VariableSpace.initializeVariablesFrom(org.pentaho.di.core.variables.VariableSpace)
public String[] listVariables()
listVariables
in interface VariableSpace
VariableSpace.listVariables()
public void setVariable(String variableName, String variableValue)
setVariable
in interface VariableSpace
variableName
- The name of the variable to setvariableValue
- The value of the variable to set. If the
variableValue is null, the variable is cleared
from the list.VariableSpace.setVariable(java.lang.String, java.lang.String)
public void shareVariablesWith(VariableSpace space)
shareVariablesWith
in interface VariableSpace
space
- Variable space to be shared.VariableSpace.shareVariablesWith(org.pentaho.di.core.variables.VariableSpace)
public void injectVariables(Map<String,String> prop)
injectVariables
in interface VariableSpace
prop
- Properties object containing key-value pairs.VariableSpace.injectVariables(java.util.Map)
public void check(List<CheckResultInterface> remarks, JobMeta jobMeta)
remarks
- CheckResults from checking the job entryjobMeta
- JobMeta information letting threading back to the JobMeta possiblepublic List<ResourceReference> getResourceDependencies(JobMeta jobMeta)
ResourceReference
public String exportResources(VariableSpace space, Map<String,ResourceDefinition> definitions, ResourceNamingInterface namingInterface, Repository repository) throws KettleException
space
- The variable space to resolve (environment) variables with.definitions
- The map containing the filenames and contentnamingInterface
- The resource naming interface allows the object to be named appropriatelyrepository
- The repository to load resources from
KettleException
- in case something goes wrong during the exportpublic String getPluginId()
public void setPluginId(String configId)
configId
- the new plugin idpublic String getTypeId()
getTypeId
in interface CheckResultSourceInterface
getTypeId
in interface ResourceHolderInterface
public void setTypeId(String typeId)
public String getDialogClassName()
public String getHolderType()
getHolderType
in interface ResourceHolderInterface
ResourceHolderInterface.getHolderType()
public void setRepository(Repository repository)
repository
- the repositorypublic Repository getRepository()
public void setParentJob(Job parentJob)
parentJob
- the new parent jobpublic Job getParentJob()
public boolean isBasic()
public boolean isDetailed()
public boolean isDebug()
public boolean isRowlevel()
public void logMinimal(String message)
message
- the messagepublic void logMinimal(String message, Object... arguments)
message
- the messagearguments
- the argumentspublic void logBasic(String message)
message
- the messagepublic void logBasic(String message, Object... arguments)
message
- the messagearguments
- the argumentspublic void logDetailed(String message)
message
- the messagepublic void logDetailed(String message, Object... arguments)
message
- the messagearguments
- the argumentspublic void logDebug(String message)
message
- the messagepublic void logDebug(String message, Object... arguments)
message
- the messagearguments
- the argumentspublic void logRowlevel(String message)
message
- the messagepublic void logRowlevel(String message, Object... arguments)
message
- the messagearguments
- the argumentspublic void logError(String message)
message
- the messagepublic void logError(String message, Throwable e)
message
- the messagee
- the epublic void logError(String message, Object... arguments)
message
- the messagearguments
- the argumentspublic LogChannelInterface getLogChannel()
public String getLogChannelId()
getLogChannelId
in interface LoggingObjectInterface
LoggingObjectInterface.getLogChannelId()
public String getObjectName()
getObjectName
in interface LoggingObjectInterface
LoggingObjectInterface.getObjectName()
public String getObjectCopy()
getObjectCopy
in interface LoggingObjectInterface
LoggingObjectInterface.getObjectCopy()
public ObjectRevision getObjectRevision()
getObjectRevision
in interface LoggingObjectInterface
LoggingObjectInterface.getObjectRevision()
public LoggingObjectType getObjectType()
getObjectType
in interface LoggingObjectInterface
LoggingObjectInterface.getObjectType()
public LoggingObjectInterface getParent()
getParent
in interface LoggingObjectInterface
LoggingObjectInterface.getParent()
public RepositoryDirectory getRepositoryDirectory()
getRepositoryDirectory
in interface LoggingObjectInterface
LoggingObjectInterface.getRepositoryDirectory()
public LogLevel getLogLevel()
getLogLevel
in interface LoggingObjectInterface
LoggingObjectInterface.getLogLevel()
public void setLogLevel(LogLevel logLevel)
logLevel
- the new log levelpublic String getContainerObjectId()
getContainerObjectId
in interface LoggingObjectInterface
public void setContainerObjectId(String containerObjectId)
containerObjectId
- the container object id to setpublic Date getRegistrationDate()
getRegistrationDate
in interface LoggingObjectInterface
public boolean hasRepositoryReferences()
public void lookupRepositoryReferences(Repository repository) throws KettleException
repository
- the repository to reference.
KettleException
- if any errors occur during the lookup
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |