Search in sources :

Example 1 with ObjectElementParameter

use of org.talend.core.model.runprocess.shadow.ObjectElementParameter in project tdi-studio-se by Talend.

the class WSDLSchemaInputNode method addParameters.

/**
     * DOC qwei Comment method "addParameters".
     * 
     * @param schemaBean
     * @param parameters
     */
private void addParameters(WSDLSchemaBean schemaBean, ArrayList parameters) {
    //$NON-NLS-1$
    IElementParameter param = new TextElementParameter("ENDPOINT", schemaBean.getWslUrl());
    addParameter(param);
    if (LanguageManager.getCurrentLanguage().equals(ECodeLanguage.JAVA)) {
        addJavaParameters(schemaBean);
    } else if (LanguageManager.getCurrentLanguage().equals(ECodeLanguage.PERL)) {
        addPerlParameters(schemaBean);
    }
    //$NON-NLS-1$
    param = new TextElementParameter("METHOD", schemaBean.getMethod());
    addParameter(param);
    // fix preview
    //$NON-NLS-1$
    param = new TextElementParameter("ADVANCED_USE", Boolean.toString(false));
    addParameter(param);
    List<Map<String, Object>> list = new ArrayList<Map<String, Object>>();
    if (parameters != null) {
        for (Object string : parameters) {
            Map<String, Object> map = new HashMap<String, Object>();
            //$NON-NLS-1$
            map.put("VALUE", TalendTextUtils.addQuotes(string.toString()));
            list.add(map);
        }
    }
    //$NON-NLS-1$
    param = new ObjectElementParameter("PARAMS", list);
    //$NON-NLS-1$
    param.setListItemsDisplayCodeName(new String[] { "VALUE" });
    addParameter(param);
}
Also used : HashMap(java.util.HashMap) TextElementParameter(org.talend.core.model.runprocess.shadow.TextElementParameter) ArrayList(java.util.ArrayList) IElementParameter(org.talend.core.model.process.IElementParameter) ObjectElementParameter(org.talend.core.model.runprocess.shadow.ObjectElementParameter) Map(java.util.Map) HashMap(java.util.HashMap)

Aggregations

ArrayList (java.util.ArrayList)1 HashMap (java.util.HashMap)1 Map (java.util.Map)1 IElementParameter (org.talend.core.model.process.IElementParameter)1 ObjectElementParameter (org.talend.core.model.runprocess.shadow.ObjectElementParameter)1 TextElementParameter (org.talend.core.model.runprocess.shadow.TextElementParameter)1