org.pentaho.di.repository.kdr
Class KettleDatabaseRepository

java.lang.Object
  extended by org.pentaho.di.repository.kdr.KettleDatabaseRepositoryBase
      extended by org.pentaho.di.repository.kdr.KettleDatabaseRepository
All Implemented Interfaces:
Repository

public class KettleDatabaseRepository
extends KettleDatabaseRepositoryBase
implements Repository

This class handles interactions with a Kettle repository.

Author:
Matt Created on 31-mrt-2004

Field Summary
 KettleDatabaseRepositoryClusterSchemaDelegate clusterSchemaDelegate
           
 KettleDatabaseRepositoryConditionDelegate conditionDelegate
           
 KettleDatabaseRepositoryConnectionDelegate connectionDelegate
           
 KettleDatabaseRepositoryDatabaseDelegate databaseDelegate
           
 KettleDatabaseRepositoryDirectoryDelegate directoryDelegate
           
 KettleDatabaseRepositoryJobDelegate jobDelegate
           
 KettleDatabaseRepositoryJobEntryDelegate jobEntryDelegate
           
 KettleDatabaseRepositoryNotePadDelegate notePadDelegate
           
 KettleDatabaseRepositoryPartitionSchemaDelegate partitionSchemaDelegate
           
 KettleDatabaseRepositorySlaveServerDelegate slaveServerDelegate
           
 KettleDatabaseRepositoryStepDelegate stepDelegate
           
 KettleDatabaseRepositoryTransDelegate transDelegate
           
 KettleDatabaseRepositoryUserDelegate userDelegate
           
 KettleDatabaseRepositoryValueDelegate valueDelegate
           
 
