use of org.talend.mdm.repository.model.mdmserverobject.WSTransformerVariablesMappingE in project tmdm-studio-se by Talend.
the class ProcessStepFactory method createEscapeStep.
private static WSTransformerProcessStepE createEscapeStep(Object param) {
// Generate the XSLT step to retrieve the item from an update report
// step
WSTransformerProcessStepE step = MdmserverobjectFactory.eINSTANCE.createWSTransformerProcessStepE();
List<WSTransformerVariablesMappingE> inItems = new ArrayList<WSTransformerVariablesMappingE>();
WSTransformerVariablesMappingE inputLine = MdmserverobjectFactory.eINSTANCE.createWSTransformerVariablesMappingE();
inputLine.setPipelineVariable(VAR_ITEM_XML);
inputLine.setPluginVariable(VAR_LAW_TEXT);
inItems.add(inputLine);
List<WSTransformerVariablesMappingE> outItems = new ArrayList<WSTransformerVariablesMappingE>();
WSTransformerVariablesMappingE outputLine = MdmserverobjectFactory.eINSTANCE.createWSTransformerVariablesMappingE();
outputLine.setPipelineVariable(VAR_DECODE_XML);
outputLine.setPluginVariable(VAR_CODEC_TEXT);
outItems.add(outputLine);
step.setPluginJNDI(CODEC_PLUGIN);
// $NON-NLS-1$
step.setDescription("Escape the item XML");
String parameter = // $NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
"<parameters>\n" + "<method>DECODE</method>\n" + "<algorithm>XMLESCAPE</algorithm>\n" + // $NON-NLS-1$
"</parameters>\n";
step.setParameters(parameter);
step.getInputMappings().addAll(inItems);
step.getOutputMappings().addAll(outItems);
step.setDisabled(false);
return step;
}
use of org.talend.mdm.repository.model.mdmserverobject.WSTransformerVariablesMappingE in project tmdm-studio-se by Talend.
the class ProcessStepFactory method createUpdateReportStep.
private static WSTransformerProcessStepE createUpdateReportStep(Object param) {
String itemstr = // $NON-NLS-1$
"<xsl:stylesheet xmlns:xsl=\"http://www.w3.org/1999/XSL/Transform\" xmlns:mdm=\"java:com.amalto.core.plugin.base.xslt.MdmExtension\" version=\"1.0\"> <xsl:output method=\"xml\" indent=\"yes\" omit-xml-declaration=\"yes\" /> <xsl:template match=\"/\" priority=\"1\">\n" + // $NON-NLS-1$
"<exchange> <report>\n <xsl:copy-of select=\"Update\"/> </report> <item><xsl:copy-of select='mdm:getItemProjection(Update/RevisionID,Update/DataCluster,Update/Concept,Update/Key)'/></item></exchange> " + // $NON-NLS-1$
"</xsl:template> </xsl:stylesheet>\n";
List<WSTransformerVariablesMappingE> inItems;
List<WSTransformerVariablesMappingE> outItems;
WSTransformerProcessStepE step = MdmserverobjectFactory.eINSTANCE.createWSTransformerProcessStepE();
inItems = new ArrayList<WSTransformerVariablesMappingE>();
WSTransformerVariablesMappingE inputLine = MdmserverobjectFactory.eINSTANCE.createWSTransformerVariablesMappingE();
inputLine.setPipelineVariable(VAR_DEFAULT);
inputLine.setPluginVariable(VAR_XML);
inItems.add(inputLine);
outItems = new ArrayList<WSTransformerVariablesMappingE>();
WSTransformerVariablesMappingE outputLine = MdmserverobjectFactory.eINSTANCE.createWSTransformerVariablesMappingE();
outputLine.setPipelineVariable(VAR_ITEM_XML);
outputLine.setPluginVariable(VAR_TEXT);
outItems.add(outputLine);
step.setPluginJNDI(XSLT_PLUGIN);
// $NON-NLS-1$
step.setDescription("UpdateReport");
step.setParameters(itemstr);
step.getInputMappings().addAll(inItems);
step.getOutputMappings().addAll(outItems);
step.setDisabled(false);
return step;
}
use of org.talend.mdm.repository.model.mdmserverobject.WSTransformerVariablesMappingE in project tmdm-studio-se by Talend.
the class ProcessStepFactory method createCallJobStep.
public static WSTransformerProcessStepE createCallJobStep(String jobName, String outputPipelineVariable, String pipleName) {
String parameters = // $NON-NLS-1$ //$NON-NLS-2$
"<configuration><url>ltj://" + jobName + "/0.1</url>" + "<contextParam><name>xmlInput</name><value>{" + pipleName + // $NON-NLS-1$ //$NON-NLS-2$
"}</value></contextParam></configuration>";
List<WSTransformerVariablesMappingE> inItems;
List<WSTransformerVariablesMappingE> outItems;
WSTransformerProcessStepE step = MdmserverobjectFactory.eINSTANCE.createWSTransformerProcessStepE();
inItems = new ArrayList<WSTransformerVariablesMappingE>();
WSTransformerVariablesMappingE inputLine = MdmserverobjectFactory.eINSTANCE.createWSTransformerVariablesMappingE();
inputLine.setPipelineVariable(pipleName);
inputLine.setPluginVariable(VAR_TEXT);
inItems.add(inputLine);
outItems = new ArrayList<WSTransformerVariablesMappingE>();
WSTransformerVariablesMappingE outputLine = MdmserverobjectFactory.eINSTANCE.createWSTransformerVariablesMappingE();
outputLine.setPipelineVariable(outputPipelineVariable);
outputLine.setPluginVariable(VAR_RESULT);
outItems.add(outputLine);
step.setPluginJNDI(CALLJOB_PLUGIN);
// $NON-NLS-1$
step.setDescription("Call Job");
step.setParameters(parameters);
step.getInputMappings().addAll(inItems);
step.getOutputMappings().addAll(outItems);
step.setDisabled(false);
return step;
}
Aggregations