Search in sources :

Example 1 with WSTransformerPluginV2SListItem

use of com.amalto.workbench.webservices.WSTransformerPluginV2SListItem in project tmdm-studio-se by Talend.

the class TransformerMainPage method initPlugin.

protected void initPlugin() {
    // $NON-NLS-1$
    WSTransformerPluginV2SList list = service.getTransformerPluginV2SList(new WSGetTransformerPluginV2SList("EN"));
    java.util.List<WSTransformerPluginV2SListItem> items = list.getItem();
    if (items != null) {
        for (WSTransformerPluginV2SListItem item : items) {
            pluginDescriptions.put(item.getJndiName(), item.getDescription());
        }
        // get the sorted list and feed the combo
        Set<String> jndis = pluginDescriptions.keySet();
        for (String jndi : jndis) {
            pluginsCombo.add(jndi);
            // add input variables and output variables
            WSTransformerPluginV2Details details = service.getTransformerPluginV2Details(new WSGetTransformerPluginV2Details(// $NON-NLS-1$
            jndi.contains("/") ? // $NON-NLS-1$
            jndi : TRANSFORMER_PLUGIN + jndi, // $NON-NLS-1$
            "en"));
            java.util.List<String> input = new ArrayList<String>();
            for (WSTransformerPluginV2VariableDescriptor v : details.getInputVariableDescriptors()) {
                input.add(v.getVariableName());
            }
            inputVariablesMap.put(jndi, input);
            java.util.List<String> output = new ArrayList<String>();
            for (WSTransformerPluginV2VariableDescriptor v : details.getOutputVariableDescriptors()) {
                output.add(v.getVariableName());
            }
            outputVariablesMap.put(jndi, output);
        }
    }
}
Also used : WSTransformerPluginV2SList(com.amalto.workbench.webservices.WSTransformerPluginV2SList) WSTransformerPluginV2Details(com.amalto.workbench.webservices.WSTransformerPluginV2Details) WSGetTransformerPluginV2Details(com.amalto.workbench.webservices.WSGetTransformerPluginV2Details) WSGetTransformerPluginV2SList(com.amalto.workbench.webservices.WSGetTransformerPluginV2SList) ArrayList(java.util.ArrayList) WSTransformerPluginV2SListItem(com.amalto.workbench.webservices.WSTransformerPluginV2SListItem) WSTransformerPluginV2VariableDescriptor(com.amalto.workbench.webservices.WSTransformerPluginV2VariableDescriptor)

Aggregations

WSGetTransformerPluginV2Details (com.amalto.workbench.webservices.WSGetTransformerPluginV2Details)1 WSGetTransformerPluginV2SList (com.amalto.workbench.webservices.WSGetTransformerPluginV2SList)1 WSTransformerPluginV2Details (com.amalto.workbench.webservices.WSTransformerPluginV2Details)1 WSTransformerPluginV2SList (com.amalto.workbench.webservices.WSTransformerPluginV2SList)1 WSTransformerPluginV2SListItem (com.amalto.workbench.webservices.WSTransformerPluginV2SListItem)1 WSTransformerPluginV2VariableDescriptor (com.amalto.workbench.webservices.WSTransformerPluginV2VariableDescriptor)1 ArrayList (java.util.ArrayList)1