public boolean newHandler(HttpServletRequest request) throws Exception { String payload = request.getParameter("payload"); boolean output; try { output = stub.createHandler(payload); } catch (Exception e) { if (e instanceof RegistryException) { return false; } else { throw e; } } return output; }
public boolean deleteHandler(HttpServletRequest request) throws Exception { String handlerName = request.getParameter("handlerName"); boolean output; try { output = stub.deleteHandler(handlerName); } catch (Exception e) { if (e instanceof RegistryException) { return false; } else { throw e; } } return output; }
public String getHandlerConfiguration(HttpServletRequest request) throws Exception { String handlerName = request.getParameter("handlerName"); String output; try { output = stub.getHandlerConfiguration(handlerName); } catch (Exception e) { if (e instanceof RegistryException) { return ""; } else { throw e; } } return output; }
public HandlerManagementServiceClient(String backEndUrl, String userName, String password) throws AxisFault { this.endPoint = backEndUrl + serviceName; try { handlerManagementServiceStub = new HandlerManagementServiceStub(endPoint); } catch (AxisFault axisFault) { log.error("handlerManagementServiceStub Initialization fail " + axisFault.getMessage()); throw new AxisFault("handlerManagementServiceStub Initialization fail ", axisFault); } AuthenticateStub.authenticateStub(userName, password, handlerManagementServiceStub); }
public boolean updateHandler(HttpServletRequest request) throws Exception { String handlerName = request.getParameter("handlerName"); if (handlerName == null) { handlerName = ""; } String payload = request.getParameter("payload"); boolean output; try { output = stub.updateHandler(handlerName, payload); } catch (Exception e) { if (e instanceof RegistryException) { return false; } else { throw e; } } return output; }
public String[] getHandlerList(HttpServletRequest request) throws Exception { String[] output; try { output = stub.getHandlerList(); } catch (Exception e) { if (e instanceof RegistryException) { return new String[0]; } else { throw e; } } return output; }
public HandlerManagementServiceClient(String cookie, ServletConfig config, HttpSession session) throws RegistryException { String backendServerURL = CarbonUIUtil.getServerURL(config.getServletContext(), session); ConfigurationContext configContext = (ConfigurationContext) config. getServletContext().getAttribute(CarbonConstants.CONFIGURATION_CONTEXT); String epr = backendServerURL + "HandlerManagementService"; try { stub = new HandlerManagementServiceStub(configContext, epr); ServiceClient client = stub._getServiceClient(); Options option = client.getOptions(); option.setManageSession(true); option.setProperty(org.apache.axis2.transport.http.HTTPConstants.COOKIE_STRING, cookie); } catch (AxisFault axisFault) { String msg = "Failed to initiate handler management service client. " + axisFault.getMessage(); log.error(msg, axisFault); throw new RegistryException(msg, axisFault); } }
public String getHandlerCollectionLocation() throws RemoteException, ExceptionException { try { return handlerManagementServiceStub.getHandlerCollectionLocation(); } catch (RemoteException e) { String msg = "Fails to get Handler Collection Location"; log.error(msg + " " + e.getMessage()); throw new RemoteException(msg, e); } catch (ExceptionException e) { String msg = "Fails to get Handler Collection Location"; log.error(msg + " " + e.getMessage()); throw new ExceptionException(msg, e); } }
public void setHandlerCollectionLocation(String location) throws RemoteException, ExceptionException { try { handlerManagementServiceStub.setHandlerCollectionLocation(location); } catch (RemoteException e) { String msg = "Fails to get Handler Collection Location"; log.error(msg + " " + e.getMessage()); throw new RemoteException(msg, e); } catch (ExceptionException e) { String msg = "Fails to get Handler Collection Location"; log.error(msg + " " + e.getMessage()); throw new ExceptionException(msg, e); } } }
public HandlerManagementServiceClient(String backEndUrl, String userName, String password) throws AxisFault { this.endPoint = backEndUrl + serviceName; try { handlerManagementServiceStub = new HandlerManagementServiceStub(endPoint); } catch (AxisFault axisFault) { log.error("handlerManagementServiceStub Initialization fail " + axisFault.getMessage()); throw new AxisFault("handlerManagementServiceStub Initialization fail ", axisFault); } AuthenticateStub.authenticateStub(userName, password, handlerManagementServiceStub); }
public boolean updateHandler(String oldName, String payload) throws RemoteException, ExceptionException { try { return handlerManagementServiceStub.updateHandler(oldName, payload); } catch (RemoteException e) { String msg = "Fails to update Handler"; log.error(msg + " " + e.getMessage()); throw new RemoteException(msg, e); } catch (ExceptionException e) { String msg = "Fails to update Handler"; log.error(msg + " " + e.getMessage()); throw new ExceptionException(msg, e); } }
public String[] getHandlerList() throws RemoteException, ExceptionException { try { return handlerManagementServiceStub.getHandlerList(); } catch (RemoteException e) { String msg = "Fails to get Handler List"; log.error(msg + " " + e.getMessage()); throw new RemoteException(msg, e); } catch (ExceptionException e) { String msg = "Fails to get Handler List"; log.error(msg + " " + e.getMessage()); throw new ExceptionException(msg, e); } }
public String getHandlerCollectionLocation() throws RemoteException, ExceptionException { try { return handlerManagementServiceStub.getHandlerCollectionLocation(); } catch (RemoteException e) { String msg = "Fails to get Handler Collection Location"; log.error(msg + " " + e.getMessage()); throw new RemoteException(msg, e); } catch (ExceptionException e) { String msg = "Fails to get Handler Collection Location"; log.error(msg + " " + e.getMessage()); throw new ExceptionException(msg, e); } }
public void setHandlerCollectionLocation(String location) throws RemoteException, ExceptionException { try { handlerManagementServiceStub.setHandlerCollectionLocation(location); } catch (RemoteException e) { String msg = "Fails to get Handler Collection Location"; log.error(msg + " " + e.getMessage()); throw new RemoteException(msg, e); } catch (ExceptionException e) { String msg = "Fails to get Handler Collection Location"; log.error(msg + " " + e.getMessage()); throw new ExceptionException(msg, e); } } }
public HandlerManagementServiceClient(String backEndUrl, String sessionCookie) throws AxisFault { this.endPoint = backEndUrl + serviceName; try { handlerManagementServiceStub = new HandlerManagementServiceStub(endPoint); } catch (AxisFault axisFault) { log.error("handlerManagementServiceStub Initialization fail " + axisFault.getMessage()); throw new AxisFault("handlerManagementServiceStub Initialization fail ", axisFault); } AuthenticateStub.authenticateStub(sessionCookie, handlerManagementServiceStub); }
public String getHandlerConfiguration(String name) throws RemoteException, ExceptionException { try { return handlerManagementServiceStub.getHandlerConfiguration(name); } catch (RemoteException e) { String msg = "Fails to get Handler Configuration"; log.error(msg + " " + e.getMessage()); throw new RemoteException(msg, e); } catch (ExceptionException e) { String msg = "Fails to get Handler Configuration"; log.error(msg + " " + e.getMessage()); throw new ExceptionException(msg, e); } }
public boolean updateHandler(String oldName, String payload) throws RemoteException, ExceptionException { try { return handlerManagementServiceStub.updateHandler(oldName, payload); } catch (RemoteException e) { String msg = "Fails to update Handler"; log.error(msg + " " + e.getMessage()); throw new RemoteException(msg, e); } catch (ExceptionException e) { String msg = "Fails to update Handler"; log.error(msg + " " + e.getMessage()); throw new ExceptionException(msg, e); } }
public String[] getHandlerList() throws RemoteException, ExceptionException { try { return handlerManagementServiceStub.getHandlerList(); } catch (RemoteException e) { String msg = "Fails to get Handler List"; log.error(msg + " " + e.getMessage()); throw new RemoteException(msg, e); } catch (ExceptionException e) { String msg = "Fails to get Handler List"; log.error(msg + " " + e.getMessage()); throw new ExceptionException(msg, e); } }
public boolean createHandler(String payload) throws RemoteException, ExceptionException { try { return handlerManagementServiceStub.createHandler(payload); } catch (RemoteException e) { String msg = "Fails to create Handler"; log.error(msg + " " + e.getMessage()); throw new RemoteException(msg, e); } catch (ExceptionException e) { String msg = "Fails to create Handler"; log.error(msg + " " + e.getMessage()); throw new ExceptionException(msg, e); } }
public boolean deleteHandler(String name) throws RemoteException, ExceptionException { try { return handlerManagementServiceStub.deleteHandler(name); } catch (RemoteException e) { String msg = "Fails to delete Handler"; log.error(msg + " " + e.getMessage()); throw new RemoteException(msg, e); } catch (ExceptionException e) { String msg = "Fails to delete Handler"; log.error(msg + " " + e.getMessage()); throw new ExceptionException(msg, e); } }