use of org.pentaho.di.core.exception.KettleXMLException in project pentaho-kettle by pentaho.
the class JobEntryExportRepository 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);
repositoryname = XMLHandler.getTagValue(entrynode, "repositoryname");
username = XMLHandler.getTagValue(entrynode, "username");
password = Encr.decryptPasswordOptionallyEncrypted(XMLHandler.getTagValue(entrynode, "password"));
targetfilename = XMLHandler.getTagValue(entrynode, "targetfilename");
iffileexists = XMLHandler.getTagValue(entrynode, "iffileexists");
export_type = XMLHandler.getTagValue(entrynode, "export_type");
directoryPath = XMLHandler.getTagValue(entrynode, "directoryPath");
add_date = "Y".equalsIgnoreCase(XMLHandler.getTagValue(entrynode, "add_date"));
add_time = "Y".equalsIgnoreCase(XMLHandler.getTagValue(entrynode, "add_time"));
SpecifyFormat = "Y".equalsIgnoreCase(XMLHandler.getTagValue(entrynode, "SpecifyFormat"));
date_time_format = XMLHandler.getTagValue(entrynode, "date_time_format");
createfolder = "Y".equalsIgnoreCase(XMLHandler.getTagValue(entrynode, "createfolder"));
newfolder = "Y".equalsIgnoreCase(XMLHandler.getTagValue(entrynode, "newfolder"));
add_result_filesname = "Y".equalsIgnoreCase(XMLHandler.getTagValue(entrynode, "add_result_filesname"));
nr_errors_less_than = XMLHandler.getTagValue(entrynode, "nr_errors_less_than");
success_condition = XMLHandler.getTagValue(entrynode, "success_condition");
} catch (KettleXMLException xe) {
throw new KettleXMLException(BaseMessages.getString(PKG, "JobExportRepository.Meta.UnableLoadXML"), xe);
}
}
use of org.pentaho.di.core.exception.KettleXMLException in project pentaho-kettle by pentaho.
the class JobEntryFilesExist 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);
filename = XMLHandler.getTagValue(entrynode, "filename");
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);
arguments[i] = XMLHandler.getTagValue(fnode, "name");
}
} catch (KettleXMLException xe) {
throw new KettleXMLException(BaseMessages.getString(PKG, "JobEntryFilesExist.ERROR_0001_Cannot_Load_Job_Entry_From_Xml_Node", xe.getMessage()));
}
}
use of org.pentaho.di.core.exception.KettleXMLException in project pentaho-kettle by pentaho.
the class JobEntryFTPSGet 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);
port = XMLHandler.getTagValue(entrynode, "port");
serverName = XMLHandler.getTagValue(entrynode, "servername");
userName = XMLHandler.getTagValue(entrynode, "username");
password = Encr.decryptPasswordOptionallyEncrypted(XMLHandler.getTagValue(entrynode, "password"));
FTPSDirectory = XMLHandler.getTagValue(entrynode, "FTPSdirectory");
targetDirectory = XMLHandler.getTagValue(entrynode, "targetdirectory");
wildcard = XMLHandler.getTagValue(entrynode, "wildcard");
binaryMode = "Y".equalsIgnoreCase(XMLHandler.getTagValue(entrynode, "binary"));
timeout = Const.toInt(XMLHandler.getTagValue(entrynode, "timeout"), 10000);
remove = "Y".equalsIgnoreCase(XMLHandler.getTagValue(entrynode, "remove"));
onlyGettingNewFiles = "Y".equalsIgnoreCase(XMLHandler.getTagValue(entrynode, "only_new"));
activeConnection = "Y".equalsIgnoreCase(XMLHandler.getTagValue(entrynode, "active"));
movefiles = "Y".equalsIgnoreCase(XMLHandler.getTagValue(entrynode, "movefiles"));
movetodirectory = XMLHandler.getTagValue(entrynode, "movetodirectory");
adddate = "Y".equalsIgnoreCase(XMLHandler.getTagValue(entrynode, "adddate"));
addtime = "Y".equalsIgnoreCase(XMLHandler.getTagValue(entrynode, "addtime"));
SpecifyFormat = "Y".equalsIgnoreCase(XMLHandler.getTagValue(entrynode, "SpecifyFormat"));
date_time_format = XMLHandler.getTagValue(entrynode, "date_time_format");
AddDateBeforeExtension = "Y".equalsIgnoreCase(XMLHandler.getTagValue(entrynode, "AddDateBeforeExtension"));
String addresult = XMLHandler.getTagValue(entrynode, "isaddresult");
if (Utils.isEmpty(addresult)) {
isaddresult = true;
} else {
isaddresult = "Y".equalsIgnoreCase(addresult);
}
createmovefolder = "Y".equalsIgnoreCase(XMLHandler.getTagValue(entrynode, "createmovefolder"));
proxyHost = XMLHandler.getTagValue(entrynode, "proxy_host");
proxyPort = XMLHandler.getTagValue(entrynode, "proxy_port");
proxyUsername = XMLHandler.getTagValue(entrynode, "proxy_username");
proxyPassword = Encr.decryptPasswordOptionallyEncrypted(XMLHandler.getTagValue(entrynode, "proxy_password"));
ifFileExists = getFileExistsIndex(XMLHandler.getTagValue(entrynode, "ifFileExists"));
nr_limit = XMLHandler.getTagValue(entrynode, "nr_limit");
success_condition = Const.NVL(XMLHandler.getTagValue(entrynode, "success_condition"), SUCCESS_IF_NO_ERRORS);
connectionType = FTPSConnection.getConnectionTypeByCode(Const.NVL(XMLHandler.getTagValue(entrynode, "connection_type"), ""));
} catch (Exception xe) {
throw new KettleXMLException("Unable to load job entry of type 'FTPS' from XML node", xe);
}
}
use of org.pentaho.di.core.exception.KettleXMLException in project pentaho-kettle by pentaho.
the class JobEntryGetPOP 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);
servername = XMLHandler.getTagValue(entrynode, "servername");
username = XMLHandler.getTagValue(entrynode, "username");
password = Encr.decryptPasswordOptionallyEncrypted(XMLHandler.getTagValue(entrynode, "password"));
usessl = "Y".equalsIgnoreCase(XMLHandler.getTagValue(entrynode, "usessl"));
sslport = XMLHandler.getTagValue(entrynode, "sslport");
outputdirectory = XMLHandler.getTagValue(entrynode, "outputdirectory");
filenamepattern = XMLHandler.getTagValue(entrynode, "filenamepattern");
if (Utils.isEmpty(filenamepattern)) {
filenamepattern = DEFAULT_FILE_NAME_PATTERN;
}
retrievemails = Const.toInt(XMLHandler.getTagValue(entrynode, "retrievemails"), -1);
firstmails = XMLHandler.getTagValue(entrynode, "firstmails");
delete = "Y".equalsIgnoreCase(XMLHandler.getTagValue(entrynode, "delete"));
protocol = Const.NVL(XMLHandler.getTagValue(entrynode, "protocol"), MailConnectionMeta.PROTOCOL_STRING_POP3);
String sm = XMLHandler.getTagValue(entrynode, "savemessage");
if (Utils.isEmpty(sm)) {
savemessage = true;
} else {
savemessage = "Y".equalsIgnoreCase(sm);
}
String sa = XMLHandler.getTagValue(entrynode, "saveattachment");
if (Utils.isEmpty(sa)) {
saveattachment = true;
} else {
saveattachment = "Y".equalsIgnoreCase(sa);
}
usedifferentfolderforattachment = "Y".equalsIgnoreCase(XMLHandler.getTagValue(entrynode, "usedifferentfolderforattachment"));
attachmentfolder = XMLHandler.getTagValue(entrynode, "attachmentfolder");
attachmentwildcard = XMLHandler.getTagValue(entrynode, "attachmentwildcard");
valueimaplist = MailConnectionMeta.getValueImapListByCode(Const.NVL(XMLHandler.getTagValue(entrynode, "valueimaplist"), ""));
imapfirstmails = XMLHandler.getTagValue(entrynode, "imapfirstmails");
imapfolder = XMLHandler.getTagValue(entrynode, "imapfolder");
// search term
senderSearch = XMLHandler.getTagValue(entrynode, "sendersearch");
notTermSenderSearch = "Y".equalsIgnoreCase(XMLHandler.getTagValue(entrynode, "nottermsendersearch"));
receipientSearch = XMLHandler.getTagValue(entrynode, "receipientsearch");
notTermReceipientSearch = "Y".equalsIgnoreCase(XMLHandler.getTagValue(entrynode, "nottermreceipientsearch"));
subjectSearch = XMLHandler.getTagValue(entrynode, "subjectsearch");
notTermSubjectSearch = "Y".equalsIgnoreCase(XMLHandler.getTagValue(entrynode, "nottermsubjectsearch"));
bodySearch = XMLHandler.getTagValue(entrynode, "bodysearch");
notTermBodySearch = "Y".equalsIgnoreCase(XMLHandler.getTagValue(entrynode, "nottermbodysearch"));
conditionReceivedDate = MailConnectionMeta.getConditionByCode(Const.NVL(XMLHandler.getTagValue(entrynode, "conditionreceiveddate"), ""));
notTermReceivedDateSearch = "Y".equalsIgnoreCase(XMLHandler.getTagValue(entrynode, "nottermreceiveddatesearch"));
receivedDate1 = XMLHandler.getTagValue(entrynode, "receivedDate1");
receivedDate2 = XMLHandler.getTagValue(entrynode, "receivedDate2");
actiontype = MailConnectionMeta.getActionTypeByCode(Const.NVL(XMLHandler.getTagValue(entrynode, "actiontype"), ""));
moveToIMAPFolder = XMLHandler.getTagValue(entrynode, "movetoimapfolder");
createmovetofolder = "Y".equalsIgnoreCase(XMLHandler.getTagValue(entrynode, "createmovetofolder"));
createlocalfolder = "Y".equalsIgnoreCase(XMLHandler.getTagValue(entrynode, "createlocalfolder"));
aftergetimap = MailConnectionMeta.getAfterGetIMAPByCode(Const.NVL(XMLHandler.getTagValue(entrynode, "aftergetimap"), ""));
includesubfolders = "Y".equalsIgnoreCase(XMLHandler.getTagValue(entrynode, "includesubfolders"));
useproxy = "Y".equalsIgnoreCase(XMLHandler.getTagValue(entrynode, "useproxy"));
proxyusername = XMLHandler.getTagValue(entrynode, "proxyusername");
} catch (KettleXMLException xe) {
throw new KettleXMLException("Unable to load job entry of type 'get pop' from XML node", xe);
}
}
use of org.pentaho.di.core.exception.KettleXMLException in project pentaho-kettle by pentaho.
the class JobEntryHTTP method loadXML.
@Override
public void loadXML(Node entrynode, List<DatabaseMeta> databases, List<SlaveServer> slaveServers, Repository rep, IMetaStore metaStore) throws KettleXMLException {
try {
super.loadXML(entrynode, databases, slaveServers);
url = XMLHandler.getTagValue(entrynode, "url");
targetFilename = XMLHandler.getTagValue(entrynode, "targetfilename");
fileAppended = "Y".equalsIgnoreCase(XMLHandler.getTagValue(entrynode, "file_appended"));
dateTimeAdded = "Y".equalsIgnoreCase(XMLHandler.getTagValue(entrynode, "date_time_added"));
targetFilenameExtension = Const.NVL(XMLHandler.getTagValue(entrynode, "targetfilename_extension"), XMLHandler.getTagValue(entrynode, "targetfilename_extention"));
uploadFilename = XMLHandler.getTagValue(entrynode, "uploadfilename");
urlFieldname = XMLHandler.getTagValue(entrynode, "url_fieldname");
uploadFieldname = XMLHandler.getTagValue(entrynode, "upload_fieldname");
destinationFieldname = XMLHandler.getTagValue(entrynode, "dest_fieldname");
runForEveryRow = "Y".equalsIgnoreCase(XMLHandler.getTagValue(entrynode, "run_every_row"));
username = XMLHandler.getTagValue(entrynode, "username");
password = Encr.decryptPasswordOptionallyEncrypted(XMLHandler.getTagValue(entrynode, "password"));
proxyHostname = XMLHandler.getTagValue(entrynode, "proxy_host");
proxyPort = XMLHandler.getTagValue(entrynode, "proxy_port");
nonProxyHosts = XMLHandler.getTagValue(entrynode, "non_proxy_hosts");
addfilenameresult = "Y".equalsIgnoreCase(Const.NVL(XMLHandler.getTagValue(entrynode, "addfilenameresult"), "Y"));
Node headers = XMLHandler.getSubNode(entrynode, "headers");
// How many field headerName?
int nrHeaders = XMLHandler.countNodes(headers, "header");
allocate(nrHeaders);
for (int i = 0; i < nrHeaders; i++) {
Node fnode = XMLHandler.getSubNodeByNr(headers, "header", i);
headerName[i] = XMLHandler.getTagValue(fnode, "header_name");
headerValue[i] = XMLHandler.getTagValue(fnode, "header_value");
}
} catch (KettleXMLException xe) {
throw new KettleXMLException("Unable to load job entry of type 'HTTP' from XML node", xe);
}
}
Aggregations