Search in sources :

Example 1 with WSTransformerPluginV2VariableDescriptor

use of com.amalto.workbench.webservices.WSTransformerPluginV2VariableDescriptor 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)

Example 2 with WSTransformerPluginV2VariableDescriptor

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

the class TransformerMainPage2 method initPlugin.

@Override
protected void initPlugin() {
    for (AbstractPluginDetail detail : RepositoryWebServiceAdapter.findAllTransformerPluginV2Details()) {
        String jndi = detail.getJNDIName();
        pluginsCombo.add(jndi);
        pluginDescriptions.put(jndi, detail.getDescription());
        // add input variables and output variables
        java.util.List<String> input = new LinkedList<String>();
        for (WSTransformerPluginV2VariableDescriptor v : detail.getInputVariableDescriptors()) {
            input.add(v.getVariableName());
        }
        inputVariablesMap.put(jndi, input);
        // 
        java.util.List<String> output = new LinkedList<String>();
        for (WSTransformerPluginV2VariableDescriptor v : detail.getOutputVariableDescriptors()) {
            output.add(v.getVariableName());
        }
        outputVariablesMap.put(jndi, output);
    }
}
Also used : AbstractPluginDetail(org.talend.mdm.repository.core.service.ws.AbstractPluginDetail) WSTransformerPluginV2VariableDescriptor(com.amalto.workbench.webservices.WSTransformerPluginV2VariableDescriptor) LinkedList(java.util.LinkedList)

Aggregations

WSTransformerPluginV2VariableDescriptor (com.amalto.workbench.webservices.WSTransformerPluginV2VariableDescriptor)2 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 ArrayList (java.util.ArrayList)1 LinkedList (java.util.LinkedList)1 AbstractPluginDetail (org.talend.mdm.repository.core.service.ws.AbstractPluginDetail)1