/** * Creates a new JSLProperties list from a java.util.Properties * object. * * @param xmlProperties * @return */ public static JSLProperties javaPropsTojslProperties(final Properties javaProps) { JSLProperties newJSLProps = jslFactory.createJSLProperties(); Enumeration<?> keySet = javaProps.propertyNames(); while (keySet.hasMoreElements()) { String key = (String)keySet.nextElement(); String value = javaProps.getProperty(key); Property newProperty = jslFactory.createProperty(); newProperty.setName(key); newProperty.setValue(value); newJSLProps.getPropertyList().add(newProperty); } return newJSLProps; }
/** * Creates a new JSLProperties list from a java.util.Properties * object. * * @param xmlProperties * @return */ public static JSLProperties javaPropsTojslProperties(final Properties javaProps) { JSLProperties newJSLProps = jslFactory.createJSLProperties(); Enumeration<?> keySet = javaProps.propertyNames(); while (keySet.hasMoreElements()) { String key = (String)keySet.nextElement(); String value = javaProps.getProperty(key); Property newProperty = jslFactory.createProperty(); newProperty.setName(key); newProperty.setValue(value); newJSLProps.getPropertyList().add(newProperty); } return newJSLProps; }
/** * Creates a new JSLProperties list from a java.util.Properties * object. * * @param javaProps * @return */ public static JSLProperties javaPropsTojslProperties(final Properties javaProps) { JSLProperties newJSLProps = jslFactory.createJSLProperties(); Enumeration<?> keySet = javaProps.propertyNames(); while (keySet.hasMoreElements()) { String key = (String)keySet.nextElement(); String value = javaProps.getProperty(key); Property newProperty = jslFactory.createProperty(); newProperty.setName(key); newProperty.setValue(value); newJSLProps.getPropertyList().add(newProperty); } return newJSLProps; }
ObjectFactory jslFactory = new ObjectFactory(); Property jobName = jslFactory.createProperty(); jobName.setName(TOP_LEVEL_JOB_NAME_PROP); jobName.setValue(getJobName()); properties.getPropertyList().add(jobName); Property instanceId = jslFactory.createProperty(); instanceId.setName(TOP_LEVEL_INSTANCE_ID_PROP); instanceId.setValue(String.valueOf(getInstanceId())); properties.getPropertyList().add(instanceId); Property executionId = jslFactory.createProperty(); executionId.setName(TOP_LEVEL_EXECUTION_ID_PROP); executionId.setValue(String.valueOf(getExecutionId()));
public static JSLProperties cloneJSLProperties(JSLProperties jslProps) { if (jslProps == null) { return null; } JSLProperties newJSLProps = jslFactory.createJSLProperties(); newJSLProps.setPartition(jslProps.getPartition());; for(Property jslProp : jslProps.getPropertyList()) { Property newProperty = jslFactory.createProperty(); newProperty.setName(jslProp.getName()); newProperty.setValue(jslProp.getValue()); newJSLProps.getPropertyList().add(newProperty); } return newJSLProps; }
public static JSLProperties cloneJSLProperties(JSLProperties jslProps) { if (jslProps == null) { return null; } JSLProperties newJSLProps = jslFactory.createJSLProperties(); newJSLProps.setPartition(jslProps.getPartition());; for(Property jslProp : jslProps.getPropertyList()) { Property newProperty = jslFactory.createProperty(); newProperty.setName(jslProp.getName()); newProperty.setValue(jslProp.getValue()); newJSLProps.getPropertyList().add(newProperty); } return newJSLProps; }
public static JSLProperties cloneJSLProperties(JSLProperties jslProps) { if (jslProps == null) { return null; } JSLProperties newJSLProps = jslFactory.createJSLProperties(); newJSLProps.setPartition(jslProps.getPartition());; for(Property jslProp : jslProps.getPropertyList()) { Property newProperty = jslFactory.createProperty(); newProperty.setName(jslProp.getName()); newProperty.setValue(jslProp.getValue()); newJSLProps.getPropertyList().add(newProperty); } return newJSLProps; }
Property jobName = jslFactory.createProperty(); jobName.setName(StepContextImpl.TOP_LEVEL_STEP_EXECUTION_ID_PROP);