Exemple #1
0
 /**
  * Get a processing configuration as integer or null if not set
  *
  * @param pConfigKey configuration to lookup
  * @return integer value of configuration or 0 if not set.
  */
 public int getParameterAsInt(ConfigKey pConfigKey) {
   String intValueS = processingConfig.get(pConfigKey);
   if (intValueS != null) {
     return Integer.parseInt(intValueS);
   } else {
     return 0;
   }
 }
Exemple #2
0
 // Init parameters and value fault handler
 private void initParameters(ProcessingParameters pParams) {
   processingConfig = pParams;
   String ignoreErrors = processingConfig.get(ConfigKey.IGNORE_ERRORS);
   if (ignoreErrors != null && ignoreErrors.matches("^(true|yes|on|1)$")) {
     valueFaultHandler = ValueFaultHandler.IGNORING_VALUE_FAULT_HANDLER;
   } else {
     valueFaultHandler = ValueFaultHandler.THROWING_VALUE_FAULT_HANDLER;
   }
 }
Exemple #3
0
 /**
  * Get a processing configuration or null if not set
  *
  * @param pConfigKey configuration key to fetch
  * @return string value or <code>null</code> if not set
  */
 public String getParameter(ConfigKey pConfigKey) {
   return processingConfig.get(pConfigKey);
 }