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;
}
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;
}
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));
}
}
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;
}
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);
}
}
Aggregations