Search in sources :

Example 1 with WSServiceConfigurationE

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

the class WSServiceConfigurationItemImpl method getWsServiceConfiguration.

/**
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
@Override
public WSServiceConfigurationE getWsServiceConfiguration() {
    if (wsServiceConfiguration != null && wsServiceConfiguration.eIsProxy()) {
        InternalEObject oldWsServiceConfiguration = (InternalEObject) wsServiceConfiguration;
        wsServiceConfiguration = (WSServiceConfigurationE) eResolveProxy(oldWsServiceConfiguration);
        if (wsServiceConfiguration.eResource() == null && eResource() != null) {
            URI uri = EcoreUtil.getURI(wsServiceConfiguration);
            if (uri.hasFragment()) {
                uri = uri.trimFragment();
            }
            Resource resource = eResource().getResourceSet().getResource(uri, true);
            for (EObject object : resource.getContents()) {
                if (object instanceof WSServiceConfigurationE) {
                    wsServiceConfiguration = (WSServiceConfigurationE) object;
                    break;
                }
            }
        }
        if (wsServiceConfiguration != oldWsServiceConfiguration) {
            if (eNotificationRequired()) {
                eNotify(new ENotificationImpl(this, Notification.RESOLVE, MdmpropertiesPackage.WS_SERVICE_CONFIGURATION_ITEM__WS_SERVICE_CONFIGURATION, oldWsServiceConfiguration, wsServiceConfiguration));
            }
        }
    }
    return wsServiceConfiguration;
}
Also used : WSServiceConfigurationE(org.talend.mdm.repository.model.mdmserverobject.WSServiceConfigurationE) ENotificationImpl(org.eclipse.emf.ecore.impl.ENotificationImpl) EObject(org.eclipse.emf.ecore.EObject) InternalEObject(org.eclipse.emf.ecore.InternalEObject) Resource(org.eclipse.emf.ecore.resource.Resource) URI(org.eclipse.emf.common.util.URI) InternalEObject(org.eclipse.emf.ecore.InternalEObject)

Example 2 with WSServiceConfigurationE

use of org.talend.mdm.repository.model.mdmserverobject.WSServiceConfigurationE 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 3 with WSServiceConfigurationE

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

the class WSServiceConfigurationItemImpl method setWsServiceConfiguration.

/**
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
@Override
public void setWsServiceConfiguration(WSServiceConfigurationE newWsServiceConfiguration) {
    WSServiceConfigurationE oldWsServiceConfiguration = wsServiceConfiguration;
    wsServiceConfiguration = newWsServiceConfiguration;
    if (eNotificationRequired()) {
        eNotify(new ENotificationImpl(this, Notification.SET, MdmpropertiesPackage.WS_SERVICE_CONFIGURATION_ITEM__WS_SERVICE_CONFIGURATION, oldWsServiceConfiguration, wsServiceConfiguration));
    }
}
Also used : WSServiceConfigurationE(org.talend.mdm.repository.model.mdmserverobject.WSServiceConfigurationE) ENotificationImpl(org.eclipse.emf.ecore.impl.ENotificationImpl)

Example 4 with WSServiceConfigurationE

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

the class NewServiceConfigurationAction method createServerObject.

@Override
protected Item createServerObject(String key) {
    WSServiceConfigurationItem item = MdmpropertiesFactory.eINSTANCE.createWSServiceConfigurationItem();
    ItemState itemState = PropertiesFactory.eINSTANCE.createItemState();
    item.setState(itemState);
    WSServiceConfigurationE serConfig = newServiceConfiguration(key);
    item.setWsServiceConfiguration(serConfig);
    if (parentItem != null) {
        item.getState().setPath(parentItem.getState().getPath());
        RepositoryResourceUtil.createItem(item, key);
    }
    return item;
}
Also used : WSServiceConfigurationItem(org.talend.mdm.repository.model.mdmproperties.WSServiceConfigurationItem) WSServiceConfigurationE(org.talend.mdm.repository.model.mdmserverobject.WSServiceConfigurationE) ItemState(org.talend.core.model.properties.ItemState)

Example 5 with WSServiceConfigurationE

use of org.talend.mdm.repository.model.mdmserverobject.WSServiceConfigurationE 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)5 ENotificationImpl (org.eclipse.emf.ecore.impl.ENotificationImpl)2 WSServicePutConfigurationE (org.talend.mdm.repository.model.mdmserverobject.WSServicePutConfigurationE)2 WebServiceException (javax.xml.ws.WebServiceException)1 URI (org.eclipse.emf.common.util.URI)1 EObject (org.eclipse.emf.ecore.EObject)1 InternalEObject (org.eclipse.emf.ecore.InternalEObject)1 Resource (org.eclipse.emf.ecore.resource.Resource)1 ItemState (org.talend.core.model.properties.ItemState)1 MDMServerObjectItem (org.talend.mdm.repository.model.mdmproperties.MDMServerObjectItem)1 WSServiceConfigurationItem (org.talend.mdm.repository.model.mdmproperties.WSServiceConfigurationItem)1 MDMServerObject (org.talend.mdm.repository.model.mdmserverobject.MDMServerObject)1