Fields inherited from class org.pentaho.di.repository.kdr.KettleDatabaseRepositoryBase
FIELD_CLUSTER_BASE_PORT, FIELD_CLUSTER_DYNAMIC, FIELD_CLUSTER_ID_CLUSTER, FIELD_CLUSTER_NAME, FIELD_CLUSTER_SLAVE_ID_CLUSTER, FIELD_CLUSTER_SLAVE_ID_CLUSTER_SLAVE, FIELD_CLUSTER_SLAVE_ID_SLAVE, FIELD_CLUSTER_SOCKETS_BUFFER_SIZE, FIELD_CLUSTER_SOCKETS_COMPRESSED, FIELD_CLUSTER_SOCKETS_FLUSH_INTERVAL, FIELD_CONDITION_CONDITION_FUNCTION, FIELD_CONDITION_ID_CONDITION, FIELD_CONDITION_ID_CONDITION_PARENT, FIELD_CONDITION_ID_VALUE_RIGHT, FIELD_CONDITION_LEFT_NAME, FIELD_CONDITION_NEGATED, FIELD_CONDITION_OPERATOR, FIELD_CONDITION_RIGHT_NAME, FIELD_DATABASE_ATTRIBUTE_CODE, FIELD_DATABASE_ATTRIBUTE_ID_DATABASE, FIELD_DATABASE_ATTRIBUTE_ID_DATABASE_ATTRIBUTE, FIELD_DATABASE_ATTRIBUTE_VALUE_STR, FIELD_DATABASE_CONTYPE_CODE, FIELD_DATABASE_CONTYPE_DESCRIPTION, FIELD_DATABASE_CONTYPE_ID_DATABASE_CONTYPE, FIELD_DATABASE_DATA_TBS, FIELD_DATABASE_DATABASE_NAME, FIELD_DATABASE_HOST_NAME, FIELD_DATABASE_ID_DATABASE, FIELD_DATABASE_ID_DATABASE_CONTYPE, FIELD_DATABASE_ID_DATABASE_TYPE, FIELD_DATABASE_INDEX_TBS, FIELD_DATABASE_NAME, FIELD_DATABASE_PASSWORD, FIELD_DATABASE_PORT, FIELD_DATABASE_SERVERNAME, FIELD_DATABASE_TYPE_CODE, FIELD_DATABASE_TYPE_DESCRIPTION, FIELD_DATABASE_TYPE_ID_DATABASE_TYPE, FIELD_DATABASE_USERNAME, FIELD_DEPENDENCY_FIELD_NAME, FIELD_DEPENDENCY_ID_DATABASE, FIELD_DEPENDENCY_ID_DEPENDENCY, FIELD_DEPENDENCY_ID_TRANSFORMATION, FIELD_DEPENDENCY_TABLE_NAME, FIELD_DIRECTORY_DIRECTORY_NAME, FIELD_DIRECTORY_ID_DIRECTORY, FIELD_DIRECTORY_ID_DIRECTORY_PARENT, FIELD_JOB_ATTRIBUTE_CODE, FIELD_JOB_ATTRIBUTE_ID_JOB, FIELD_JOB_ATTRIBUTE_ID_JOB_ATTRIBUTE, FIELD_JOB_ATTRIBUTE_NR, FIELD_JOB_ATTRIBUTE_VALUE_NUM, FIELD_JOB_ATTRIBUTE_VALUE_STR, FIELD_JOB_CREATED_DATE, FIELD_JOB_CREATED_USER, FIELD_JOB_DESCRIPTION, FIELD_JOB_EXTENDED_DESCRIPTION, FIELD_JOB_HOP_ENABLED, FIELD_JOB_HOP_EVALUATION, FIELD_JOB_HOP_ID_JOB, FIELD_JOB_HOP_ID_JOB_HOP, FIELD_JOB_HOP_ID_JOBENTRY_COPY_FROM, FIELD_JOB_HOP_ID_JOBENTRY_COPY_TO, FIELD_JOB_HOP_UNCONDITIONAL, FIELD_JOB_ID_DATABASE_LOG, FIELD_JOB_ID_DIRECTORY, FIELD_JOB_ID_JOB, FIELD_JOB_JOB_STATUS, FIELD_JOB_JOB_VERSION, FIELD_JOB_LOCK_ID_JOB, FIELD_JOB_LOCK_ID_JOB_LOCK, FIELD_JOB_LOCK_ID_USER, FIELD_JOB_LOCK_LOCK_DATE, FIELD_JOB_LOCK_LOCK_MESSAGE, FIELD_JOB_MODIFIED_DATE, FIELD_JOB_MODIFIED_USER, FIELD_JOB_NAME, FIELD_JOB_NOTE_ID_JOB, FIELD_JOB_NOTE_ID_NOTE, FIELD_JOB_PASS_BATCH_ID, FIELD_JOB_SHARED_FILE, FIELD_JOB_TABLE_NAME_LOG, FIELD_JOB_USE_BATCH_ID, FIELD_JOB_USE_LOGFIELD, FIELD_JOBENTRY_ATTRIBUTE_CODE, FIELD_JOBENTRY_ATTRIBUTE_ID_JOB, FIELD_JOBENTRY_ATTRIBUTE_ID_JOBENTRY, FIELD_JOBENTRY_ATTRIBUTE_ID_JOBENTRY_ATTRIBUTE, FIELD_JOBENTRY_ATTRIBUTE_NR, FIELD_JOBENTRY_ATTRIBUTE_VALUE_NUM, FIELD_JOBENTRY_ATTRIBUTE_VALUE_STR, FIELD_JOBENTRY_COPY_GUI_DRAW, FIELD_JOBENTRY_COPY_GUI_LOCATION_X, FIELD_JOBENTRY_COPY_GUI_LOCATION_Y, FIELD_JOBENTRY_COPY_ID_JOB, FIELD_JOBENTRY_COPY_ID_JOBENTRY, FIELD_JOBENTRY_COPY_ID_JOBENTRY_COPY, FIELD_JOBENTRY_COPY_ID_JOBENTRY_TYPE, FIELD_JOBENTRY_COPY_NR, FIELD_JOBENTRY_COPY_PARALLEL, FIELD_JOBENTRY_DATABASE_ID_DATABASE, FIELD_JOBENTRY_DATABASE_ID_JOB, FIELD_JOBENTRY_DATABASE_ID_JOBENTRY, FIELD_JOBENTRY_DESCRIPTION, FIELD_JOBENTRY_ID_JOB, FIELD_JOBENTRY_ID_JOBENTRY, FIELD_JOBENTRY_ID_JOBENTRY_TYPE, FIELD_JOBENTRY_NAME, FIELD_JOBENTRY_TYPE_CODE, FIELD_JOBENTRY_TYPE_DESCRIPTION, FIELD_JOBENTRY_TYPE_ID_JOBENTRY_TYPE, FIELD_LOG_ADD_DATE, FIELD_LOG_ADD_TIME, FIELD_LOG_FILEEXTENTION, FIELD_LOG_FILENAME, FIELD_LOG_ID_DATABASE_LOG, FIELD_LOG_ID_LOG, FIELD_LOG_ID_LOGLEVEL, FIELD_LOG_LOGTYPE, FIELD_LOG_NAME, FIELD_LOG_TABLE_NAME_LOG, FIELD_LOGLEVEL_CODE, FIELD_LOGLEVEL_DESCRIPTION, FIELD_LOGLEVEL_ID_LOGLEVEL, FIELD_NOTE_BACK_GROUND_COLOR_BLUE, FIELD_NOTE_BACK_GROUND_COLOR_GREEN, FIELD_NOTE_BACK_GROUND_COLOR_RED, FIELD_NOTE_BORDER_COLOR_BLUE, FIELD_NOTE_BORDER_COLOR_GREEN, FIELD_NOTE_BORDER_COLOR_RED, FIELD_NOTE_COLOR_BLUE, FIELD_NOTE_COLOR_GREEN, FIELD_NOTE_COLOR_RED, FIELD_NOTE_DRAW_SHADOW, FIELD_NOTE_FONT_BOLD, FIELD_NOTE_FONT_ITALIC, FIELD_NOTE_FONT_NAME, FIELD_NOTE_FONT_SIZE, FIELD_NOTE_GUI_LOCATION_HEIGHT, FIELD_NOTE_GUI_LOCATION_WIDTH, FIELD_NOTE_GUI_LOCATION_X, FIELD_NOTE_GUI_LOCATION_Y, FIELD_NOTE_ID_NOTE, FIELD_NOTE_VALUE_STR, FIELD_PARTITION_ID_PARTITION, FIELD_PARTITION_ID_PARTITION_SCHEMA, FIELD_PARTITION_PARTITION_ID, FIELD_PARTITION_SCHEMA_DYNAMIC_DEFINITION, FIELD_PARTITION_SCHEMA_ID_PARTITION_SCHEMA, FIELD_PARTITION_SCHEMA_NAME, FIELD_PARTITION_SCHEMA_PARTITIONS_PER_SLAVE, FIELD_REPOSITORY_LOG_ID_REPOSITORY_LOG, FIELD_REPOSITORY_LOG_LOG_DATE, FIELD_REPOSITORY_LOG_LOG_USER, FIELD_REPOSITORY_LOG_OPERATION_DESC, FIELD_REPOSITORY_LOG_REP_VERSION, FIELD_SLAVE_HOST_NAME, FIELD_SLAVE_ID_SLAVE, FIELD_SLAVE_MASTER, FIELD_SLAVE_NAME, FIELD_SLAVE_NON_PROXY_HOSTS, FIELD_SLAVE_PASSWORD, FIELD_SLAVE_PORT, FIELD_SLAVE_PROXY_HOST_NAME, FIELD_SLAVE_PROXY_PORT, FIELD_SLAVE_USERNAME, FIELD_SLAVE_WEB_APP_NAME, FIELD_STEP_ATTRIBUTE_CODE, FIELD_STEP_ATTRIBUTE_ID_STEP, FIELD_STEP_ATTRIBUTE_ID_STEP_ATTRIBUTE, FIELD_STEP_ATTRIBUTE_ID_TRANSFORMATION, FIELD_STEP_ATTRIBUTE_NR, FIELD_STEP_ATTRIBUTE_VALUE_NUM, FIELD_STEP_ATTRIBUTE_VALUE_STR, FIELD_STEP_COPIES, FIELD_STEP_DATABASE_ID_DATABASE, FIELD_STEP_DATABASE_ID_STEP, FIELD_STEP_DATABASE_ID_TRANSFORMATION, FIELD_STEP_DESCRIPTION, FIELD_STEP_DISTRIBUTE, FIELD_STEP_GUI_DRAW, FIELD_STEP_GUI_LOCATION_X, FIELD_STEP_GUI_LOCATION_Y, FIELD_STEP_ID_STEP, FIELD_STEP_ID_STEP_TYPE, FIELD_STEP_ID_TRANSFORMATION, FIELD_STEP_NAME, FIELD_STEP_TYPE_CODE, FIELD_STEP_TYPE_DESCRIPTION, FIELD_STEP_TYPE_HELPTEXT, FIELD_STEP_TYPE_ID_STEP_TYPE, FIELD_TRANS_ATTRIBUTE_CODE, FIELD_TRANS_ATTRIBUTE_ID_TRANS_ATTRIBUTE, FIELD_TRANS_ATTRIBUTE_ID_TRANSFORMATION, FIELD_TRANS_ATTRIBUTE_NR, FIELD_TRANS_ATTRIBUTE_VALUE_NUM, FIELD_TRANS_ATTRIBUTE_VALUE_STR, FIELD_TRANS_CLUSTER_ID_CLUSTER, FIELD_TRANS_CLUSTER_ID_TRANS_CLUSTER, FIELD_TRANS_CLUSTER_ID_TRANSFORMATION, FIELD_TRANS_HOP_ENABLED, FIELD_TRANS_HOP_ID_STEP_FROM, FIELD_TRANS_HOP_ID_STEP_TO, FIELD_TRANS_HOP_ID_TRANS_HOP, FIELD_TRANS_HOP_ID_TRANSFORMATION, FIELD_TRANS_LOCK_ID_TRANS_LOCK, FIELD_TRANS_LOCK_ID_TRANSFORMATION, FIELD_TRANS_LOCK_ID_USER, FIELD_TRANS_LOCK_LOCK_DATE, FIELD_TRANS_LOCK_LOCK_MESSAGE, FIELD_TRANS_NOTE_ID_NOTE, FIELD_TRANS_NOTE_ID_TRANSFORMATION, FIELD_TRANS_PARTITION_SCHEMA_ID_PARTITION_SCHEMA, FIELD_TRANS_PARTITION_SCHEMA_ID_TRANS_PARTITION_SCHEMA, FIELD_TRANS_PARTITION_SCHEMA_ID_TRANSFORMATION, FIELD_TRANS_SLAVE_ID_SLAVE, FIELD_TRANS_SLAVE_ID_TRANS_SLAVE, FIELD_TRANS_SLAVE_ID_TRANSFORMATION, FIELD_TRANS_STEP_CONDITION_ID_CONDITION, FIELD_TRANS_STEP_CONDITION_ID_STEP, FIELD_TRANS_STEP_CONDITION_ID_TRANSFORMATION, FIELD_TRANSFORMATION_CREATED_DATE, FIELD_TRANSFORMATION_CREATED_USER, FIELD_TRANSFORMATION_DESCRIPTION, FIELD_TRANSFORMATION_DIFF_MAXDATE, FIELD_TRANSFORMATION_EXTENDED_DESCRIPTION, FIELD_TRANSFORMATION_FIELD_NAME_MAXDATE, FIELD_TRANSFORMATION_ID_DATABASE_LOG, FIELD_TRANSFORMATION_ID_DATABASE_MAXDATE, FIELD_TRANSFORMATION_ID_DIRECTORY, FIELD_TRANSFORMATION_ID_STEP_INPUT, FIELD_TRANSFORMATION_ID_STEP_OUTPUT, FIELD_TRANSFORMATION_ID_STEP_READ, FIELD_TRANSFORMATION_ID_STEP_UPDATE, FIELD_TRANSFORMATION_ID_STEP_WRITE, FIELD_TRANSFORMATION_ID_TRANSFORMATION, FIELD_TRANSFORMATION_MODIFIED_DATE, FIELD_TRANSFORMATION_MODIFIED_USER, FIELD_TRANSFORMATION_NAME, FIELD_TRANSFORMATION_OFFSET_MAXDATE, FIELD_TRANSFORMATION_SIZE_ROWSET, FIELD_TRANSFORMATION_TABLE_NAME_LOG, FIELD_TRANSFORMATION_TABLE_NAME_MAXDATE, FIELD_TRANSFORMATION_TRANS_STATUS, FIELD_TRANSFORMATION_TRANS_VERSION, FIELD_TRANSFORMATION_USE_BATCHID, FIELD_TRANSFORMATION_USE_LOGFIELD, FIELD_USER_DESCRIPTION, FIELD_USER_ENABLED, FIELD_USER_ID_USER, FIELD_USER_LOGIN, FIELD_USER_NAME, FIELD_USER_PASSWORD, FIELD_VALUE_ID_VALUE, FIELD_VALUE_IS_NULL, FIELD_VALUE_NAME, FIELD_VALUE_VALUE_STR, FIELD_VALUE_VALUE_TYPE, FIELD_VERSION_ID_VERSION, FIELD_VERSION_IS_UPGRADE, FIELD_VERSION_MAJOR_VERSION, FIELD_VERSION_MINOR_VERSION, FIELD_VERSION_UPGRADE_DATE, JOB_ATTRIBUTE_LOG_SIZE_LIMIT, JOB_ATTRIBUTE_PARAM_DEFAULT, JOB_ATTRIBUTE_PARAM_DESCRIPTION, JOB_ATTRIBUTE_PARAM_KEY, REP_STRING_CODE_LENGTH, REP_STRING_LENGTH, repositoryTableNames, TABLE_R_CLUSTER, TABLE_R_CLUSTER_SLAVE, TABLE_R_CONDITION, TABLE_R_DATABASE, TABLE_R_DATABASE_ATTRIBUTE, TABLE_R_DATABASE_CONTYPE, TABLE_R_DATABASE_TYPE, TABLE_R_DEPENDENCY, TABLE_R_DIRECTORY, TABLE_R_JOB, TABLE_R_JOB_ATTRIBUTE, TABLE_R_JOB_HOP, TABLE_R_JOB_LOCK, TABLE_R_JOB_NOTE, TABLE_R_JOBENTRY, TABLE_R_JOBENTRY_ATTRIBUTE, TABLE_R_JOBENTRY_COPY, TABLE_R_JOBENTRY_DATABASE, TABLE_R_JOBENTRY_TYPE, TABLE_R_LOG, TABLE_R_LOGLEVEL, TABLE_R_NOTE, TABLE_R_PARTITION, TABLE_R_PARTITION_SCHEMA, TABLE_R_REPOSITORY_LOG, TABLE_R_SLAVE, TABLE_R_STEP, TABLE_R_STEP_ATTRIBUTE, TABLE_R_STEP_DATABASE, TABLE_R_STEP_TYPE, TABLE_R_TRANS_ATTRIBUTE, TABLE_R_TRANS_CLUSTER, TABLE_R_TRANS_HOP, TABLE_R_TRANS_LOCK, TABLE_R_TRANS_NOTE, TABLE_R_TRANS_PARTITION_SCHEMA, TABLE_R_TRANS_SLAVE, TABLE_R_TRANS_STEP_CONDITION, TABLE_R_TRANSFORMATION, TABLE_R_USER, TABLE_R_VALUE, TABLE_R_VERSION, TRANS_ATTRIBUTE_CAPTURE_STEP_PERFORMANCE, TRANS_ATTRIBUTE_FEEDBACK_SHOWN, TRANS_ATTRIBUTE_FEEDBACK_SIZE, TRANS_ATTRIBUTE_ID_STEP_REJECTED, TRANS_ATTRIBUTE_LOG_INTERVAL, TRANS_ATTRIBUTE_LOG_SIZE_LIMIT, TRANS_ATTRIBUTE_PARAM_DEFAULT, TRANS_ATTRIBUTE_PARAM_DESCRIPTION, TRANS_ATTRIBUTE_PARAM_KEY, TRANS_ATTRIBUTE_SHARED_FILE, TRANS_ATTRIBUTE_STEP_PERFORMANCE_CAPTURING_DELAY, TRANS_ATTRIBUTE_STEP_PERFORMANCE_CAPTURING_SIZE_LIMIT, TRANS_ATTRIBUTE_STEP_PERFORMANCE_LOG_TABLE, TRANS_ATTRIBUTE_TRANSFORMATION_TYPE, TRANS_ATTRIBUTE_UNIQUE_CONNECTIONS, TRANS_ATTRIBUTE_USING_THREAD_PRIORITIES
 
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

