|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.pentaho.di.repository.kdr.KettleDatabaseRepositoryBase org.pentaho.di.repository.kdr.KettleDatabaseRepository
public class KettleDatabaseRepository
This class handles interactions with a Kettle repository.
Constructor Summary | |
---|---|
KettleDatabaseRepository()
|
Method Summary | |
---|---|
static String |
byteArrayToString(byte[] val)
GZips and then base64 encodes an array of bytes to a String |
void |
clearSharedObjectCache()
Clear the shared object cache, if applicable. |
void |
commit()
|
void |
connect(String username,
String password)
Connect to the repository. |
void |
connect(String username,
String password,
boolean upgrade)
Connect to the repository. |
int |
countNrJobEntryAttributes(ObjectId id_jobentry,
String code)
|
int |
countNrStepAttributes(ObjectId id_step,
String code)
|
RepositoryDirectoryInterface |
createRepositoryDirectory(RepositoryDirectoryInterface parentDirectory,
String directoryPath)
Create a new directory, possibly by creating several sub-directies of / at the same time. |
RepositoryMeta |
createRepositoryMeta()
|
void |
createRepositorySchema(ProgressMonitorListener monitor,
boolean upgrade,
List<String> statements,
boolean dryRun)
Create or upgrade repository tables & fields, populate lookup tables, ... |
void |
delClusterSlaves(ObjectId id_cluster)
|
void |
delDependencies(ObjectId id_transformation)
|
void |
deleteClusterSchema(ObjectId id_cluster)
|
void |
deleteCondition(ObjectId id_condition)
|
void |
deleteDatabaseMeta(String databaseName)
Remove a database connection from the repository |
void |
deleteJob(ObjectId id_job)
|
void |
deletePartitionSchema(ObjectId id_partition_schema)
|
void |
deleteRepositoryDirectory(RepositoryDirectoryInterface dir)
|
void |
deleteSlave(ObjectId id_slave)
|
void |
deleteTransformation(ObjectId id_transformation)
Delete everything related to a transformation from the repository. |
void |
delJob(ObjectId id_job)
|
void |
delJobAttributes(ObjectId id_job)
|
void |
delJobEntries(ObjectId id_job)
|
void |
delJobEntryAttributes(ObjectId id_job)
|
void |
delJobEntryCopies(ObjectId id_job)
|
void |
delJobEntryDatabases(ObjectId id_job)
Delete the relationships between the job/job entries and the databases. |
void |
delJobHops(ObjectId id_job)
|
void |
delJobNotes(ObjectId id_job)
|
void |
delPartitions(ObjectId id_partition_schema)
|
void |
delPartitionSchemas(ObjectId id_transformation)
|
void |
delStepAttributes(ObjectId id_transformation)
|
void |
delStepConditions(ObjectId id_transformation)
|
void |
delStepDatabases(ObjectId id_transformation)
Delete the relationships between the transformation/steps and the databases. |
void |
delSteps(ObjectId id_transformation)
|
void |
delTrans(ObjectId id_transformation)
|
void |
delTransAttributes(ObjectId id_transformation)
|
void |
delTransformationClusters(ObjectId id_transformation)
|
void |
delTransformationSlaves(ObjectId id_transformation)
|
void |
delTransHops(ObjectId id_transformation)
|
void |
delTransNotes(ObjectId id_transformation)
|
void |
delTransStepCondition(ObjectId id_transformation)
|
void |
delValue(ObjectId id_value)
|
void |
disconnect()
Disconnect from the repository. |
boolean |
dropRepositorySchema()
|
void |
execStatement(String sql)
|
boolean |
exists(String name,
RepositoryDirectoryInterface repositoryDirectory,
RepositoryObjectType objectType)
See if a repository object exists in the repository |
RepositoryDirectoryInterface |
findDirectory(ObjectId directory)
|
RepositoryDirectoryInterface |
findDirectory(String directory)
|
ObjectId |
findStepAttributeID(ObjectId id_step,
int nr,
String code)
This method is only used to check backward compatibility with the 2.x series. |
ObjectId |
getClusterID(String name)
|
ObjectId[] |
getClusterIDs(boolean includeDeleted)
|
String[] |
getClusterNames(boolean includeDeleted)
|
ObjectId[] |
getClusterSlaveIDs(ObjectId id_cluster_schema)
|
String[] |
getClustersUsingSlave(ObjectId id_slave)
|
String |
getConnectMessage()
This is an informational message that a repository can display on connecting within Spoon. |
Database |
getDatabase()
|
ObjectId[] |
getDatabaseAttributeIDs(ObjectId id_database)
|
ObjectId |
getDatabaseID(String name)
|
ObjectId[] |
getDatabaseIDs(boolean includeDeleted)
|
DatabaseMeta |
getDatabaseMeta()
|
String[] |
getDatabaseNames(boolean includeDeleted)
|
List<DatabaseMeta> |
getDatabases()
|
RepositoryDirectory |
getDefaultSaveDirectory(RepositoryElementInterface repositoryElement)
|
String[] |
getDirectoryNames(ObjectId id_directory)
Returns the child directory names of a parent directory |
IRepositoryExporter |
getExporter()
|
RepositoryDirectory |
getImportBaseDirectory()
The directory set during import to signal that job entries like Trans and Job need to point to job entries relative to this directory |
IRepositoryImporter |
getImporter()
|
List<RepositoryElementMetaInterface> |
getJobAndTransformationObjects(ObjectId id_directory,
boolean includeDeleted)
Gets all job and transformation objects in the given directory. |
boolean |
getJobEntryAttributeBoolean(ObjectId id_jobentry,
int nr,
String code)
|
boolean |
getJobEntryAttributeBoolean(ObjectId id_jobentry,
String code)
|
boolean |
getJobEntryAttributeBoolean(ObjectId id_jobentry,
String code,
boolean def)
|
long |
getJobEntryAttributeInteger(ObjectId id_jobentry,
int nr,
String code)
|
long |
getJobEntryAttributeInteger(ObjectId id_jobentry,
String code)
|
String |
getJobEntryAttributeString(ObjectId id_jobentry,
int nr,
String code)
|
String |
getJobEntryAttributeString(ObjectId id_jobentry,
String code)
|
ObjectId[] |
getJobEntryCopyIDs(ObjectId id_job)
|
ObjectId[] |
getJobEntryCopyIDs(ObjectId id_job,
ObjectId id_jobentry)
|
ObjectId[] |
getJobEntryIDs(ObjectId id_job)
|
ObjectId[] |
getJobHopIDs(ObjectId id_job)
|
ObjectId |
getJobId(String name,
RepositoryDirectoryInterface repositoryDirectory)
|
String[] |
getJobNames()
|
String[] |
getJobNames(ObjectId id_directory,
boolean includeDeleted)
|
ObjectId[] |
getJobNoteIDs(ObjectId id_job)
|
List<RepositoryElementMetaInterface> |
getJobObjects(ObjectId id_directory,
boolean includeDeleted)
|
String[] |
getJobsUsingDatabase(ObjectId id_database)
Get the repository version. |
int |
getMajorVersion()
Return the major repository version. |
int |
getMinorVersion()
Return the minor repository version. |
int |
getNrSubDirectories(ObjectId id_directory)
|
RepositoryObject |
getObjectInformation(ObjectId objectId,
RepositoryObjectType objectType)
Get more information about a certain object ID in the form of the RepositoryObject |
ObjectId[] |
getPartitionIDs(ObjectId id_partition_schema)
|
ObjectId |
getPartitionSchemaID(String name)
|
ObjectId[] |
getPartitionSchemaIDs(boolean includeDeleted)
|
String[] |
getPartitionSchemaNames(boolean includeDeleted)
|
ObjectId |
getRootDirectoryID()
|
KettleDatabaseRepositorySecurityProvider |
getSecurityManager()
|
KettleDatabaseRepositorySecurityProvider |
getSecurityProvider()
|
IRepositoryService |
getService(Class<? extends IRepositoryService> clazz)
Retrieves a given repository service |
List<Class<? extends IRepositoryService>> |
getServiceInterfaces()
Retrieves the current list of of IRepository Services. |
ObjectId |
getSlaveID(String name)
|
ObjectId[] |
getSlaveIDs(boolean includeDeleted)
|
String[] |
getSlaveNames(boolean includeDeleted)
|
List<SlaveServer> |
getSlaveServers()
|
boolean |
getStepAttributeBoolean(ObjectId id_step,
int nr,
String code)
|
boolean |
getStepAttributeBoolean(ObjectId id_step,
int nr,
String code,
boolean def)
|
boolean |
getStepAttributeBoolean(ObjectId id_step,
String code)
|
long |
getStepAttributeInteger(ObjectId id_step,
int nr,
String code)
|
long |
getStepAttributeInteger(ObjectId id_step,
String code)
|
String |
getStepAttributeString(ObjectId id_step,
int nr,
String code)
|
String |
getStepAttributeString(ObjectId id_step,
String code)
|
ObjectId[] |
getStepIDs(ObjectId id_transformation)
|
ObjectId[] |
getSubConditionIDs(ObjectId id_condition)
|
ObjectId[] |
getSubDirectoryIDs(ObjectId id_directory)
|
ObjectId[] |
getTransDependencyIDs(ObjectId id_transformation)
|
ObjectId[] |
getTransformationClusterSchemaIDs(ObjectId id_transformation)
|
ObjectId[] |
getTransformationConditionIDs(ObjectId id_transformation)
|
ObjectId[] |
getTransformationDatabaseIDs(ObjectId id_transformation)
|
ObjectId |
getTransformationID(String name,
RepositoryDirectoryInterface repositoryDirectory)
|
String[] |
getTransformationNames(ObjectId id_directory,
boolean includeDeleted)
|
List<RepositoryElementMetaInterface> |
getTransformationObjects(ObjectId id_directory,
boolean includeDeleted)
|
ObjectId[] |
getTransformationPartitionSchemaIDs(ObjectId id_transformation)
|
String[] |
getTransformationsUsingCluster(ObjectId id_cluster)
|
String[] |
getTransformationsUsingDatabase(ObjectId id_database)
|
String[] |
getTransformationsUsingPartitionSchema(ObjectId id_partition_schema)
|
String[] |
getTransformationsUsingSlave(ObjectId id_slave)
|
ObjectId[] |
getTransNoteIDs(ObjectId id_transformation)
|
RepositoryDirectory |
getUserHomeDirectory()
|
IUser |
getUserInfo()
|
String |
getVersion()
Get the repository version. |
boolean |
hasService(Class<? extends IRepositoryService> clazz)
Checks whether a given repository service is available or not |
void |
init(RepositoryMeta repositoryMeta)
Initialize the repository with the repository metadata and user information. |
ObjectId |
insertClusterSlave(ClusterSchema clusterSchema,
SlaveServer slaveServer)
|
ObjectId |
insertJobEntry(ObjectId id_job,
JobEntryBase jobEntryBase)
|
void |
insertJobEntryDatabase(ObjectId id_job,
ObjectId id_jobentry,
ObjectId id_database)
|
void |
insertJobNote(ObjectId id_job,
ObjectId id_note)
|
ObjectId |
insertLogEntry(String description)
Insert an entry in the audit trail of the repository. |
void |
insertStepDatabase(ObjectId id_transformation,
ObjectId id_step,
ObjectId id_database)
|
ObjectId |
insertTransformationCluster(ObjectId id_transformation,
ObjectId id_cluster)
|
ObjectId |
insertTransformationPartitionSchema(ObjectId id_transformation,
ObjectId id_partition_schema)
|
ObjectId |
insertTransformationSlave(ObjectId id_transformation,
ObjectId id_slave)
|
void |
insertTransNote(ObjectId id_transformation,
ObjectId id_note)
|
void |
insertTransStepCondition(ObjectId id_transformation,
ObjectId id_step,
ObjectId id_condition)
|
boolean |
isUseBatchProcessing()
|
ClusterSchema |
loadClusterSchema(ObjectId idClusterSchema,
List<SlaveServer> slaveServers,
String versionLabel)
|
Condition |
loadCondition(ObjectId id_condition)
Read a condition from the repository. |
Condition |
loadConditionFromStepAttribute(ObjectId id_step,
String code)
Load a condition from the repository with the Object ID stored in a step attribute. |
DatabaseMeta |
loadDatabaseMeta(ObjectId id_database,
String versionName)
Load the Database connection Metadata from the repository |
DatabaseMeta |
loadDatabaseMetaFromJobEntryAttribute(ObjectId id_jobentry,
String nameCode,
int nr,
String idCode,
List<DatabaseMeta> databases)
This method is introduced to avoid having to go over an integer/string/whatever in the interface and the job entry code. |
DatabaseMeta |
loadDatabaseMetaFromJobEntryAttribute(ObjectId id_jobentry,
String nameCode,
String idCode,
List<DatabaseMeta> databases)
This method is introduced to avoid having to go over an integer/string/whatever in the interface and the job entry code. |
DatabaseMeta |
loadDatabaseMetaFromStepAttribute(ObjectId idStep,
String code,
List<DatabaseMeta> databases)
This method is introduced to avoid having to go over an integer/string/whatever in the interface and the step code. |
JobMeta |
loadJob(ObjectId idJob,
String versionLabel)
Load a job from the repository by id |
JobMeta |
loadJob(String jobname,
RepositoryDirectoryInterface repdir,
ProgressMonitorListener monitor,
String versionName)
Load a job in a directory |
void |
loadJobEntry(JobEntryBase jobEntryBase,
ObjectId id_jobentry,
List<DatabaseMeta> databases,
List<SlaveServer> slaveServers)
|
NotePadMeta |
loadNotePadMeta(ObjectId id_note)
|
PartitionSchema |
loadPartitionSchema(ObjectId id_partition_schema,
String versionName)
|
RepositoryDirectoryInterface |
loadRepositoryDirectoryTree()
|
RepositoryDirectoryInterface |
loadRepositoryDirectoryTree(RepositoryDirectoryInterface root)
|
SlaveServer |
loadSlaveServer(ObjectId id_slave_server,
String versionName)
|
TransMeta |
loadTransformation(ObjectId idTransformation,
String versionLabel)
Load a transformation by id |
TransMeta |
loadTransformation(String transname,
RepositoryDirectoryInterface repdir,
ProgressMonitorListener monitor,
boolean setInternalVariables,
String versionName)
Load a transformation with a name from a folder in the repository |
ValueMetaAndData |
loadValueMetaAndData(ObjectId id_value)
|
void |
lockRepository()
|
List<DatabaseMeta> |
readDatabases()
Read all the databases defined in the repository |
SharedObjects |
readJobMetaSharedObjects(JobMeta jobMeta)
|
SharedObjects |
readTransSharedObjects(TransMeta transMeta)
|
ObjectId |
renameJob(ObjectId id_job,
RepositoryDirectoryInterface dir,
String newname)
Move / rename a job |
ObjectId |
renameRepositoryDirectory(ObjectId id,
RepositoryDirectoryInterface newParentDir,
String newName)
Move / rename a repository directory |
ObjectId |
renameTransformation(ObjectId id_transformation,
RepositoryDirectoryInterface newDir,
String newName)
Move / rename a transformation |
void |
rollback()
|
void |
save(RepositoryElementInterface repositoryElement,
String versionComment)
|
void |
save(RepositoryElementInterface repositoryElement,
String versionComment,
ProgressMonitorListener monitor)
|
void |
save(RepositoryElementInterface repositoryElement,
String versionComment,
ProgressMonitorListener monitor,
boolean overwrite)
Save an object to the repository optionally overwriting any associated objects. |
void |
save(RepositoryElementInterface repositoryElement,
String versionComment,
ProgressMonitorListener monitor,
ObjectId parentId,
boolean used,
boolean overwrite)
|
ObjectId |
saveCondition(Condition condition)
|
ObjectId |
saveCondition(Condition condition,
ObjectId id_condition_parent)
|
void |
saveConditionStepAttribute(ObjectId id_transformation,
ObjectId id_step,
String code,
Condition condition)
This method saves the object ID of the condition object (if not null) in the step attributes |
void |
saveDatabaseMetaJobEntryAttribute(ObjectId id_job,
ObjectId id_jobentry,
int nr,
String nameCode,
String idCode,
DatabaseMeta database)
This method saves the object ID of the database object (if not null) in the step attributes |
void |
saveDatabaseMetaJobEntryAttribute(ObjectId id_job,
ObjectId id_jobentry,
String nameCode,
String idCode,
DatabaseMeta database)
This method saves the object ID of the database object (if not null) in the step attributes |
void |
saveDatabaseMetaStepAttribute(ObjectId id_transformation,
ObjectId id_step,
String code,
DatabaseMeta database)
This method saves the object ID of the database object (if not null) in the step attributes |
void |
saveJobEntryAttribute(ObjectId id_job,
ObjectId id_jobentry,
int nr,
String code,
boolean value)
|
void |
saveJobEntryAttribute(ObjectId id_job,
ObjectId id_jobentry,
int nr,
String code,
long value)
|
void |
saveJobEntryAttribute(ObjectId id_job,
ObjectId id_jobentry,
int nr,
String code,
String value)
|
void |
saveJobEntryAttribute(ObjectId id_job,
ObjectId id_jobentry,
String code,
boolean value)
|
void |
saveJobEntryAttribute(ObjectId id_job,
ObjectId id_jobentry,
String code,
long value)
|
void |
saveJobEntryAttribute(ObjectId id_job,
ObjectId id_jobentry,
String code,
String value)
|
void |
saveNotePadMeta(NotePadMeta note,
ObjectId id_transformation)
|
void |
saveRepositoryDirectory(RepositoryDirectoryInterface dir)
|
void |
saveStepAttribute(ObjectId id_transformation,
ObjectId id_step,
int nr,
String code,
boolean value)
|
void |
saveStepAttribute(ObjectId id_transformation,
ObjectId id_step,
int nr,
String code,
double value)
|
void |
saveStepAttribute(ObjectId id_transformation,
ObjectId id_step,
int nr,
String code,
long value)
|
void |
saveStepAttribute(ObjectId id_transformation,
ObjectId id_step,
int nr,
String code,
String value)
|
void |
saveStepAttribute(ObjectId id_transformation,
ObjectId id_step,
String code,
boolean value)
|
void |
saveStepAttribute(ObjectId id_transformation,
ObjectId id_step,
String code,
double value)
|
void |
saveStepAttribute(ObjectId id_transformation,
ObjectId id_step,
String code,
long value)
|
void |
saveStepAttribute(ObjectId id_transformation,
ObjectId id_step,
String code,
String value)
|
void |
setDatabase(Database database)
|
void |
setImportBaseDirectory(RepositoryDirectory importBaseDirectory)
Set this directory during import to signal that job entries like Trans and Job need to point to job entries relative to this directory. |
String |
toString()
|
void |
undeleteObject(RepositoryElementMetaInterface element)
Removes he deleted flag from a repository element in the repository. |
void |
unlockRepository()
|
void |
updateDatabaseTypes()
Update the list in R_DATABASE_TYPE using the plugin registry |
void |
updateJobEntryTypes()
Update the list in R_JOBENTRY_TYPE |
void |
updateStepTypes()
Update the list in R_STEP_TYPE using the StepLoader StepPlugin entries |
Methods inherited from class org.pentaho.di.repository.kdr.KettleDatabaseRepositoryBase |
---|
getLog, getName, getRepositoryMeta, isConnected, quote, quoteTable, setConnected, setRepositoryMeta |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface org.pentaho.di.repository.Repository |
---|
getLog, getName, getRepositoryMeta, isConnected |
Field Detail |
---|
public KettleDatabaseRepositoryTransDelegate transDelegate
public KettleDatabaseRepositoryJobDelegate jobDelegate
public KettleDatabaseRepositoryDatabaseDelegate databaseDelegate
public KettleDatabaseRepositorySlaveServerDelegate slaveServerDelegate
public KettleDatabaseRepositoryClusterSchemaDelegate clusterSchemaDelegate
public KettleDatabaseRepositoryPartitionSchemaDelegate partitionSchemaDelegate
public KettleDatabaseRepositoryDirectoryDelegate directoryDelegate
public KettleDatabaseRepositoryConnectionDelegate connectionDelegate
public KettleDatabaseRepositoryUserDelegate userDelegate
public KettleDatabaseRepositoryConditionDelegate conditionDelegate
public KettleDatabaseRepositoryValueDelegate valueDelegate
public KettleDatabaseRepositoryNotePadDelegate notePadDelegate
public KettleDatabaseRepositoryStepDelegate stepDelegate
public KettleDatabaseRepositoryJobEntryDelegate jobEntryDelegate
Constructor Detail |
---|
public KettleDatabaseRepository()
Method Detail |
---|
public void init(RepositoryMeta repositoryMeta)
init
in interface Repository
public RepositoryMeta createRepositoryMeta()
public void connect(String username, String password) throws KettleException
connect
in interface Repository
username
- the username of the user connecting to the repository.password
- the password of the user connecting to the repository.
KettleSecurityException
- in case the supplied user or password is not valid
KettleException
- in case there is a general unexpected error or if we're already connectedpublic void connect(String username, String password, boolean upgrade) throws KettleException
KettleSecurityException
- in case the supplied user or password is not valid
KettleException
- in case there is a general unexpected error or if we're already connectedpublic void commit() throws KettleException
KettleException
public void rollback()
public IUser getUserInfo()
getUserInfo
in interface Repository
public int getMajorVersion()
public int getMinorVersion()
public String getVersion()
getVersion
in interface Repository
public TransMeta loadTransformation(String transname, RepositoryDirectoryInterface repdir, ProgressMonitorListener monitor, boolean setInternalVariables, String versionName) throws KettleException
Repository
loadTransformation
in interface Repository
transname
- the name of the transformation to loadmonitor
- the progress monitor to use (UI feedback)setInternalVariables
- set to true if you want to automatically set the internal variables of the loaded transformation. (true is the default with very few exceptions!)versionName
- the revision to load. Specify null to load the last version.
KettleException
public SharedObjects readTransSharedObjects(TransMeta transMeta) throws KettleException
readTransSharedObjects
in interface Repository
KettleException
public ObjectId renameTransformation(ObjectId id_transformation, RepositoryDirectoryInterface newDir, String newName) throws KettleException
Repository
renameTransformation
in interface Repository
id_transformation
- The ObjectId of the transformation to movenewDir
- The RepositoryDirectoryInterface that will be the new parent of the transformation (May be null if a move is not desired)newName
- The new name of the transformation (May be null if a rename is not desired)
KettleException
public JobMeta loadJob(String jobname, RepositoryDirectoryInterface repdir, ProgressMonitorListener monitor, String versionName) throws KettleException
loadJob
in interface Repository
jobname
- The name of the jobrepdir
- The directory in which the job resides.the
- monitor to use as feedback in a UI (or null if not used)
KettleException
public SharedObjects readJobMetaSharedObjects(JobMeta jobMeta) throws KettleException
readJobMetaSharedObjects
in interface Repository
KettleException
public ObjectId renameJob(ObjectId id_job, RepositoryDirectoryInterface dir, String newname) throws KettleException
Repository
renameJob
in interface Repository
id_job
- The ObjectId of the job to movedir
- The RepositoryDirectoryInterface that will be the new parent of the job (May be null if a move is not desired)newname
- The new name of the job (May be null if a rename is not desired)
KettleException
public boolean exists(String name, RepositoryDirectoryInterface repositoryDirectory, RepositoryObjectType objectType) throws KettleException
Repository
exists
in interface Repository
name
- the name of the objectrepositoryDirectory
- the directory in which it should resideobjectType
- the type of repository object
KettleException
- in case something goes wrong.public void save(RepositoryElementInterface repositoryElement, String versionComment) throws KettleException
KettleException
public void save(RepositoryElementInterface repositoryElement, String versionComment, ProgressMonitorListener monitor) throws KettleException
save
in interface Repository
KettleException
public void save(RepositoryElementInterface repositoryElement, String versionComment, ProgressMonitorListener monitor, boolean overwrite) throws KettleException
Repository
save
in interface Repository
repositoryElement
- Object to saveversionComment
- Version comment for updatemonitor
- Progress Monitor to report feedback tooverwrite
- Overwrite any existing objects involved in saving repositoryElement
, e.g. repositoryElement, database connections, slave servers
KettleException
- Error saving the object to the repositorypublic void save(RepositoryElementInterface repositoryElement, String versionComment, ProgressMonitorListener monitor, ObjectId parentId, boolean used, boolean overwrite) throws KettleException
KettleException
public Condition loadCondition(ObjectId id_condition) throws KettleException
id_condition
- The condition id
KettleException
- if something goes wrong.public ObjectId saveCondition(Condition condition) throws KettleException
KettleException
public ObjectId saveCondition(Condition condition, ObjectId id_condition_parent) throws KettleException
KettleException
public DatabaseMeta loadDatabaseMeta(ObjectId id_database, String versionName) throws KettleException
loadDatabaseMeta
in interface Repository
id_database
- the id of the database connection to loadversionName
- the revision to load. Specify null to load the last version.
KettleException
- in case something goes wrong with database, connection, etc.public void deleteDatabaseMeta(String databaseName) throws KettleException
deleteDatabaseMeta
in interface Repository
databaseName
- The name of the connection to remove
KettleException
- In case something went wrong: database error, insufficient permissions, depending objects, etc.public ClusterSchema loadClusterSchema(ObjectId idClusterSchema, List<SlaveServer> slaveServers, String versionLabel) throws KettleException
loadClusterSchema
in interface Repository
KettleException
public SlaveServer loadSlaveServer(ObjectId id_slave_server, String versionName) throws KettleException
loadSlaveServer
in interface Repository
KettleException
public PartitionSchema loadPartitionSchema(ObjectId id_partition_schema, String versionName) throws KettleException
loadPartitionSchema
in interface Repository
KettleException
public ValueMetaAndData loadValueMetaAndData(ObjectId id_value) throws KettleException
KettleException
public NotePadMeta loadNotePadMeta(ObjectId id_note) throws KettleException
KettleException
public void saveNotePadMeta(NotePadMeta note, ObjectId id_transformation) throws KettleException
KettleException
public RepositoryDirectoryInterface loadRepositoryDirectoryTree() throws KettleException
loadRepositoryDirectoryTree
in interface Repository
KettleException
public RepositoryDirectoryInterface loadRepositoryDirectoryTree(RepositoryDirectoryInterface root) throws KettleException
KettleException
public RepositoryDirectoryInterface findDirectory(String directory) throws KettleException
findDirectory
in interface Repository
KettleException
public RepositoryDirectoryInterface findDirectory(ObjectId directory) throws KettleException
findDirectory
in interface Repository
KettleException
public void saveRepositoryDirectory(RepositoryDirectoryInterface dir) throws KettleException
saveRepositoryDirectory
in interface Repository
KettleException
public void deleteRepositoryDirectory(RepositoryDirectoryInterface dir) throws KettleException
deleteRepositoryDirectory
in interface Repository
KettleException
public ObjectId renameRepositoryDirectory(ObjectId id, RepositoryDirectoryInterface newParentDir, String newName) throws KettleException
Repository
renameRepositoryDirectory
in interface Repository
id
- The ObjectId of the repository directory to movenewParentDir
- The RepositoryDirectoryInterface that will be the new parent of the repository directory (May be null if a move is not desired)newName
- The new name of the repository directory (May be null if a rename is not desired)
KettleException
public RepositoryDirectoryInterface createRepositoryDirectory(RepositoryDirectoryInterface parentDirectory, String directoryPath) throws KettleException
createRepositoryDirectory
in interface Repository
parentDirectory
- the parent directorydirectoryPath
- The path to the new Repository Directory, to be created.
KettleException
- In case something goes wrongpublic ObjectId getRootDirectoryID() throws KettleException
KettleException
public int getNrSubDirectories(ObjectId id_directory) throws KettleException
KettleException
public ObjectId[] getSubDirectoryIDs(ObjectId id_directory) throws KettleException
KettleException
public ObjectId insertLogEntry(String description) throws KettleException
Repository
insertLogEntry
in interface Repository
KettleException
public void insertTransNote(ObjectId id_transformation, ObjectId id_note) throws KettleException
KettleException
public void insertJobNote(ObjectId id_job, ObjectId id_note) throws KettleException
KettleException
public void insertStepDatabase(ObjectId id_transformation, ObjectId id_step, ObjectId id_database) throws KettleException
insertStepDatabase
in interface Repository
KettleException
public void insertJobEntryDatabase(ObjectId id_job, ObjectId id_jobentry, ObjectId id_database) throws KettleException
insertJobEntryDatabase
in interface Repository
KettleException
public ObjectId insertTransformationPartitionSchema(ObjectId id_transformation, ObjectId id_partition_schema) throws KettleException
KettleException
public ObjectId insertClusterSlave(ClusterSchema clusterSchema, SlaveServer slaveServer) throws KettleException
KettleException
public ObjectId insertTransformationCluster(ObjectId id_transformation, ObjectId id_cluster) throws KettleException
KettleException
public ObjectId insertTransformationSlave(ObjectId id_transformation, ObjectId id_slave) throws KettleException
KettleException
public void insertTransStepCondition(ObjectId id_transformation, ObjectId id_step, ObjectId id_condition) throws KettleException
KettleException
public String[] getTransformationNames(ObjectId id_directory, boolean includeDeleted) throws KettleException
getTransformationNames
in interface Repository
KettleException
public List<RepositoryElementMetaInterface> getJobObjects(ObjectId id_directory, boolean includeDeleted) throws KettleException
getJobObjects
in interface Repository
KettleException
public List<RepositoryElementMetaInterface> getTransformationObjects(ObjectId id_directory, boolean includeDeleted) throws KettleException
getTransformationObjects
in interface Repository
KettleException
public String[] getJobNames(ObjectId id_directory, boolean includeDeleted) throws KettleException
getJobNames
in interface Repository
KettleException
public String[] getDirectoryNames(ObjectId id_directory) throws KettleException
Repository
getDirectoryNames
in interface Repository
id_directory
- parent directory id
KettleException
public String[] getJobNames() throws KettleException
KettleException
public ObjectId[] getSubConditionIDs(ObjectId id_condition) throws KettleException
KettleException
public ObjectId[] getTransNoteIDs(ObjectId id_transformation) throws KettleException
KettleException
public ObjectId[] getTransformationConditionIDs(ObjectId id_transformation) throws KettleException
KettleException
public ObjectId[] getTransformationDatabaseIDs(ObjectId id_transformation) throws KettleException
KettleException
public ObjectId[] getJobNoteIDs(ObjectId id_job) throws KettleException
KettleException
public ObjectId[] getDatabaseIDs(boolean includeDeleted) throws KettleException
getDatabaseIDs
in interface Repository
KettleException
public ObjectId[] getDatabaseAttributeIDs(ObjectId id_database) throws KettleException
KettleException
public ObjectId[] getPartitionSchemaIDs(boolean includeDeleted) throws KettleException
getPartitionSchemaIDs
in interface Repository
KettleException
public ObjectId[] getPartitionIDs(ObjectId id_partition_schema) throws KettleException
KettleException
public ObjectId[] getTransformationPartitionSchemaIDs(ObjectId id_transformation) throws KettleException
KettleException
public ObjectId[] getTransformationClusterSchemaIDs(ObjectId id_transformation) throws KettleException
KettleException
public ObjectId[] getClusterIDs(boolean includeDeleted) throws KettleException
getClusterIDs
in interface Repository
KettleException
public ObjectId[] getSlaveIDs(boolean includeDeleted) throws KettleException
getSlaveIDs
in interface Repository
KettleException
public ObjectId[] getClusterSlaveIDs(ObjectId id_cluster_schema) throws KettleException
KettleException
public String[] getDatabaseNames(boolean includeDeleted) throws KettleException
getDatabaseNames
in interface Repository
KettleException
public String[] getPartitionSchemaNames(boolean includeDeleted) throws KettleException
getPartitionSchemaNames
in interface Repository
KettleException
public String[] getSlaveNames(boolean includeDeleted) throws KettleException
getSlaveNames
in interface Repository
KettleException
public String[] getClusterNames(boolean includeDeleted) throws KettleException
getClusterNames
in interface Repository
KettleException
public ObjectId[] getStepIDs(ObjectId id_transformation) throws KettleException
KettleException
public String[] getTransformationsUsingDatabase(ObjectId id_database) throws KettleException
getTransformationsUsingDatabase
in interface Repository
KettleException
public String[] getJobsUsingDatabase(ObjectId id_database) throws KettleException
Repository
getJobsUsingDatabase
in interface Repository
KettleException
public String[] getClustersUsingSlave(ObjectId id_slave) throws KettleException
KettleException
public String[] getTransformationsUsingSlave(ObjectId id_slave) throws KettleException
KettleException
public String[] getTransformationsUsingPartitionSchema(ObjectId id_partition_schema) throws KettleException
KettleException
public String[] getTransformationsUsingCluster(ObjectId id_cluster) throws KettleException
KettleException
public ObjectId[] getJobHopIDs(ObjectId id_job) throws KettleException
KettleException
public ObjectId[] getTransDependencyIDs(ObjectId id_transformation) throws KettleException
KettleException
public ObjectId[] getJobEntryIDs(ObjectId id_job) throws KettleException
KettleException
public ObjectId[] getJobEntryCopyIDs(ObjectId id_job) throws KettleException
KettleException
public ObjectId[] getJobEntryCopyIDs(ObjectId id_job, ObjectId id_jobentry) throws KettleException
KettleException
public static final String byteArrayToString(byte[] val) throws IOException
val
- the array of bytes to convert to a string
IOException
- in the case there is a Base64 or GZip encoding problempublic void delSteps(ObjectId id_transformation) throws KettleException
KettleException
public void deleteCondition(ObjectId id_condition) throws KettleException
KettleException
public void delStepConditions(ObjectId id_transformation) throws KettleException
KettleException
public void delStepDatabases(ObjectId id_transformation) throws KettleException
id_transformation
- the transformation for which we want to delete the databases.
KettleException
- in case something unexpected happens.public void delJobEntryDatabases(ObjectId id_job) throws KettleException
id_job
- the job for which we want to delete the databases.
KettleDatabaseException
- in case something unexpected happens.
KettleException
public void delJobEntries(ObjectId id_job) throws KettleException
KettleException
public void delJobEntryCopies(ObjectId id_job) throws KettleException
KettleException
public void delDependencies(ObjectId id_transformation) throws KettleException
KettleException
public void delStepAttributes(ObjectId id_transformation) throws KettleException
KettleException
public void delTransAttributes(ObjectId id_transformation) throws KettleException
KettleException
public void delJobAttributes(ObjectId id_job) throws KettleException
KettleException
public void delPartitionSchemas(ObjectId id_transformation) throws KettleException
KettleException
public void delPartitions(ObjectId id_partition_schema) throws KettleException
KettleException
public void delClusterSlaves(ObjectId id_cluster) throws KettleException
KettleException
public void delTransformationClusters(ObjectId id_transformation) throws KettleException
KettleException
public void delTransformationSlaves(ObjectId id_transformation) throws KettleException
KettleException
public void delJobEntryAttributes(ObjectId id_job) throws KettleException
KettleException
public void delTransHops(ObjectId id_transformation) throws KettleException
KettleException
public void delJobHops(ObjectId id_job) throws KettleException
KettleException
public void delTransNotes(ObjectId id_transformation) throws KettleException
KettleException
public void delJobNotes(ObjectId id_job) throws KettleException
KettleException
public void delTrans(ObjectId id_transformation) throws KettleException
KettleException
public void delJob(ObjectId id_job) throws KettleException
KettleException
public void delTransStepCondition(ObjectId id_transformation) throws KettleException
KettleException
public void delValue(ObjectId id_value) throws KettleException
KettleException
public void deleteSlave(ObjectId id_slave) throws KettleException
deleteSlave
in interface Repository
KettleException
public void deletePartitionSchema(ObjectId id_partition_schema) throws KettleException
deletePartitionSchema
in interface Repository
KettleException
public void deleteClusterSchema(ObjectId id_cluster) throws KettleException
deleteClusterSchema
in interface Repository
KettleException
public void deleteTransformation(ObjectId id_transformation) throws KettleException
Repository
deleteTransformation
in interface Repository
id_transformation
- the transformation id to delete
KettleException
public void deleteJob(ObjectId id_job) throws KettleException
deleteJob
in interface Repository
KettleException
public boolean dropRepositorySchema() throws KettleException
KettleException
public void updateStepTypes() throws KettleException
KettleException
- if the update didn't go as planned.public void updateDatabaseTypes() throws KettleException
KettleException
- if the update didn't go as planned.public void updateJobEntryTypes() throws KettleException
KettleException
- if something went wrong during the update.public String toString()
toString
in class Object
public void clearSharedObjectCache()
clearSharedObjectCache
in interface Repository
public Database getDatabase()
public void setDatabase(Database database)
database
- The database to set.public void lockRepository() throws KettleException
KettleException
public void unlockRepository() throws KettleException
KettleException
public List<DatabaseMeta> getDatabases() throws KettleException
KettleException
public List<SlaveServer> getSlaveServers() throws KettleException
getSlaveServers
in interface Repository
KettleException
public DatabaseMeta getDatabaseMeta()
public List<DatabaseMeta> readDatabases() throws KettleException
readDatabases
in interface Repository
KettleException
public boolean isUseBatchProcessing()
public void setImportBaseDirectory(RepositoryDirectory importBaseDirectory)
importBaseDirectory
- the base import directory, selected by the userpublic RepositoryDirectory getImportBaseDirectory()
public void createRepositorySchema(ProgressMonitorListener monitor, boolean upgrade, List<String> statements, boolean dryRun) throws KettleException
monitor
- The progress monitor to use, or null if no monitor is present.upgrade
- True if you want to upgrade the repository, false if you want to create it.statements
- the list of statements to populatedryrun
- true if we don't actually execute the statements
KettleException
- in case something goes wrong!public int countNrStepAttributes(ObjectId id_step, String code) throws KettleException
countNrStepAttributes
in interface Repository
KettleException
public int countNrJobEntryAttributes(ObjectId id_jobentry, String code) throws KettleException
countNrJobEntryAttributes
in interface Repository
KettleException
public void disconnect()
Repository
disconnect
in interface Repository
public boolean getJobEntryAttributeBoolean(ObjectId id_jobentry, String code) throws KettleException
getJobEntryAttributeBoolean
in interface Repository
KettleException
public boolean getJobEntryAttributeBoolean(ObjectId id_jobentry, int nr, String code) throws KettleException
getJobEntryAttributeBoolean
in interface Repository
KettleException
public boolean getJobEntryAttributeBoolean(ObjectId id_jobentry, String code, boolean def) throws KettleException
getJobEntryAttributeBoolean
in interface Repository
KettleException
public long getJobEntryAttributeInteger(ObjectId id_jobentry, String code) throws KettleException
getJobEntryAttributeInteger
in interface Repository
KettleException
public long getJobEntryAttributeInteger(ObjectId id_jobentry, int nr, String code) throws KettleException
getJobEntryAttributeInteger
in interface Repository
KettleException
public String getJobEntryAttributeString(ObjectId id_jobentry, String code) throws KettleException
getJobEntryAttributeString
in interface Repository
KettleException
public String getJobEntryAttributeString(ObjectId id_jobentry, int nr, String code) throws KettleException
getJobEntryAttributeString
in interface Repository
KettleException
public void saveJobEntryAttribute(ObjectId id_job, ObjectId id_jobentry, int nr, String code, String value) throws KettleException
saveJobEntryAttribute
in interface Repository
KettleException
public void saveJobEntryAttribute(ObjectId id_job, ObjectId id_jobentry, String code, String value) throws KettleException
saveJobEntryAttribute
in interface Repository
KettleException
public void saveJobEntryAttribute(ObjectId id_job, ObjectId id_jobentry, int nr, String code, boolean value) throws KettleException
saveJobEntryAttribute
in interface Repository
KettleException
public void saveJobEntryAttribute(ObjectId id_job, ObjectId id_jobentry, String code, boolean value) throws KettleException
saveJobEntryAttribute
in interface Repository
KettleException
public void saveJobEntryAttribute(ObjectId id_job, ObjectId id_jobentry, int nr, String code, long value) throws KettleException
saveJobEntryAttribute
in interface Repository
KettleException
public void saveJobEntryAttribute(ObjectId id_job, ObjectId id_jobentry, String code, long value) throws KettleException
saveJobEntryAttribute
in interface Repository
KettleException
public boolean getStepAttributeBoolean(ObjectId id_step, int nr, String code, boolean def) throws KettleException
getStepAttributeBoolean
in interface Repository
KettleException
public boolean getStepAttributeBoolean(ObjectId id_step, int nr, String code) throws KettleException
getStepAttributeBoolean
in interface Repository
KettleException
public boolean getStepAttributeBoolean(ObjectId id_step, String code) throws KettleException
getStepAttributeBoolean
in interface Repository
KettleException
public long getStepAttributeInteger(ObjectId id_step, int nr, String code) throws KettleException
getStepAttributeInteger
in interface Repository
KettleException
public long getStepAttributeInteger(ObjectId id_step, String code) throws KettleException
getStepAttributeInteger
in interface Repository
KettleException
public String getStepAttributeString(ObjectId id_step, int nr, String code) throws KettleException
getStepAttributeString
in interface Repository
KettleException
public String getStepAttributeString(ObjectId id_step, String code) throws KettleException
getStepAttributeString
in interface Repository
KettleException
public void saveStepAttribute(ObjectId id_transformation, ObjectId id_step, int nr, String code, String value) throws KettleException
saveStepAttribute
in interface Repository
KettleException
public void saveStepAttribute(ObjectId id_transformation, ObjectId id_step, String code, String value) throws KettleException
saveStepAttribute
in interface Repository
KettleException
public void saveStepAttribute(ObjectId id_transformation, ObjectId id_step, int nr, String code, boolean value) throws KettleException
saveStepAttribute
in interface Repository
KettleException
public void saveStepAttribute(ObjectId id_transformation, ObjectId id_step, String code, boolean value) throws KettleException
saveStepAttribute
in interface Repository
KettleException
public void saveStepAttribute(ObjectId id_transformation, ObjectId id_step, int nr, String code, long value) throws KettleException
saveStepAttribute
in interface Repository
KettleException
public void saveStepAttribute(ObjectId id_transformation, ObjectId id_step, String code, long value) throws KettleException
saveStepAttribute
in interface Repository
KettleException
public void saveStepAttribute(ObjectId id_transformation, ObjectId id_step, int nr, String code, double value) throws KettleException
saveStepAttribute
in interface Repository
KettleException
public void saveStepAttribute(ObjectId id_transformation, ObjectId id_step, String code, double value) throws KettleException
saveStepAttribute
in interface Repository
KettleException
public ObjectId findStepAttributeID(ObjectId id_step, int nr, String code) throws KettleException
id_step
- nr
- code
-
KettleException
public void execStatement(String sql) throws KettleException
KettleException
public void loadJobEntry(JobEntryBase jobEntryBase, ObjectId id_jobentry, List<DatabaseMeta> databases, List<SlaveServer> slaveServers) throws KettleException
KettleException
public ObjectId getClusterID(String name) throws KettleException
getClusterID
in interface Repository
KettleException
public ObjectId getDatabaseID(String name) throws KettleException
getDatabaseID
in interface Repository
KettleException
public ObjectId getJobId(String name, RepositoryDirectoryInterface repositoryDirectory) throws KettleException
getJobId
in interface Repository
KettleException
public ObjectId getPartitionSchemaID(String name) throws KettleException
getPartitionSchemaID
in interface Repository
KettleException
public ObjectId getSlaveID(String name) throws KettleException
getSlaveID
in interface Repository
KettleException
public ObjectId getTransformationID(String name, RepositoryDirectoryInterface repositoryDirectory) throws KettleException
getTransformationID
in interface Repository
KettleException
public ObjectId insertJobEntry(ObjectId id_job, JobEntryBase jobEntryBase) throws KettleException
KettleException
public DatabaseMeta loadDatabaseMetaFromStepAttribute(ObjectId idStep, String code, List<DatabaseMeta> databases) throws KettleException
Repository
loadDatabaseMetaFromStepAttribute
in interface Repository
KettleException
public void saveDatabaseMetaStepAttribute(ObjectId id_transformation, ObjectId id_step, String code, DatabaseMeta database) throws KettleException
saveDatabaseMetaStepAttribute
in interface Repository
id_transformation
- id_step
- string
- database
-
KettleException
public DatabaseMeta loadDatabaseMetaFromJobEntryAttribute(ObjectId id_jobentry, String nameCode, int nr, String idCode, List<DatabaseMeta> databases) throws KettleException
Repository
loadDatabaseMetaFromJobEntryAttribute
in interface Repository
KettleException
public DatabaseMeta loadDatabaseMetaFromJobEntryAttribute(ObjectId id_jobentry, String nameCode, String idCode, List<DatabaseMeta> databases) throws KettleException
Repository
loadDatabaseMetaFromJobEntryAttribute
in interface Repository
KettleException
public void saveDatabaseMetaJobEntryAttribute(ObjectId id_job, ObjectId id_jobentry, String nameCode, String idCode, DatabaseMeta database) throws KettleException
saveDatabaseMetaJobEntryAttribute
in interface Repository
id_transformation
- id_step
- linkCode
- nameCode
- idCode
- database
-
KettleException
public void saveDatabaseMetaJobEntryAttribute(ObjectId id_job, ObjectId id_jobentry, int nr, String nameCode, String idCode, DatabaseMeta database) throws KettleException
saveDatabaseMetaJobEntryAttribute
in interface Repository
id_job
- nr
- id_jobentry
- nameCode
- nameCode
- idCode
- database
-
KettleException
public Condition loadConditionFromStepAttribute(ObjectId id_step, String code) throws KettleException
loadConditionFromStepAttribute
in interface Repository
id_step
- code
-
KettleException
public void saveConditionStepAttribute(ObjectId id_transformation, ObjectId id_step, String code, Condition condition) throws KettleException
saveConditionStepAttribute
in interface Repository
id_step
- code
- condition
-
KettleException
public KettleDatabaseRepositorySecurityProvider getSecurityProvider()
getSecurityProvider
in interface Repository
public KettleDatabaseRepositorySecurityProvider getSecurityManager()
getSecurityManager
in interface Repository
public void undeleteObject(RepositoryElementMetaInterface element) throws KettleException
Repository
undeleteObject
in interface Repository
KettleException
- get throws in case something goes horribly wrong.public List<RepositoryElementMetaInterface> getJobAndTransformationObjects(ObjectId id_directory, boolean includeDeleted) throws KettleException
Repository
Repository.getJobObjects(ObjectId, boolean)
and Repository.getTransformationObjects(ObjectId, boolean)
into one
operation.
getJobAndTransformationObjects
in interface Repository
id_directory
- directoryincludeDeleted
- true to return deleted objects
KettleException
- In case something goes wrongpublic IRepositoryService getService(Class<? extends IRepositoryService> clazz) throws KettleException
Repository
getService
in interface Repository
KettleException
- in case something goes horribly wrong.public List<Class<? extends IRepositoryService>> getServiceInterfaces() throws KettleException
Repository
getServiceInterfaces
in interface Repository
KettleException
- in case something goes horribly wrong.public boolean hasService(Class<? extends IRepositoryService> clazz) throws KettleException
Repository
hasService
in interface Repository
KettleException
- in case something goes horribly wrong.public RepositoryDirectory getDefaultSaveDirectory(RepositoryElementInterface repositoryElement) throws KettleException
getDefaultSaveDirectory
in interface Repository
KettleException
public RepositoryDirectory getUserHomeDirectory() throws KettleException
getUserHomeDirectory
in interface Repository
KettleException
public RepositoryObject getObjectInformation(ObjectId objectId, RepositoryObjectType objectType) throws KettleException
Repository
getObjectInformation
in interface Repository
objectId
- The ID of the object to get more information about.objectType
- The type of object to investigate.
KettleException
- In case there was a loading problem.public JobMeta loadJob(ObjectId idJob, String versionLabel) throws KettleException
Repository
loadJob
in interface Repository
idJob
- the id of the jobversionLabel
- version to load. Specify null to load the last version.
KettleException
public TransMeta loadTransformation(ObjectId idTransformation, String versionLabel) throws KettleException
Repository
loadTransformation
in interface Repository
idTransformation
- the id of the transformation to loadversionLabel
- version to load. Specify null to load the last version.
KettleException
public String getConnectMessage()
Repository
getConnectMessage
in interface Repository
public IRepositoryExporter getExporter()
getExporter
in interface Repository
public IRepositoryImporter getImporter()
getImporter
in interface Repository
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |