public class RepositoryImporter extends Object implements IRepositoryImporter, CanLimitDirs
| Modifier and Type | Field and Description | 
|---|---|
static String | 
IMPORT_ASK_ABOUT_REPLACE_CS  | 
static String | 
IMPORT_ASK_ABOUT_REPLACE_DB  | 
static String | 
IMPORT_ASK_ABOUT_REPLACE_PS  | 
static String | 
IMPORT_ASK_ABOUT_REPLACE_SS  | 
| Constructor and Description | 
|---|
RepositoryImporter(Repository repository)  | 
RepositoryImporter(Repository repository,
                  ImportRules importRules,
                  List<String> limitDirs)  | 
RepositoryImporter(Repository repository,
                  ImportRules importRules,
                  List<String> limitDirs,
                  org.pentaho.di.core.logging.LogChannelInterface log)  | 
RepositoryImporter(Repository repository,
                  org.pentaho.di.core.logging.LogChannelInterface log)  | 
| Modifier and Type | Method and Description | 
|---|---|
void | 
addLog(String line)  | 
boolean | 
askContinueOnErrorQuestion(String title,
                          String message)  | 
void | 
beginTask(String message,
         int nrWorks)  | 
void | 
done()  | 
void | 
fatalXmlErrorEncountered(SAXParseException e)  | 
List<Exception> | 
getExceptions()
Returns a list of exceptions that the implementation may maintain. 
 | 
ImportRules | 
getImportRules()  | 
String | 
getJobDirOverride()  | 
String | 
getTransDirOverride()  | 
String | 
getVersionComment()  | 
void | 
importAll(RepositoryImportFeedbackInterface feedback,
         String fileDirectory,
         String[] filenames,
         org.pentaho.di.repository.RepositoryDirectoryInterface baseDirectory,
         boolean overwrite,
         boolean continueOnError,
         String versionComment)
Import objects from an XML document to a repository. 
 | 
boolean | 
isAskingOverwriteConfirmation()  | 
boolean | 
isCanceled()  | 
boolean | 
jobElementRead(String xml,
              RepositoryImportFeedbackInterface feedback)  | 
boolean | 
jobOverwritePrompt(JobMeta jobMeta)  | 
void | 
setImportRules(ImportRules importRules)
Set the list of rules that need to be applied to every imported object. 
 | 
void | 
setJobDirOverride(String jobDirOverride)
Overrides repository directory for all imported jobs. 
 | 
void | 
setLabel(String labelText)  | 
void | 
setLimitDirs(List<String> limitDirs)  | 
void | 
setOverwrite(boolean overwrite)  | 
void | 
setTaskName(String taskName)  | 
void | 
setTransDirOverride(String transDirOverride)
Overrides repository directory for all imported transformations. 
 | 
void | 
showError(String title,
         String message,
         Exception e)  | 
void | 
subTask(String message)  | 
boolean | 
transformationElementRead(String xml,
                         RepositoryImportFeedbackInterface feedback)  | 
boolean | 
transOverwritePrompt(TransMeta transMeta)  | 
void | 
updateDisplay()  | 
static void | 
validateImportedElement(ImportRules importRules,
                       Object subject)
Validates the repository element that is about to get imported against the list of import rules. 
 | 
void | 
worked(int nrWorks)  | 
public static final String IMPORT_ASK_ABOUT_REPLACE_DB
public static final String IMPORT_ASK_ABOUT_REPLACE_SS
public static final String IMPORT_ASK_ABOUT_REPLACE_CS
public static final String IMPORT_ASK_ABOUT_REPLACE_PS
public RepositoryImporter(Repository repository)
public RepositoryImporter(Repository repository, org.pentaho.di.core.logging.LogChannelInterface log)
public RepositoryImporter(Repository repository, ImportRules importRules, List<String> limitDirs)
public RepositoryImporter(Repository repository, ImportRules importRules, List<String> limitDirs, org.pentaho.di.core.logging.LogChannelInterface log)
public void importAll(RepositoryImportFeedbackInterface feedback, String fileDirectory, String[] filenames, org.pentaho.di.repository.RepositoryDirectoryInterface baseDirectory, boolean overwrite, boolean continueOnError, String versionComment)
IRepositoryImporterimportAll in interface IRepositoryImporterfeedback - Required to provide feedback to the user.fileDirectory - Base directory to load files (named filenames) fromfilenames - Names of files found in fileDirectory to be imported.baseDirectory - Base directory to load objects into.overwrite - Should objects in the repository be overwritten with ones we're importing?continueOnError - Should the import continue if there is an error importing an object?versionComment - Comment to use when saving imported objects.public static void validateImportedElement(ImportRules importRules, Object subject) throws org.pentaho.di.core.exception.KettleException
importRules - import rules to validate against.subject - org.pentaho.di.core.exception.KettleExceptionpublic void addLog(String line)
addLog in interface RepositoryImportFeedbackInterfacepublic void setLabel(String labelText)
setLabel in interface RepositoryImportFeedbackInterfacepublic boolean transOverwritePrompt(TransMeta transMeta)
transOverwritePrompt in interface RepositoryImportFeedbackInterfacepublic boolean jobOverwritePrompt(JobMeta jobMeta)
jobOverwritePrompt in interface RepositoryImportFeedbackInterfacepublic void updateDisplay()
updateDisplay in interface RepositoryImportFeedbackInterfacepublic void showError(String title, String message, Exception e)
showError in interface RepositoryImportFeedbackInterfacepublic boolean transformationElementRead(String xml, RepositoryImportFeedbackInterface feedback)
transformationElementRead in interface RepositoryElementReadListenerpublic boolean jobElementRead(String xml, RepositoryImportFeedbackInterface feedback)
jobElementRead in interface RepositoryElementReadListenerpublic void fatalXmlErrorEncountered(SAXParseException e)
fatalXmlErrorEncountered in interface RepositoryElementReadListenerpublic boolean askContinueOnErrorQuestion(String title, String message)
askContinueOnErrorQuestion in interface RepositoryImportFeedbackInterfacepublic void beginTask(String message, int nrWorks)
beginTask in interface org.pentaho.di.core.ProgressMonitorListenerpublic void done()
done in interface org.pentaho.di.core.ProgressMonitorListenerpublic boolean isCanceled()
isCanceled in interface org.pentaho.di.core.ProgressMonitorListenerpublic void setTaskName(String taskName)
setTaskName in interface org.pentaho.di.core.ProgressMonitorListenerpublic void subTask(String message)
subTask in interface org.pentaho.di.core.ProgressMonitorListenerpublic void worked(int nrWorks)
worked in interface org.pentaho.di.core.ProgressMonitorListenerpublic String getTransDirOverride()
public void setTransDirOverride(String transDirOverride)
IRepositoryImportersetTransDirOverride in interface IRepositoryImporterpublic String getJobDirOverride()
public void setJobDirOverride(String jobDirOverride)
IRepositoryImportersetJobDirOverride in interface IRepositoryImporterpublic void setImportRules(ImportRules importRules)
IRepositoryImportersetImportRules in interface IRepositoryImporterimportRules - The rules to use during import into the repositorypublic ImportRules getImportRules()
public boolean isAskingOverwriteConfirmation()
isAskingOverwriteConfirmation in interface RepositoryImportFeedbackInterfacepublic List<Exception> getExceptions()
IRepositoryImportergetExceptions in interface IRepositoryImporterpublic void setLimitDirs(List<String> limitDirs)
setLimitDirs in interface CanLimitDirspublic void setOverwrite(boolean overwrite)
public String getVersionComment()