transDelegate

public KettleDatabaseRepositoryTransDelegate transDelegate

jobDelegate

public KettleDatabaseRepositoryJobDelegate jobDelegate

databaseDelegate

public KettleDatabaseRepositoryDatabaseDelegate databaseDelegate

slaveServerDelegate

public KettleDatabaseRepositorySlaveServerDelegate slaveServerDelegate

clusterSchemaDelegate

public KettleDatabaseRepositoryClusterSchemaDelegate clusterSchemaDelegate

partitionSchemaDelegate

public KettleDatabaseRepositoryPartitionSchemaDelegate partitionSchemaDelegate

directoryDelegate

public KettleDatabaseRepositoryDirectoryDelegate directoryDelegate

connectionDelegate

public KettleDatabaseRepositoryConnectionDelegate connectionDelegate

userDelegate

public KettleDatabaseRepositoryUserDelegate userDelegate

conditionDelegate

public KettleDatabaseRepositoryConditionDelegate conditionDelegate

valueDelegate

public KettleDatabaseRepositoryValueDelegate valueDelegate

notePadDelegate

public KettleDatabaseRepositoryNotePadDelegate notePadDelegate

stepDelegate

public KettleDatabaseRepositoryStepDelegate stepDelegate

jobEntryDelegate

public KettleDatabaseRepositoryJobEntryDelegate jobEntryDelegate
Constructor Detail

KettleDatabaseRepository

public KettleDatabaseRepository()
Method Detail

init

public void init(RepositoryMeta repositoryMeta)
Initialize the repository with the repository metadata and user information.

Specified by:
init in interface Repository

createRepositoryMeta

public RepositoryMeta createRepositoryMeta()
Returns:
A new repository meta object

connect

public void connect(String username,
                    String password)
             throws KettleException
Connect to the repository.

Specified by:
connect in interface Repository
Parameters:
username - the username of the user connecting to the repository.
password - the password of the user connecting to the repository.
Throws:
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 connected

connect

public void connect(String username,
                    String password,
                    boolean upgrade)
             throws KettleException
Connect to the repository.

Throws:
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 connected

commit

public void commit()
            throws KettleException
Throws:
KettleException

rollback

public void rollback()

getUserInfo

public IUser getUserInfo()
Specified by:
getUserInfo in interface Repository
Returns:
the currently logged on user. (also available through the repository security provider)

getMajorVersion

public int getMajorVersion()
Return the major repository version.

Returns:
the major repository version.

getMinorVersion

public int getMinorVersion()
Return the minor repository version.

Returns:
the minor repository version.

getVersion

public String getVersion()
Get the repository version.

Specified by:
getVersion in interface Repository
Returns:
The repository version as major version + "." + minor version

loadTransformation

public TransMeta loadTransformation(String transname,
                                    RepositoryDirectoryInterface repdir,
                                    ProgressMonitorListener monitor,
                                    boolean setInternalVariables,
                                    String versionName)
                             throws KettleException
Description copied from interface: Repository
Load a transformation with a name from a folder in the repository

Specified by:
loadTransformation in interface Repository
Parameters:
transname - the name of the transformation to load
monitor - 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.
Throws:
KettleException

readTransSharedObjects

public SharedObjects readTransSharedObjects(TransMeta transMeta)
                                     throws KettleException
Specified by:
readTransSharedObjects in interface Repository
Throws:
KettleException

renameTransformation

public ObjectId renameTransformation(ObjectId id_transformation,
                                     RepositoryDirectoryInterface newDir,
                                     String newName)
                              throws KettleException
Description copied from interface: Repository
Move / rename a transformation

Specified by:
renameTransformation in interface Repository
Parameters:
id_transformation - The ObjectId of the transformation to move
newDir - 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)
Returns:
The ObjectId of the transformation that was moved
Throws:
KettleException

loadJob

