return false;
}
}
private void getParameters() throws Exception {
Variable_set orderData = null;
try { // to fetch parameters from the job and from orders that have precedence to job parameters
// start processing job parameters
if (spooler_task.params().var("job") != null && spooler_task.params().var("job").length() > 0) {
this.setMonitorJob(spooler_task.params().var("job"));
spooler_log.debug1(".. job parameter [job]: " + this.getMonitorJob());
} else if (this.getMonitorJob() == null || this.getMonitorJob().length() == 0){
this.setMonitorJob(spooler_job.name());
}
if (spooler_task.params().var("type") != null && spooler_task.params().var("type").length() > 0) {
this.setMessageType(spooler_task.params().var("type"));
spooler_log.debug1(".. job parameter [type]: " + this.getMessageType());
}
if (sosString.parseToString(spooler_task.params().var("monitor_job_name")).length() > 0) {
this.setMonitorJobname(spooler_task.params().var("monitor_job_name"));
spooler_log.debug1(".. job parameter [monitor_job_name]: " + this.getMonitorJobname());
} else {
this.setMonitorJobname("");
}
if (sosString.parseToString(spooler_task.params().var("monitor_job_chain_name")).length() > 0) {
this.setMonitorJobChainname(spooler_task.params().var("monitor_job_chain_name"));
spooler_log.debug1(".. job parameter [monitor_job_chain_name]: " + this.getMonitorJobChainname());
} else {
this.setMonitorJobChainname("");
}
if (sosString.parseToString(spooler_task.params().var("log_messages")).length() > 0) {
this.setLogMessages(sosString.parseToBoolean(spooler_task.params().var("log_messages")));
spooler_log.debug1(".. job parameter [log_messages]: " + this.isLogMessages());
}
if (sosString.parseToString(spooler_task.params().var("maximum_lifetime")).length() > 0) {
this.setMaxLifeTime(sosString.parseToString(spooler_task.params().var("maximum_lifetime")));
spooler_log.debug1(".. job parameter [maximum_lifetime]: " + this.getMaxLifeTime());
} else {
this.setMaxLifeTime("");
}
if (sosString.parseToString(spooler_task.params().var("log_file")).length() > 0) {
this.setLogFilename(sosString.parseToString(spooler_task.params().var("log_file")));
spooler_log.debug1(".. job parameter [log_file]: " + this.getLogFilename());
} else {
this.setLogFilename("");
}
// now fetch the order parameters
if (spooler_task.job().order_queue() != null) {
if (order != null) {
orderData = order.params();
if ( orderData.var("type") != null && orderData.var("type").toString().length() > 0) {
this.setMessageType(orderData.var("type").toString());
spooler_log.debug1(".. order parameter [type]: " + this.getMessageType());
}
if(orderData != null && sosString.parseToString(orderData.var("monitor_job_name")).length() > 0) {
this.setMonitorJobname(sosString.parseToString(orderData.var("monitor_job_name")));
spooler_log.debug1(".. order parameter [monitor_job_name]: " + this.getMonitorJobname() );
} else {
this.setMonitorJobname("");
}
if(orderData != null && sosString.parseToString(orderData.var("monitor_job_chain_name")).length() > 0) {
this.setMonitorJobChainname(sosString.parseToString(orderData.var("monitor_job_chain_name")));
spooler_log.debug1(".. order parameter [monitor_job_chain_name]: " + this.getMonitorJobChainname() );
} else {
this.setMonitorJobChainname("");
}
if(orderData != null && sosString.parseToString(orderData.var("log_messages")).length() > 0) {
this.setLogMessages(sosString.parseToBoolean(orderData.var("log_messages")));
spooler_log.debug1(".. order parameter [log_messages]: " + this.isLogMessages() );
}
if(orderData != null && sosString.parseToString(orderData.var("log_file")).length() > 0) {
setLogFilename(sosString.parseToString(orderData.var("log_file")));
spooler_log.debug1(".. order parameter [log_file]: " + this.getLogFilename() );
} else {
setLogFilename("");
}