use of org.pentaho.di.core.exception.KettleXMLException in project pentaho-kettle by pentaho.
the class JobEntryConnectedToRepository method loadXML.
public void loadXML(Node entrynode, List<DatabaseMeta> databases, List<SlaveServer> slaveServers, Repository rep, IMetaStore metaStore) throws KettleXMLException {
try {
super.loadXML(entrynode, databases, slaveServers);
isspecificrep = "Y".equalsIgnoreCase(XMLHandler.getTagValue(entrynode, "isspecificrep"));
repname = XMLHandler.getTagValue(entrynode, "repname");
isspecificuser = "Y".equalsIgnoreCase(XMLHandler.getTagValue(entrynode, "isspecificuser"));
username = XMLHandler.getTagValue(entrynode, "username");
} catch (Exception e) {
throw new KettleXMLException(BaseMessages.getString(PKG, "JobEntryConnectedToRepository.Meta.UnableToLoadFromXML"), e);
}
}
use of org.pentaho.di.core.exception.KettleXMLException in project pentaho-kettle by pentaho.
the class JobEntryCopyFiles method loadXML.
public void loadXML(Node entrynode, List<DatabaseMeta> databases, List<SlaveServer> slaveServers, Repository rep, IMetaStore metaStore) throws KettleXMLException {
try {
super.loadXML(entrynode, databases, slaveServers);
copy_empty_folders = "Y".equalsIgnoreCase(XMLHandler.getTagValue(entrynode, "copy_empty_folders"));
arg_from_previous = "Y".equalsIgnoreCase(XMLHandler.getTagValue(entrynode, "arg_from_previous"));
overwrite_files = "Y".equalsIgnoreCase(XMLHandler.getTagValue(entrynode, "overwrite_files"));
include_subfolders = "Y".equalsIgnoreCase(XMLHandler.getTagValue(entrynode, "include_subfolders"));
remove_source_files = "Y".equalsIgnoreCase(XMLHandler.getTagValue(entrynode, "remove_source_files"));
add_result_filesname = "Y".equalsIgnoreCase(XMLHandler.getTagValue(entrynode, "add_result_filesname"));
destination_is_a_file = "Y".equalsIgnoreCase(XMLHandler.getTagValue(entrynode, "destination_is_a_file"));
create_destination_folder = "Y".equalsIgnoreCase(XMLHandler.getTagValue(entrynode, "create_destination_folder"));
Node fields = XMLHandler.getSubNode(entrynode, "fields");
// How many field arguments?
int nrFields = XMLHandler.countNodes(fields, "field");
allocate(nrFields);
// Read them all...
for (int i = 0; i < nrFields; i++) {
Node fnode = XMLHandler.getSubNodeByNr(fields, "field", i);
source_filefolder[i] = loadSource(fnode);
destination_filefolder[i] = loadDestination(fnode);
wildcard[i] = XMLHandler.getTagValue(fnode, "wildcard");
}
} catch (KettleXMLException xe) {
throw new KettleXMLException(BaseMessages.getString(PKG, "JobCopyFiles.Error.Exception.UnableLoadXML"), xe);
}
}
use of org.pentaho.di.core.exception.KettleXMLException in project pentaho-kettle by pentaho.
the class JobEntryCopyMoveResultFilenames method saveRep.
public void saveRep(Repository rep, IMetaStore metaStore, ObjectId id_job) throws KettleException {
try {
rep.saveJobEntryAttribute(id_job, getObjectId(), "foldername", foldername);
rep.saveJobEntryAttribute(id_job, getObjectId(), "specify_wildcard", specifywildcard);
rep.saveJobEntryAttribute(id_job, getObjectId(), "wildcard", wildcard);
rep.saveJobEntryAttribute(id_job, getObjectId(), "wildcardexclude", wildcardexclude);
rep.saveJobEntryAttribute(id_job, getObjectId(), "destination_folder", destination_folder);
rep.saveJobEntryAttribute(id_job, getObjectId(), "nr_errors_less_than", nr_errors_less_than);
rep.saveJobEntryAttribute(id_job, getObjectId(), "success_condition", success_condition);
rep.saveJobEntryAttribute(id_job, getObjectId(), "add_date", add_date);
rep.saveJobEntryAttribute(id_job, getObjectId(), "add_time", add_time);
rep.saveJobEntryAttribute(id_job, getObjectId(), "SpecifyFormat", SpecifyFormat);
rep.saveJobEntryAttribute(id_job, getObjectId(), "date_time_format", date_time_format);
rep.saveJobEntryAttribute(id_job, getObjectId(), "AddDateBeforeExtension", AddDateBeforeExtension);
rep.saveJobEntryAttribute(id_job, getObjectId(), "action", action);
rep.saveJobEntryAttribute(id_job, getObjectId(), "OverwriteFile", OverwriteFile);
rep.saveJobEntryAttribute(id_job, getObjectId(), "CreateDestinationFolder", CreateDestinationFolder);
rep.saveJobEntryAttribute(id_job, getObjectId(), "RemovedSourceFilename", RemovedSourceFilename);
rep.saveJobEntryAttribute(id_job, getObjectId(), "AddDestinationFilename", AddDestinationFilename);
} catch (KettleDatabaseException dbe) {
throw new KettleXMLException(BaseMessages.getString(PKG, "JobEntryCopyMoveResultFilenames.CanNotSaveToRep", "" + id_job, dbe.getMessage()));
}
}
use of org.pentaho.di.core.exception.KettleXMLException in project pentaho-kettle by pentaho.
the class JobEntryCopyMoveResultFilenames method loadRep.
public void loadRep(Repository rep, IMetaStore metaStore, ObjectId id_jobentry, List<DatabaseMeta> databases, List<SlaveServer> slaveServers) throws KettleException {
try {
foldername = rep.getJobEntryAttributeString(id_jobentry, "foldername");
specifywildcard = rep.getJobEntryAttributeBoolean(id_jobentry, "specify_wildcard");
wildcard = rep.getJobEntryAttributeString(id_jobentry, "wildcard");
wildcardexclude = rep.getJobEntryAttributeString(id_jobentry, "wildcardexclude");
destination_folder = rep.getJobEntryAttributeString(id_jobentry, "destination_folder");
nr_errors_less_than = rep.getJobEntryAttributeString(id_jobentry, "nr_errors_less_than");
success_condition = rep.getJobEntryAttributeString(id_jobentry, "success_condition");
add_date = rep.getJobEntryAttributeBoolean(id_jobentry, "add_date");
add_time = rep.getJobEntryAttributeBoolean(id_jobentry, "add_time");
SpecifyFormat = rep.getJobEntryAttributeBoolean(id_jobentry, "SpecifyFormat");
date_time_format = rep.getJobEntryAttributeString(id_jobentry, "date_time_format");
AddDateBeforeExtension = rep.getJobEntryAttributeBoolean(id_jobentry, "AddDateBeforeExtension");
action = rep.getJobEntryAttributeString(id_jobentry, "action");
OverwriteFile = rep.getJobEntryAttributeBoolean(id_jobentry, "OverwriteFile");
CreateDestinationFolder = rep.getJobEntryAttributeBoolean(id_jobentry, "CreateDestinationFolder");
RemovedSourceFilename = rep.getJobEntryAttributeBoolean(id_jobentry, "RemovedSourceFilename");
AddDestinationFilename = rep.getJobEntryAttributeBoolean(id_jobentry, "AddDestinationFilename");
} catch (KettleException dbe) {
throw new KettleXMLException(BaseMessages.getString(PKG, "JobEntryCopyMoveResultFilenames.CanNotLoadFromRep", "" + id_jobentry, dbe.getMessage()));
}
}
use of org.pentaho.di.core.exception.KettleXMLException in project pentaho-kettle by pentaho.
the class JobEntryCreateFolder method loadXML.
public void loadXML(Node entrynode, List<DatabaseMeta> databases, List<SlaveServer> slaveServers, Repository rep, IMetaStore metaStore) throws KettleXMLException {
try {
super.loadXML(entrynode, databases, slaveServers);
foldername = XMLHandler.getTagValue(entrynode, "foldername");
failOfFolderExists = "Y".equalsIgnoreCase(XMLHandler.getTagValue(entrynode, "fail_of_folder_exists"));
} catch (KettleXMLException xe) {
throw new KettleXMLException("Unable to load job entry of type 'create folder' from XML node", xe);
}
}
Aggregations