public JobMeta loadJob(String jobname,
                       RepositoryDirectoryInterface repdir,
                       ProgressMonitorListener monitor,
                       String versionName)
                throws KettleException
Load a job in a directory

Specified by:
loadJob in interface Repository
Parameters:
jobname - The name of the job
repdir - The directory in which the job resides.
the - monitor to use as feedback in a UI (or null if not used)
Throws:
KettleException

readJobMetaSharedObjects

public SharedObjects readJobMetaSharedObjects(JobMeta jobMeta)
                                       throws KettleException
Specified by:
readJobMetaSharedObjects in interface Repository
Throws:
KettleException

renameJob

public ObjectId renameJob(ObjectId id_job,
                          RepositoryDirectoryInterface dir,
                          String newname)
                   throws KettleException
Description copied from interface: Repository
Move / rename a job

Specified by:
renameJob in interface Repository
Parameters:
id_job - The ObjectId of the job to move
dir - 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)
Returns:
The ObjectId of the job that was moved
Throws:
KettleException

exists

public boolean exists(String name,
                      RepositoryDirectoryInterface repositoryDirectory,
                      RepositoryObjectType objectType)
               throws KettleException
Description copied from interface: Repository
See if a repository object exists in the repository

Specified by:
exists in interface Repository
Parameters:
name - the name of the object
repositoryDirectory - the directory in which it should reside
objectType - the type of repository object
Returns:
true if the job exists
Throws:
KettleException - in case something goes wrong.

save

public void save(RepositoryElementInterface repositoryElement,
                 String versionComment)
          throws KettleException
Throws:
KettleException

save

public void save(RepositoryElementInterface repositoryElement,
                 String versionComment,
                 ProgressMonitorListener monitor)
          throws KettleException
Specified by:
save in interface Repository
Throws:
KettleException

save

public void save(RepositoryElementInterface repositoryElement,
                 String versionComment,
                 ProgressMonitorListener monitor,
                 boolean overwrite)
          throws KettleException
Description copied from interface: Repository
Save an object to the repository optionally overwriting any associated objects.

Specified by:
save in interface Repository
Parameters:
repositoryElement - Object to save
versionComment - Version comment for update
monitor - Progress Monitor to report feedback to
overwrite - Overwrite any existing objects involved in saving repositoryElement, e.g. repositoryElement, database connections, slave servers
Throws:
KettleException - Error saving the object to the repository

save

public void save(RepositoryElementInterface repositoryElement,
                 String versionComment,
                 ProgressMonitorListener monitor,
                 ObjectId parentId,
                 boolean used,
                 boolean overwrite)
          throws KettleException
Throws:
KettleException

loadCondition

public Condition loadCondition(ObjectId id_condition)
                        throws KettleException
Read a condition from the repository.

Parameters:
id_condition - The condition id
Throws:
KettleException - if something goes wrong.

saveCondition

public ObjectId saveCondition(Condition condition)
                       throws KettleException
Throws:
KettleException

saveCondition

public ObjectId saveCondition(Condition condition,
                              ObjectId id_condition_parent)
                       throws KettleException
Throws:
KettleException

loadDatabaseMeta

public DatabaseMeta loadDatabaseMeta(ObjectId id_database,
                                     String versionName)
                              throws KettleException
Load the Database connection Metadata from the repository

Specified by:
loadDatabaseMeta in interface Repository
Parameters:
id_database - the id of the database connection to load
versionName - the revision to load. Specify null to load the last version.
Throws:
KettleException - in case something goes wrong with database, connection, etc.

deleteDatabaseMeta

public void deleteDatabaseMeta(String databaseName)
                        throws KettleException
Remove a database connection from the repository

Specified by:
deleteDatabaseMeta in interface Repository
Parameters:
databaseName - The name of the connection to remove
Throws:
KettleException - In case something went wrong: database error, insufficient permissions, depending objects, etc.

loadClusterSchema

public ClusterSchema loadClusterSchema(ObjectId idClusterSchema,
                                       List<SlaveServer> slaveServers,
                                       String versionLabel)
                                throws KettleException
Specified by:
loadClusterSchema in interface Repository
Throws:
KettleException

loadSlaveServer

public SlaveServer loadSlaveServer(ObjectId id_slave_server,
                                   String versionName)
                            throws KettleException
Specified by:
loadSlaveServer in interface Repository
Throws:
KettleException

loadPartitionSchema

public PartitionSchema loadPartitionSchema(ObjectId id_partition_schema,
                                           String versionName)
                                    throws KettleException
Specified by:
loadPartitionSchema in interface Repository
Throws:
KettleException

loadValueMetaAndData

public ValueMetaAndData loadValueMetaAndData(ObjectId id_value)
                                      throws KettleException
Throws:
KettleException

loadNotePadMeta

public NotePadMeta loadNotePadMeta(ObjectId id_note)
                            throws KettleException
Throws:
KettleException

saveNotePadMeta

public void saveNotePadMeta(NotePadMeta note,
                            ObjectId id_transformation)
                     throws KettleException
Throws:
KettleException

loadRepositoryDirectoryTree

public RepositoryDirectoryInterface loadRepositoryDirectoryTree()
                                                         throws KettleException
Specified by:
loadRepositoryDirectoryTree in interface Repository
Throws:
KettleException

loadRepositoryDirectoryTree

public RepositoryDirectoryInterface loadRepositoryDirectoryTree(RepositoryDirectoryInterface root)
                                                         throws KettleException
Throws:
KettleException

findDirectory

public RepositoryDirectoryInterface findDirectory(String directory)
                                           throws KettleException
Specified by:
findDirectory in interface Repository
Throws:
KettleException

findDirectory

public RepositoryDirectoryInterface findDirectory(ObjectId directory)
                                           throws KettleException
Specified by:
findDirectory in interface Repository
Throws:
KettleException

saveRepositoryDirectory

public void saveRepositoryDirectory(RepositoryDirectoryInterface dir)
                             throws KettleException
Specified by:
saveRepositoryDirectory in interface Repository
Throws:
KettleException

deleteRepositoryDirectory

public void deleteRepositoryDirectory(RepositoryDirectoryInterface dir)
                               throws KettleException
Specified by:
deleteRepositoryDirectory in interface Repository
Throws:
KettleException

renameRepositoryDirectory

public ObjectId renameRepositoryDirectory(ObjectId id,
                                          RepositoryDirectoryInterface newParentDir,
                                          String newName)
                                   throws KettleException
Description copied from interface: Repository
Move / rename a repository directory

Specified by:
renameRepositoryDirectory in interface Repository
Parameters:
id - The ObjectId of the repository directory to move
newParentDir - 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)
Returns:
The ObjectId of the repository directory that was moved
Throws:
KettleException

createRepositoryDirectory

public RepositoryDirectoryInterface createRepositoryDirectory(RepositoryDirectoryInterface parentDirectory,
                                                              String directoryPath)
                                                       throws KettleException
Create a new directory, possibly by creating several sub-directies of / at the same time.

Specified by:
createRepositoryDirectory in interface Repository
Parameters:
parentDirectory - the parent directory
directoryPath - The path to the new Repository Directory, to be created.
Returns:
The created sub-directory
Throws:
KettleException - In case something goes wrong

getRootDirectoryID

public ObjectId getRootDirectoryID()
                            throws KettleException
Throws:
KettleException

getNrSubDirectories

public int getNrSubDirectories(ObjectId id_directory)
                        throws KettleException
Throws:
KettleException

getSubDirectoryIDs

public ObjectId[] getSubDirectoryIDs(ObjectId id_directory)
                              throws KettleException
Throws:
KettleException

insertLogEntry

public ObjectId insertLogEntry(String description)
                        throws KettleException
Description copied from interface: Repository
Insert an entry in the audit trail of the repository. This is an optional operation and depends on the capabilities of the underlying repository.

Specified by:
insertLogEntry in interface Repository
Throws:
KettleException

insertTransNote

public void insertTransNote(ObjectId id_transformation,
                            ObjectId id_note)
                     throws KettleException
Throws:
KettleException

insertJobNote

public void insertJobNote(ObjectId id_job,
                          ObjectId id_note)
                   throws KettleException
Throws:
KettleException

