public static String getString(JSLProperties props) { if (props == null) return null; StringBuffer buf = new StringBuffer(150); for (Property prop : props.getPropertyList()) { buf.append("name=" + prop.getName() + ",value=" + prop.getValue() + "\n"); } return buf.toString(); } }
public static String getString(JSLProperties props) { if (props == null) return null; StringBuffer buf = new StringBuffer(150); for (Property prop : props.getPropertyList()) { buf.append("name=" + prop.getName() + ",value=" + prop.getValue() + "\n"); } return buf.toString(); } }
private Properties convertJSProperties(JSLProperties jslProperties) { Properties jobProperties = new Properties(); if(jslProperties != null) { // null if not job properties defined. for (Property property : jslProperties.getPropertyList()) { jobProperties.setProperty(property.getName(), property.getValue()); } } return jobProperties; }
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; }
private ListenerInfo buildListenerInfo(Listener listener, InjectionReferences injectionRefs) { String id = listener.getRef(); List<Property> propList = (listener.getProperties() == null) ? null : listener.getProperties().getPropertyList(); injectionRefs.setProps(propList); Object listenerArtifact = ProxyFactory.loadArtifact(id, injectionRefs); if (listenerArtifact == null) { throw new IllegalArgumentException("Load of artifact id: " + id + " returned <null>."); } ListenerInfo info = new ListenerInfo(listenerArtifact, propList); return info; }
private ListenerInfo buildListenerInfo(Listener listener, InjectionReferences injectionRefs) { String id = listener.getRef(); List<Property> propList = (listener.getProperties() == null) ? null : listener.getProperties().getPropertyList(); injectionRefs.setProps(propList); Object listenerArtifact = ProxyFactory.loadArtifact(id, injectionRefs); if (listenerArtifact == null) { throw new IllegalArgumentException("Load of artifact id: " + id + " returned <null>."); } ListenerInfo info = new ListenerInfo(listenerArtifact, propList); return info; }
protected void setContextProperties() { JSLJob jobModel = jobExecution.getJobNavigator().getRootModelElement(); JSLProperties jslProps = jobModel.getProperties(); if (jslProps != null) { Properties contextProps = jobContext.getJSLProperties(); for (Property property : jslProps.getPropertyList()) { contextProps.setProperty(property.getName(), property.getValue()); } } }
@Override public Listener substituteProperties(final Listener listener, final Properties submittedProps, final Properties parentProps) { //resolve all the properties used in attributes and update the JAXB model listener.setRef(this.replaceAllProperties(listener.getRef(), submittedProps, parentProps)); // Resolve all the properties defined for this listener if (listener.getProperties() != null) { this.resolveElementProperties(listener.getProperties().getPropertyList(), submittedProps, parentProps); } return listener; }
@Override public CheckpointAlgorithm substituteProperties(final CheckpointAlgorithm checkpointalgorithm, final Properties submittedProps, final Properties parentProps) { //resolve all the properties used in attributes and update the JAXB model checkpointalgorithm.setRef(this.replaceAllProperties(checkpointalgorithm.getRef(), submittedProps, parentProps)); // Resolve all the properties defined for this checkpoint algorithm if (checkpointalgorithm.getProperties() != null) { this.resolveElementProperties(checkpointalgorithm.getProperties().getPropertyList(), submittedProps, parentProps); } return checkpointalgorithm; }
@Override public ItemWriter substituteProperties(ItemWriter writer, Properties submittedProps, Properties parentProps) { //resolve all the properties used in attributes and update the JAXB model writer.setRef(this.replaceAllProperties(writer.getRef(), submittedProps, parentProps)); // Resolve all the properties defined for this artifact if (writer.getProperties() != null) { this.resolveElementProperties(writer.getProperties().getPropertyList(), submittedProps, parentProps); } return writer; }
@Override public Listener substituteProperties(final Listener listener, final Properties submittedProps, final Properties parentProps) { //resolve all the properties used in attributes and update the JAXB model listener.setRef(this.replaceAllProperties(listener.getRef(), submittedProps, parentProps)); // Resolve all the properties defined for this listener if (listener.getProperties() != null) { this.resolveElementProperties(listener.getProperties().getPropertyList(), submittedProps, parentProps); } return listener; }
@Override public CheckpointAlgorithm substituteProperties(final CheckpointAlgorithm checkpointalgorithm, final Properties submittedProps, final Properties parentProps) { //resolve all the properties used in attributes and update the JAXB model checkpointalgorithm.setRef(this.replaceAllProperties(checkpointalgorithm.getRef(), submittedProps, parentProps)); // Resolve all the properties defined for this checkpoint algorithm if (checkpointalgorithm.getProperties() != null) { this.resolveElementProperties(checkpointalgorithm.getProperties().getPropertyList(), submittedProps, parentProps); } return checkpointalgorithm; }
@Override public ItemProcessor substituteProperties(ItemProcessor processor, Properties submittedProps, Properties parentProps) { //resolve all the properties used in attributes and update the JAXB model processor.setRef(this.replaceAllProperties(processor.getRef(), submittedProps, parentProps)); // Resolve all the properties defined for this artifact if (processor.getProperties() != null) { this.resolveElementProperties(processor.getProperties().getPropertyList(), submittedProps, parentProps); } return processor; }
@Override public ItemReader substituteProperties(ItemReader reader, Properties submittedProps, Properties parentProps) { //resolve all the properties used in attributes and update the JAXB model reader.setRef(this.replaceAllProperties(reader.getRef(), submittedProps, parentProps)); // Resolve all the properties defined for this artifact if (reader.getProperties() != null) { this.resolveElementProperties(reader.getProperties().getPropertyList(), submittedProps, parentProps); } return reader; }
@Override public ItemProcessor substituteProperties(ItemProcessor processor, Properties submittedProps, Properties parentProps) { //resolve all the properties used in attributes and update the JAXB model processor.setRef(this.replaceAllProperties(processor.getRef(), submittedProps, parentProps)); // Resolve all the properties defined for this artifact if (processor.getProperties() != null) { this.resolveElementProperties(processor.getProperties().getPropertyList(), submittedProps, parentProps); } return processor; }
@Override public ItemWriter substituteProperties(ItemWriter writer, Properties submittedProps, Properties parentProps) { //resolve all the properties used in attributes and update the JAXB model writer.setRef(this.replaceAllProperties(writer.getRef(), submittedProps, parentProps)); // Resolve all the properties defined for this artifact if (writer.getProperties() != null) { this.resolveElementProperties(writer.getProperties().getPropertyList(), submittedProps, parentProps); } return writer; }
@Override public Batchlet substituteProperties(final Batchlet batchlet, final Properties submittedProps, final Properties parentProps) { //resolve all the properties used in attributes and update the JAXB model batchlet.setRef(this.replaceAllProperties(batchlet.getRef(), submittedProps, parentProps)); // Resolve all the properties defined for this batchlet if (batchlet.getProperties() != null) { this.resolveElementProperties(batchlet.getProperties().getPropertyList(), submittedProps, parentProps); } return batchlet; }
@Override public ItemWriter substituteProperties(ItemWriter writer, Properties submittedProps, Properties parentProps) { //resolve all the properties used in attributes and update the JAXB model writer.setRef(this.replaceAllProperties(writer.getRef(), submittedProps, parentProps)); // Resolve all the properties defined for this artifact if (writer.getProperties() != null) { this.resolveElementProperties(writer.getProperties().getPropertyList(), submittedProps, parentProps); } return writer; }
@Override public ItemReader substituteProperties(ItemReader reader, Properties submittedProps, Properties parentProps) { //resolve all the properties used in attributes and update the JAXB model reader.setRef(this.replaceAllProperties(reader.getRef(), submittedProps, parentProps)); // Resolve all the properties defined for this artifact if (reader.getProperties() != null) { this.resolveElementProperties(reader.getProperties().getPropertyList(), submittedProps, parentProps); } return reader; }
@Override public Batchlet substituteProperties(final Batchlet batchlet, final Properties submittedProps, final Properties parentProps) { //resolve all the properties used in attributes and update the JAXB model batchlet.setRef(this.replaceAllProperties(batchlet.getRef(), submittedProps, parentProps)); // Resolve all the properties defined for this batchlet if (batchlet.getProperties() != null) { this.resolveElementProperties(batchlet.getProperties().getPropertyList(), submittedProps, parentProps); } return batchlet; }