Search in sources :

Example 1 with WSRoutingEngineV2Action

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

the class RoutingEngineV2BrowserMainPage method suspendSubscriptionEngine.

private void suspendSubscriptionEngine() {
    try {
        TMDMService service = getMDMService();
        service.routingEngineV2Action(new WSRoutingEngineV2Action(WSRoutingEngineV2ActionCode.SUSPEND));
    } catch (Exception e) {
        log.error(e.getMessage(), e);
        if (!Util.handleConnectionException(this.getSite().getShell(), e, null)) {
            MessageDialog.openError(this.getSite().getShell(), Messages._Error, Messages.bind(Messages.RoutingEngineV2BrowserMainPage_ErrorMsg9, e.getLocalizedMessage()));
        }
    }
}
Also used : TMDMService(com.amalto.workbench.webservices.TMDMService) WSRoutingEngineV2Action(com.amalto.workbench.webservices.WSRoutingEngineV2Action) XtentisException(com.amalto.workbench.utils.XtentisException) ParseException(java.text.ParseException)

Example 2 with WSRoutingEngineV2Action

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

the class RoutingEngineV2BrowserMainPage method startSubscriptionEngine.

private void startSubscriptionEngine() {
    try {
        WSRoutingEngineV2Status status = getServerRoutingStatus();
        TMDMService service = getMDMService();
        if (status == WSRoutingEngineV2Status.STOPPED) {
            service.routingEngineV2Action(new WSRoutingEngineV2Action(WSRoutingEngineV2ActionCode.START));
        } else if (status == WSRoutingEngineV2Status.SUSPENDED) {
            service.routingEngineV2Action(new WSRoutingEngineV2Action(WSRoutingEngineV2ActionCode.RESUME));
        }
    } catch (Exception e) {
        log.error(e.getMessage(), e);
        if (!Util.handleConnectionException(this.getSite().getShell(), e, null)) {
            MessageDialog.openError(this.getSite().getShell(), Messages._Error, Messages.bind(Messages.RoutingEngineV2BrowserMainPage_ErrorMsg7, e.getLocalizedMessage()));
        }
    }
}
Also used : TMDMService(com.amalto.workbench.webservices.TMDMService) WSRoutingEngineV2Action(com.amalto.workbench.webservices.WSRoutingEngineV2Action) WSRoutingEngineV2Status(com.amalto.workbench.webservices.WSRoutingEngineV2Status) XtentisException(com.amalto.workbench.utils.XtentisException) ParseException(java.text.ParseException)

Example 3 with WSRoutingEngineV2Action

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

the class RoutingEngineV2BrowserMainPage method getServerRoutingStatus.

protected WSRoutingEngineV2Status getServerRoutingStatus() throws XtentisException {
    TMDMService service = getMDMService();
    WSRoutingEngineV2Status status = service.routingEngineV2Action(new WSRoutingEngineV2Action(WSRoutingEngineV2ActionCode.STATUS));
    return status;
}
Also used : TMDMService(com.amalto.workbench.webservices.TMDMService) WSRoutingEngineV2Action(com.amalto.workbench.webservices.WSRoutingEngineV2Action) WSRoutingEngineV2Status(com.amalto.workbench.webservices.WSRoutingEngineV2Status)

Example 4 with WSRoutingEngineV2Action

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

the class RoutingEngineV2BrowserMainPage method stopSubscriptionEngine.

private void stopSubscriptionEngine() {
    try {
        TMDMService service = getMDMService();
        service.routingEngineV2Action(new WSRoutingEngineV2Action(WSRoutingEngineV2ActionCode.STOP));
    } catch (Exception e) {
        log.error(e.getMessage(), e);
        if (!Util.handleConnectionException(this.getSite().getShell(), e, null)) {
            MessageDialog.openError(this.getSite().getShell(), Messages._Error, Messages.bind(Messages.RoutingEngineV2BrowserMainPage_ErrorMsg8, e.getLocalizedMessage()));
        }
    }
}
Also used : TMDMService(com.amalto.workbench.webservices.TMDMService) WSRoutingEngineV2Action(com.amalto.workbench.webservices.WSRoutingEngineV2Action) XtentisException(com.amalto.workbench.utils.XtentisException) ParseException(java.text.ParseException)

Aggregations

TMDMService (com.amalto.workbench.webservices.TMDMService)4 WSRoutingEngineV2Action (com.amalto.workbench.webservices.WSRoutingEngineV2Action)4 XtentisException (com.amalto.workbench.utils.XtentisException)3 ParseException (java.text.ParseException)3 WSRoutingEngineV2Status (com.amalto.workbench.webservices.WSRoutingEngineV2Status)2