insertStepDatabase

public void insertStepDatabase(ObjectId id_transformation,
                               ObjectId id_step,
                               ObjectId id_database)
                        throws KettleException
Specified by:
insertStepDatabase in interface Repository
Throws:
KettleException

insertJobEntryDatabase

public void insertJobEntryDatabase(ObjectId id_job,
                                   ObjectId id_jobentry,
                                   ObjectId id_database)
                            throws KettleException
Specified by:
insertJobEntryDatabase in interface Repository
Throws:
KettleException

insertTransformationPartitionSchema

public ObjectId insertTransformationPartitionSchema(ObjectId id_transformation,
                                                    ObjectId id_partition_schema)
                                             throws KettleException
Throws:
KettleException

insertClusterSlave

public ObjectId insertClusterSlave(ClusterSchema clusterSchema,
                                   SlaveServer slaveServer)
                            throws KettleException
Throws:
KettleException

insertTransformationCluster

public ObjectId insertTransformationCluster(ObjectId id_transformation,
                                            ObjectId id_cluster)
                                     throws KettleException
Throws:
KettleException

insertTransformationSlave

public ObjectId insertTransformationSlave(ObjectId id_transformation,
                                          ObjectId id_slave)
                                   throws KettleException
Throws:
KettleException

insertTransStepCondition

public void insertTransStepCondition(ObjectId id_transformation,
                                     ObjectId id_step,
                                     ObjectId id_condition)
                              throws KettleException
Throws:
KettleException

getTransformationNames

public String[] getTransformationNames(ObjectId id_directory,
                                       boolean includeDeleted)
                                throws KettleException
Specified by:
getTransformationNames in interface Repository
Throws:
KettleException

getJobObjects

public List<RepositoryElementMetaInterface> getJobObjects(ObjectId id_directory,
                                                          boolean includeDeleted)
                                                   throws KettleException
Specified by:
getJobObjects in interface Repository
Throws:
KettleException

getTransformationObjects

public List<RepositoryElementMetaInterface> getTransformationObjects(ObjectId id_directory,
                                                                     boolean includeDeleted)
                                                              throws KettleException
Specified by:
getTransformationObjects in interface Repository
Throws:
KettleException

getJobNames

public String[] getJobNames(ObjectId id_directory,
                            boolean includeDeleted)
                     throws KettleException
Specified by:
getJobNames in interface Repository
Throws:
KettleException

getDirectoryNames

public String[] getDirectoryNames(ObjectId id_directory)
                           throws KettleException
Description copied from interface: Repository
Returns the child directory names of a parent directory

Specified by:
getDirectoryNames in interface Repository
Parameters:
id_directory - parent directory id
Returns:
array of child names
Throws:
KettleException

getJobNames

public String[] getJobNames()
                     throws KettleException
Throws:
KettleException

getSubConditionIDs

public ObjectId[] getSubConditionIDs(ObjectId id_condition)
                              throws KettleException
Throws:
KettleException

getTransNoteIDs

public ObjectId[] getTransNoteIDs(ObjectId id_transformation)
                           throws KettleException
Throws:
KettleException

getTransformationConditionIDs

public ObjectId[] getTransformationConditionIDs(ObjectId id_transformation)
                                         throws KettleException
Throws:
KettleException

getTransformationDatabaseIDs

public ObjectId[] getTransformationDatabaseIDs(ObjectId id_transformation)
                                        throws KettleException
Throws:
KettleException

getJobNoteIDs

public ObjectId[] getJobNoteIDs(ObjectId id_job)
                         throws KettleException
Throws:
KettleException

getDatabaseIDs

public ObjectId[] getDatabaseIDs(boolean includeDeleted)
                          throws KettleException
Specified by:
getDatabaseIDs in interface Repository
Throws:
KettleException

getDatabaseAttributeIDs

public ObjectId[] getDatabaseAttributeIDs(ObjectId id_database)
                                   throws KettleException
Throws:
KettleException

getPartitionSchemaIDs

public ObjectId[] getPartitionSchemaIDs(boolean includeDeleted)
                                 throws KettleException
Specified by:
getPartitionSchemaIDs in interface Repository
Throws:
KettleException

getPartitionIDs

public ObjectId[] getPartitionIDs(ObjectId id_partition_schema)
                           throws KettleException
Throws:
KettleException

getTransformationPartitionSchemaIDs

public ObjectId[] getTransformationPartitionSchemaIDs(ObjectId id_transformation)
                                               throws KettleException
Throws:
KettleException

getTransformationClusterSchemaIDs

public ObjectId[] getTransformationClusterSchemaIDs(ObjectId id_transformation)
                                             throws KettleException
Throws:
KettleException

getClusterIDs

public ObjectId[] getClusterIDs(boolean includeDeleted)
                         throws KettleException
Specified by:
getClusterIDs in interface Repository
Throws:
KettleException

getSlaveIDs

public ObjectId[] getSlaveIDs(boolean includeDeleted)
                       throws KettleException
Specified by:
getSlaveIDs in interface Repository
Throws:
KettleException

getClusterSlaveIDs

public ObjectId[] getClusterSlaveIDs(ObjectId id_cluster_schema)
                              throws KettleException
Throws:
KettleException

getDatabaseNames

public String[] getDatabaseNames(boolean includeDeleted)
                          throws KettleException
Specified by:
getDatabaseNames in interface Repository
Throws:
KettleException

getPartitionSchemaNames

public String[] getPartitionSchemaNames(boolean includeDeleted)
                                 throws KettleException
Specified by:
getPartitionSchemaNames in interface Repository
Throws:
KettleException

getSlaveNames

public String[] getSlaveNames(boolean includeDeleted)
                       throws KettleException
Specified by:
getSlaveNames in interface Repository
Throws:
KettleException

getClusterNames

public String[] getClusterNames(boolean includeDeleted)
                         throws KettleException
Specified by:
getClusterNames in interface Repository
Throws:
KettleException

getStepIDs

public ObjectId[] getStepIDs(ObjectId id_transformation)
                      throws KettleException
Throws:
KettleException

getTransformationsUsingDatabase

public String[] getTransformationsUsingDatabase(ObjectId id_database)
                                         throws KettleException
Specified by:
getTransformationsUsingDatabase in interface Repository
Throws:
KettleException

getJobsUsingDatabase

public String[] getJobsUsingDatabase(ObjectId id_database)
                              throws KettleException
Description copied from interface: Repository
Get the repository version.

Specified by:
getJobsUsingDatabase in interface Repository
Returns:
The repository version as a string
Throws:
KettleException

getClustersUsingSlave

public String[] getClustersUsingSlave(ObjectId id_slave)
                               throws KettleException
Throws:
KettleException

getTransformationsUsingSlave

public String[] getTransformationsUsingSlave(ObjectId id_slave)
                                      throws KettleException
Throws:
KettleException

getTransformationsUsingPartitionSchema

public String[] getTransformationsUsingPartitionSchema(ObjectId id_partition_schema)
                                                throws KettleException
Throws:
KettleException

getTransformationsUsingCluster

public String[] getTransformationsUsingCluster(ObjectId id_cluster)
                                        throws KettleException
Throws:
KettleException

getJobHopIDs

public ObjectId[] getJobHopIDs(ObjectId id_job)
                        throws KettleException
Throws:
KettleException

getTransDependencyIDs

public ObjectId[] getTransDependencyIDs(ObjectId id_transformation)
                                 throws KettleException
Throws:
KettleException

getJobEntryIDs

public ObjectId[] getJobEntryIDs(ObjectId id_job)
                          throws KettleException
Throws:
KettleException

getJobEntryCopyIDs

public ObjectId[] getJobEntryCopyIDs(ObjectId id_job)
                              throws KettleException
Throws:
KettleException

getJobEntryCopyIDs

public ObjectId[] getJobEntryCopyIDs(ObjectId id_job,
                                     ObjectId id_jobentry)
                              throws KettleException
Throws:
KettleException

byteArrayToString

public static final String byteArrayToString(byte[] val)
                                      throws IOException
GZips and then base64 encodes an array of bytes to a String

Parameters:
val - the array of bytes to convert to a string
Returns:
the base64 encoded string
Throws:
IOException - in the case there is a Base64 or GZip encoding problem

