Search in sources :

Example 1 with WSServicePutConfigurationE

use of org.talend.mdm.repository.model.mdmserverobject.WSServicePutConfigurationE in project tmdm-studio-se by Talend.

the class NewServiceConfigurationAction method newServiceConfiguration.

private WSServiceConfigurationE newServiceConfiguration(String key) {
    WSServicePutConfigurationE putConfig1 = MdmserverobjectFactory.eINSTANCE.createWSServicePutConfigurationE();
    // $NON-NLS-1$
    putConfig1.setJndiName("smtp");
    String configContent1 = // $NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$
    "<configuration> " + "\n" + "<host>localhost</host>  " + "\n" + "<port>25</port>  " + "\n" + "<username/>  " + "\n" + " <password/>  " + "\n" + " <from/>  " + "\n" + " <to/>  " + "\n" + // $NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$ //$NON-NLS-7$ //$NON-NLS-8$ //$NON-NLS-9$
    " <permanentbcc/>" + "\n" + " <process/>  " + "\n" + " <logfilename/> " + "\n" + // $NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$
    " </configuration>";
    putConfig1.setConfiguration(formatXml(configContent1));
    WSServicePutConfigurationE putConfig2 = MdmserverobjectFactory.eINSTANCE.createWSServicePutConfigurationE();
    // $NON-NLS-1$
    putConfig2.setJndiName("svn");
    String configContent2 = // $NON-NLS-1$
    "<svn-configuration><url>https://localhost:8443/svn/starkeylib</url><password>admin</password><autocommit>false</autocommit>  " + // $NON-NLS-1$
    " <username>admin</username>" + // $NON-NLS-1$
    "</svn-configuration>";
    putConfig2.setConfiguration(formatXml(configContent2));
    WSServicePutConfigurationE putConfig3 = MdmserverobjectFactory.eINSTANCE.createWSServicePutConfigurationE();
    // $NON-NLS-1$
    putConfig3.setJndiName("workflow");
    // $NON-NLS-1$
    String configContent3 = "  <workflow-configuration> <api-type>EJB2</api-type> </workflow-configuration>";
    putConfig3.setConfiguration(formatXml(configContent3));
    WSServiceConfigurationE serConfig = MdmserverobjectFactory.eINSTANCE.createWSServiceConfigurationE();
    serConfig.setName(key);
    serConfig.getServicePutConfigurations().add(putConfig1);
    serConfig.getServicePutConfigurations().add(putConfig2);
    serConfig.getServicePutConfigurations().add(putConfig3);
    return serConfig;
}
Also used : WSServicePutConfigurationE(org.talend.mdm.repository.model.mdmserverobject.WSServicePutConfigurationE) WSServiceConfigurationE(org.talend.mdm.repository.model.mdmserverobject.WSServiceConfigurationE)

Example 2 with WSServicePutConfigurationE

use of org.talend.mdm.repository.model.mdmserverobject.WSServicePutConfigurationE in project tmdm-studio-se by Talend.

the class MDMServiceConfigrationMainPage method setForConfigureContent.

@Override
protected void setForConfigureContent(String serviceName) {
    try {
        if (serviceName != null && !"".equals(serviceName)) {
            // $NON-NLS-1$
            document = getServiceDocument(serviceName.trim());
            XObjectEditorInput2 editorInput = (XObjectEditorInput2) getEditorInput();
            MDMServerObjectItem serverObjectItem = (MDMServerObjectItem) editorInput.getInputItem();
            MDMServerObject serverObject = serverObjectItem.getMDMServerObject();
            String configContent = null;
            if (serverObject instanceof WSServiceConfigurationE) {
                WSServiceConfigurationE object = (WSServiceConfigurationE) serverObject;
                for (WSServicePutConfigurationE config : object.getServicePutConfigurations()) {
                    if (config.getJndiName().equals(serviceName.trim())) {
                        configContent = config.getConfiguration();
                    }
                }
            }
            serviceConfigurationsText.setText(configContent);
            // $NON-NLS-1$
            errorLabel.setText("");
        }
    } catch (WebServiceException e1) {
        log.error(e1.getMessage(), e1);
    }
}
Also used : WSServicePutConfigurationE(org.talend.mdm.repository.model.mdmserverobject.WSServicePutConfigurationE) WebServiceException(javax.xml.ws.WebServiceException) WSServiceConfigurationE(org.talend.mdm.repository.model.mdmserverobject.WSServiceConfigurationE) MDMServerObjectItem(org.talend.mdm.repository.model.mdmproperties.MDMServerObjectItem) MDMServerObject(org.talend.mdm.repository.model.mdmserverobject.MDMServerObject)

Aggregations

WSServiceConfigurationE (org.talend.mdm.repository.model.mdmserverobject.WSServiceConfigurationE)2 WSServicePutConfigurationE (org.talend.mdm.repository.model.mdmserverobject.WSServicePutConfigurationE)2 WebServiceException (javax.xml.ws.WebServiceException)1 MDMServerObjectItem (org.talend.mdm.repository.model.mdmproperties.MDMServerObjectItem)1 MDMServerObject (org.talend.mdm.repository.model.mdmserverobject.MDMServerObject)1