delSteps

public void delSteps(ObjectId id_transformation)
              throws KettleException
Throws:
KettleException

deleteCondition

public void deleteCondition(ObjectId id_condition)
                     throws KettleException
Throws:
KettleException

delStepConditions

public void delStepConditions(ObjectId id_transformation)
                       throws KettleException
Throws:
KettleException

delStepDatabases

public void delStepDatabases(ObjectId id_transformation)
                      throws KettleException
Delete the relationships between the transformation/steps and the databases.

Parameters:
id_transformation - the transformation for which we want to delete the databases.
Throws:
KettleException - in case something unexpected happens.

delJobEntryDatabases

public void delJobEntryDatabases(ObjectId id_job)
                          throws KettleException
Delete the relationships between the job/job entries and the databases.

Parameters:
id_job - the job for which we want to delete the databases.
Throws:
KettleDatabaseException - in case something unexpected happens.
KettleException

delJobEntries

public void delJobEntries(ObjectId id_job)
                   throws KettleException
Throws:
KettleException

delJobEntryCopies

public void delJobEntryCopies(ObjectId id_job)
                       throws KettleException
Throws:
KettleException

delDependencies

public void delDependencies(ObjectId id_transformation)
                     throws KettleException
Throws:
KettleException

delStepAttributes

public void delStepAttributes(ObjectId id_transformation)
                       throws KettleException
Throws:
KettleException

delTransAttributes

public void delTransAttributes(ObjectId id_transformation)
                        throws KettleException
Throws:
KettleException

delJobAttributes

public void delJobAttributes(ObjectId id_job)
                      throws KettleException
Throws:
KettleException

delPartitionSchemas

public void delPartitionSchemas(ObjectId id_transformation)
                         throws KettleException
Throws:
KettleException

delPartitions

public void delPartitions(ObjectId id_partition_schema)
                   throws KettleException
Throws:
KettleException

delClusterSlaves

public void delClusterSlaves(ObjectId id_cluster)
                      throws KettleException
Throws:
KettleException

delTransformationClusters

public void delTransformationClusters(ObjectId id_transformation)
                               throws KettleException
Throws:
KettleException

delTransformationSlaves

public void delTransformationSlaves(ObjectId id_transformation)
                             throws KettleException
Throws:
KettleException

delJobEntryAttributes

public void delJobEntryAttributes(ObjectId id_job)
                           throws KettleException
Throws:
KettleException

delTransHops

public void delTransHops(ObjectId id_transformation)
                  throws KettleException
Throws:
KettleException

delJobHops

public void delJobHops(ObjectId id_job)
                throws KettleException
Throws:
KettleException

delTransNotes

public void delTransNotes(ObjectId id_transformation)
                   throws KettleException
Throws:
KettleException

delJobNotes

public void delJobNotes(ObjectId id_job)
                 throws KettleException
Throws:
KettleException

delTrans

public void delTrans(ObjectId id_transformation)
              throws KettleException
Throws:
KettleException

delJob

public void delJob(ObjectId id_job)
            throws KettleException
Throws:
KettleException

delTransStepCondition

public void delTransStepCondition(ObjectId id_transformation)
                           throws KettleException
Throws:
KettleException

delValue

public void delValue(ObjectId id_value)
              throws KettleException
Throws:
KettleException

deleteSlave

public void deleteSlave(ObjectId id_slave)
                 throws KettleException
Specified by:
deleteSlave in interface Repository
Throws:
KettleException

deletePartitionSchema

public void deletePartitionSchema(ObjectId id_partition_schema)
                           throws KettleException
Specified by:
deletePartitionSchema in interface Repository
Throws:
KettleException

deleteClusterSchema

public void deleteClusterSchema(ObjectId id_cluster)
                         throws KettleException
Specified by:
deleteClusterSchema in interface Repository
Throws:
KettleException

deleteTransformation

public void deleteTransformation(ObjectId id_transformation)
                          throws KettleException
Description copied from interface: Repository
Delete everything related to a transformation from the repository. This does not included shared objects : databases, slave servers, cluster and partition schema.

Specified by:
deleteTransformation in interface Repository
Parameters:
id_transformation - the transformation id to delete
Throws:
KettleException

deleteJob

public void deleteJob(ObjectId id_job)
               throws KettleException
Specified by:
deleteJob in interface Repository
Throws:
KettleException

dropRepositorySchema

public boolean dropRepositorySchema()
                             throws KettleException
Throws:
KettleException

updateStepTypes

public void updateStepTypes()
                     throws KettleException
Update the list in R_STEP_TYPE using the StepLoader StepPlugin entries

Throws:
KettleException - if the update didn't go as planned.

updateDatabaseTypes

public void updateDatabaseTypes()
                         throws KettleException
Update the list in R_DATABASE_TYPE using the plugin registry

Throws:
KettleException - if the update didn't go as planned.

updateJobEntryTypes

public void updateJobEntryTypes()
                         throws KettleException
Update the list in R_JOBENTRY_TYPE

Throws:
KettleException - if something went wrong during the update.

toString

public String toString()
Overrides:
toString in class Object

clearSharedObjectCache

public void clearSharedObjectCache()
Clear the shared object cache, if applicable.

Specified by:
clearSharedObjectCache in interface Repository

getDatabase

public Database getDatabase()
Returns:
Returns the database.

setDatabase

public void setDatabase(Database database)
Parameters:
database - The database to set.

lockRepository

public void lockRepository()
                    throws KettleException
Throws:
KettleException

unlockRepository

public void unlockRepository()
                      throws KettleException
Throws:
KettleException

getDatabases

public List<DatabaseMeta> getDatabases()
                                throws KettleException
Returns:
a list of all the databases in the repository.
Throws:
KettleException

getSlaveServers

public List<SlaveServer> getSlaveServers()
                                  throws KettleException
Specified by:
getSlaveServers in interface Repository
Returns:
a list of all the slave servers in the repository.
Throws:
KettleException

getDatabaseMeta

public DatabaseMeta getDatabaseMeta()
Returns:
the databaseMeta

readDatabases

public List<DatabaseMeta> readDatabases()
                                 throws KettleException
Read all the databases defined in the repository

Specified by:
readDatabases in interface Repository
Returns:
a list of all the databases defined in the repository
Throws:
KettleException

isUseBatchProcessing

public boolean isUseBatchProcessing()
Returns:
the useBatchProcessing

setImportBaseDirectory

public 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.

Parameters:
importBaseDirectory - the base import directory, selected by the user

getImportBaseDirectory

public 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

Returns:
the base import directory, selected by the user

createRepositorySchema

public void createRepositorySchema(ProgressMonitorListener monitor,
                                   boolean upgrade,
                                   List<String> statements,
                                   boolean dryRun)
                            throws KettleException
Create or upgrade repository tables & fields, populate lookup tables, ...

Parameters:
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 populate
dryrun - true if we don't actually execute the statements
Throws:
KettleException - in case something goes wrong!

countNrStepAttributes

public int countNrStepAttributes(ObjectId id_step,
                                 String code)
                          throws KettleException
Specified by:
countNrStepAttributes in interface Repository
Throws:
KettleException

countNrJobEntryAttributes

public int countNrJobEntryAttributes(ObjectId id_jobentry,
                                     String code)
                              throws KettleException
Specified by:
countNrJobEntryAttributes in interface Repository
Throws:
KettleException

disconnect

public void disconnect()
Description copied from interface: Repository
Disconnect from the repository.

Specified by:
disconnect in interface Repository

getJobEntryAttributeBoolean

public boolean getJobEntryAttributeBoolean(ObjectId id_jobentry,
                                           String code)
                                    throws KettleException
Specified by:
getJobEntryAttributeBoolean in interface Repository
Throws:
KettleException

getJobEntryAttributeBoolean

public boolean getJobEntryAttributeBoolean(ObjectId id_jobentry,
                                           int nr,
                                           String code)
                                    throws KettleException
Specified by:
getJobEntryAttributeBoolean in interface Repository
Throws:
KettleException

getJobEntryAttributeBoolean

public boolean getJobEntryAttributeBoolean(ObjectId id_jobentry,
                                           String code,
                                           boolean def)
                                    throws KettleException
Specified by:
getJobEntryAttributeBoolean in interface Repository
Throws:
KettleException

getJobEntryAttributeInteger

public long getJobEntryAttributeInteger(ObjectId id_jobentry,
                                        String code)
                                 throws KettleException
Specified by:
getJobEntryAttributeInteger in interface Repository
Throws:
KettleException

getJobEntryAttributeInteger

public long getJobEntryAttributeInteger(ObjectId id_jobentry,
                                        int nr,
                                        String code)
                                 throws KettleException
Specified by:
getJobEntryAttributeInteger in interface Repository
Throws:
KettleException

getJobEntryAttributeString

public String getJobEntryAttributeString(ObjectId id_jobentry,
                                         String code)
                                  throws KettleException
Specified by:
getJobEntryAttributeString in interface Repository
Throws:
KettleException

getJobEntryAttributeString

public String getJobEntryAttributeString(ObjectId id_jobentry,
                                         int nr,
                                         String code)
                                  throws KettleException
Specified by:
getJobEntryAttributeString in interface Repository
Throws:
KettleException

saveJobEntryAttribute

public void saveJobEntryAttribute(ObjectId id_job,
                                  ObjectId id_jobentry,
                                  int nr,
                                  String code,
                                  String value)
                           throws KettleException
Specified by:
saveJobEntryAttribute in interface Repository
Throws:
KettleException

saveJobEntryAttribute

public void saveJobEntryAttribute(ObjectId id_job,
                                  ObjectId id_jobentry,
                                  String code,
                                  String value)
                           throws KettleException
Specified by:
saveJobEntryAttribute in interface Repository
Throws:
KettleException

saveJobEntryAttribute

public void saveJobEntryAttribute(ObjectId id_job,
                                  ObjectId id_jobentry,
                                  int nr,
                                  String code,
                                  boolean value)
                           throws KettleException
Specified by:
saveJobEntryAttribute in interface Repository
Throws:
KettleException

saveJobEntryAttribute

public void saveJobEntryAttribute(ObjectId id_job,
                                  ObjectId id_jobentry,
                                  String code,
                                  boolean value)
                           throws KettleException
Specified by:
saveJobEntryAttribute in interface Repository
Throws:
KettleException

saveJobEntryAttribute

public void saveJobEntryAttribute(ObjectId id_job,
                                  ObjectId id_jobentry,
                                  int nr,
                                  String code,
                                  long value)
                           throws KettleException
Specified by:
saveJobEntryAttribute in interface Repository
Throws:
KettleException

saveJobEntryAttribute

public void saveJobEntryAttribute(ObjectId id_job,
                                  ObjectId id_jobentry,
                                  String code,
                                  long value)
                           throws KettleException
Specified by:
saveJobEntryAttribute in interface Repository
Throws:
KettleException

getStepAttributeBoolean

public boolean getStepAttributeBoolean(ObjectId id_step,
                                       int nr,
                                       String code,
                                       boolean def)
                                throws KettleException
Specified by:
getStepAttributeBoolean in interface Repository
Throws:
KettleException

getStepAttributeBoolean

public boolean getStepAttributeBoolean(ObjectId id_step,
                                       int nr,
                                       String code)
                                throws KettleException
Specified by:
getStepAttributeBoolean in interface Repository
Throws:
KettleException

getStepAttributeBoolean

public boolean getStepAttributeBoolean(ObjectId id_step,
                                       String code)
                                throws KettleException
Specified by:
getStepAttributeBoolean in interface Repository
Throws:
KettleException

getStepAttributeInteger

public long getStepAttributeInteger(ObjectId id_step,
                                    int nr,
                                    String code)
                             throws KettleException
Specified by:
getStepAttributeInteger in interface Repository
Throws:
KettleException

getStepAttributeInteger

public long getStepAttributeInteger(ObjectId id_step,
                                    String code)
                             throws KettleException
Specified by:
getStepAttributeInteger in interface Repository
Throws:
KettleException

getStepAttributeString

public String getStepAttributeString(ObjectId id_step,
                                     int nr,
                                     String code)
                              throws KettleException
Specified by:
getStepAttributeString in interface Repository
Throws:
KettleException

getStepAttributeString

public String getStepAttributeString(ObjectId id_step,
                                     String code)
                              throws KettleException
Specified by:
getStepAttributeString in interface Repository
Throws:
KettleException

saveStepAttribute

public void saveStepAttribute(ObjectId id_transformation,
                              ObjectId id_step,
                              int nr,
                              String code,
                              String value)
                       throws KettleException
Specified by:
saveStepAttribute in interface Repository
Throws:
KettleException

saveStepAttribute

public void saveStepAttribute(ObjectId id_transformation,
                              ObjectId id_step,
                              String code,
                              String value)
                       throws KettleException
Specified by:
saveStepAttribute in interface Repository
Throws:
KettleException

saveStepAttribute

public void saveStepAttribute(ObjectId id_transformation,
                              ObjectId id_step,
                              int nr,
                              String code,
                              boolean value)
                       throws KettleException
Specified by:
saveStepAttribute in interface Repository
Throws:
KettleException

saveStepAttribute

public void saveStepAttribute(ObjectId id_transformation,
                              ObjectId id_step,
                              String code,
                              boolean value)
                       throws KettleException
Specified by:
saveStepAttribute in interface Repository
Throws:
KettleException

saveStepAttribute

public void saveStepAttribute(ObjectId id_transformation,
                              ObjectId id_step,
                              int nr,
                              String code,
                              long value)
                       throws KettleException
Specified by:
saveStepAttribute in interface Repository
Throws:
KettleException

saveStepAttribute

public void saveStepAttribute(ObjectId id_transformation,
                              ObjectId id_step,
                              String code,
                              long value)
                       throws KettleException
Specified by:
saveStepAttribute in interface Repository
Throws:
KettleException

saveStepAttribute

public void saveStepAttribute(ObjectId id_transformation,
                              ObjectId id_step,
                              int nr,
                              String code,
                              double value)
                       throws KettleException
Specified by:
saveStepAttribute in interface Repository
Throws:
KettleException

saveStepAttribute

public void saveStepAttribute(ObjectId id_transformation,
                              ObjectId id_step,
                              String code,
                              double value)
                       throws KettleException
Specified by:
saveStepAttribute in interface Repository
Throws:
KettleException

findStepAttributeID

public ObjectId findStepAttributeID(ObjectId id_step,
                                    int nr,
                                    String code)
                             throws KettleException
This method is only used to check backward compatibility with the 2.x series.

Parameters:
id_step -
nr -
code -
Returns:
Throws:
KettleException

execStatement

public void execStatement(String sql)
                   throws KettleException
Throws:
KettleException

loadJobEntry

public void loadJobEntry(JobEntryBase jobEntryBase,
                         ObjectId id_jobentry,
                         List<DatabaseMeta> databases,
                         List<SlaveServer> slaveServers)
                  throws KettleException
Throws:
KettleException

getClusterID

public ObjectId getClusterID(String name)
                      throws KettleException
Specified by:
getClusterID in interface Repository
Throws:
KettleException

getDatabaseID

public ObjectId getDatabaseID(String name)
                       throws KettleException
Specified by:
getDatabaseID in interface Repository
Throws:
KettleException

getJobId

public ObjectId getJobId(String name,
                         RepositoryDirectoryInterface repositoryDirectory)
                  throws KettleException
Specified by:
getJobId in interface Repository
Throws:
KettleException

getPartitionSchemaID

public ObjectId getPartitionSchemaID(String name)
                              throws KettleException
Specified by:
getPartitionSchemaID in interface Repository
Throws:
KettleException

getSlaveID

public ObjectId getSlaveID(String name)
                    throws KettleException
Specified by:
getSlaveID in interface Repository
Throws:
KettleException

getTransformationID

public ObjectId getTransformationID(String name,
                                    RepositoryDirectoryInterface repositoryDirectory)
                             throws KettleException
Specified by:
getTransformationID in interface Repository
Throws:
KettleException

insertJobEntry

public ObjectId insertJobEntry(ObjectId id_job,
                               JobEntryBase jobEntryBase)
                        throws KettleException
Throws:
KettleException

loadDatabaseMetaFromStepAttribute

public DatabaseMeta loadDatabaseMetaFromStepAttribute(ObjectId idStep,
                                                      String code,
                                                      List<DatabaseMeta> databases)
                                               throws KettleException
Description copied from interface: Repository
This method is introduced to avoid having to go over an integer/string/whatever in the interface and the step code.

Specified by:
loadDatabaseMetaFromStepAttribute in interface Repository
Returns:
Throws:
KettleException

saveDatabaseMetaStepAttribute

public void saveDatabaseMetaStepAttribute(ObjectId id_transformation,
                                          ObjectId id_step,
                                          String code,
                                          DatabaseMeta database)
                                   throws KettleException
This method saves the object ID of the database object (if not null) in the step attributes

Specified by:
saveDatabaseMetaStepAttribute in interface Repository
Parameters:
id_transformation -
id_step -
string -
database -
Throws:
KettleException

loadDatabaseMetaFromJobEntryAttribute

public DatabaseMeta loadDatabaseMetaFromJobEntryAttribute(ObjectId id_jobentry,
                                                          String nameCode,
                                                          int nr,
                                                          String idCode,
                                                          List<DatabaseMeta> databases)
                                                   throws KettleException
Description copied from interface: Repository
This method is introduced to avoid having to go over an integer/string/whatever in the interface and the job entry code.

Specified by:
loadDatabaseMetaFromJobEntryAttribute in interface Repository
Returns:
Throws:
KettleException

loadDatabaseMetaFromJobEntryAttribute

public DatabaseMeta loadDatabaseMetaFromJobEntryAttribute(ObjectId id_jobentry,
                                                          String nameCode,
                                                          String idCode,
                                                          List<DatabaseMeta> databases)
                                                   throws KettleException
Description copied from interface: Repository
This method is introduced to avoid having to go over an integer/string/whatever in the interface and the job entry code.

Specified by:
loadDatabaseMetaFromJobEntryAttribute in interface Repository
Returns:
Throws:
KettleException

saveDatabaseMetaJobEntryAttribute

public void saveDatabaseMetaJobEntryAttribute(ObjectId id_job,
                                              ObjectId id_jobentry,
                                              String nameCode,
                                              String idCode,
                                              DatabaseMeta database)
                                       throws KettleException
This method saves the object ID of the database object (if not null) in the step attributes

Specified by:
saveDatabaseMetaJobEntryAttribute in interface Repository
Parameters:
id_transformation -
id_step -
linkCode -
nameCode -
idCode -
database -
Throws:
KettleException

saveDatabaseMetaJobEntryAttribute

public void saveDatabaseMetaJobEntryAttribute(ObjectId id_job,
                                              ObjectId id_jobentry,
                                              int nr,
                                              String nameCode,
                                              String idCode,
                                              DatabaseMeta database)
                                       throws KettleException
This method saves the object ID of the database object (if not null) in the step attributes

Specified by:
saveDatabaseMetaJobEntryAttribute in interface Repository
Parameters:
id_job -
nr -
id_jobentry -
nameCode -
nameCode -
idCode -
database -
Throws:
KettleException

loadConditionFromStepAttribute

public Condition loadConditionFromStepAttribute(ObjectId id_step,
                                                String code)
                                         throws KettleException
Load a condition from the repository with the Object ID stored in a step attribute.

Specified by:
loadConditionFromStepAttribute in interface Repository
Parameters:
id_step -
code -
Returns:
Throws:
KettleException

saveConditionStepAttribute

public void saveConditionStepAttribute(ObjectId id_transformation,
                                       ObjectId id_step,
                                       String code,
                                       Condition condition)
                                throws KettleException
This method saves the object ID of the condition object (if not null) in the step attributes

Specified by:
saveConditionStepAttribute in interface Repository
Parameters:
id_step -
code -
condition -
Throws:
KettleException

getSecurityProvider

public KettleDatabaseRepositorySecurityProvider getSecurityProvider()
Specified by:
getSecurityProvider in interface Repository
Returns:
the securityProvider

getSecurityManager

public KettleDatabaseRepositorySecurityProvider getSecurityManager()
Specified by:
getSecurityManager in interface Repository
Returns:
The security manager for this repository.

undeleteObject

public void undeleteObject(RepositoryElementMetaInterface element)
                    throws KettleException
Description copied from interface: Repository
Removes he deleted flag from a repository element in the repository. If it wasn't deleted, it remains untouched.

Specified by:
undeleteObject in interface Repository
Throws:
KettleException - get throws in case something goes horribly wrong.

getJobAndTransformationObjects

public List<RepositoryElementMetaInterface> getJobAndTransformationObjects(ObjectId id_directory,
                                                                           boolean includeDeleted)
                                                                    throws KettleException
Description copied from interface: Repository
Gets all job and transformation objects in the given directory. (Combines Repository.getJobObjects(ObjectId, boolean) and Repository.getTransformationObjects(ObjectId, boolean) into one operation.

Specified by:
getJobAndTransformationObjects in interface Repository
Parameters:
id_directory - directory
includeDeleted - true to return deleted objects
Returns:
list of repository objects
Throws:
KettleException - In case something goes wrong

getService

public IRepositoryService getService(Class<? extends IRepositoryService> clazz)
                              throws KettleException
Description copied from interface: Repository
Retrieves a given repository service

Specified by:
getService in interface Repository
Returns:
repository service
Throws:
KettleException - in case something goes horribly wrong.

getServiceInterfaces

public List<Class<? extends IRepositoryService>> getServiceInterfaces()
                                                               throws KettleException
Description copied from interface: Repository
Retrieves the current list of of IRepository Services.

Specified by:
getServiceInterfaces in interface Repository
Returns:
List of repository services
Throws:
KettleException - in case something goes horribly wrong.

hasService

public boolean hasService(Class<? extends IRepositoryService> clazz)
                   throws KettleException
Description copied from interface: Repository
Checks whether a given repository service is available or not

Specified by:
hasService in interface Repository
Throws:
KettleException - in case something goes horribly wrong.

getDefaultSaveDirectory

public RepositoryDirectory getDefaultSaveDirectory(RepositoryElementInterface repositoryElement)
                                            throws KettleException
Specified by:
getDefaultSaveDirectory in interface Repository
Throws:
KettleException

getUserHomeDirectory

public RepositoryDirectory getUserHomeDirectory()
                                         throws KettleException
Specified by:
getUserHomeDirectory in interface Repository
Throws:
KettleException

getObjectInformation

public RepositoryObject getObjectInformation(ObjectId objectId,
                                             RepositoryObjectType objectType)
                                      throws KettleException
Description copied from interface: Repository
Get more information about a certain object ID in the form of the RepositoryObject

Specified by:
getObjectInformation in interface Repository
Parameters:
objectId - The ID of the object to get more information about.
objectType - The type of object to investigate.
Returns:
The repository object or null if nothing could be found.
Throws:
KettleException - In case there was a loading problem.

loadJob

public JobMeta loadJob(ObjectId idJob,
                       String versionLabel)
                throws KettleException
Description copied from interface: Repository
Load a job from the repository by id

Specified by:
loadJob in interface Repository
Parameters:
idJob - the id of the job
versionLabel - version to load. Specify null to load the last version.
Throws:
KettleException

loadTransformation

public TransMeta loadTransformation(ObjectId idTransformation,
                                    String versionLabel)
                             throws KettleException
Description copied from interface: Repository
Load a transformation by id

Specified by:
loadTransformation in interface Repository
Parameters:
idTransformation - the id of the transformation to load
versionLabel - version to load. Specify null to load the last version.
Throws:
KettleException

getConnectMessage

public String getConnectMessage()
Description copied from interface: Repository
This is an informational message that a repository can display on connecting within Spoon. If a null is returned, no message is displayed to the end user.

Specified by:
getConnectMessage in interface Repository
Returns:
message

getExporter

public IRepositoryExporter getExporter()
Specified by:
getExporter in interface Repository
Returns:
the exporter that will handle exports from this repository

getImporter

public IRepositoryImporter getImporter()
Specified by:
getImporter in interface Repository
Returns:
the importer that will handle imports into this repository