Examples of AddServicesServiceClient


Examples of org.wso2.carbon.governance.services.ui.clients.AddServicesServiceClient

    public void addLifeCycleElements(OMElement head, HttpServletRequest request,
                                     ServletConfig config, HttpSession session) throws Exception {
        OMFactory fac = OMAbstractFactory.getOMFactory();
        OMElement lifeCycleTable = getLifecycleConfigElement(head);
        if (lifeCycleTable != null) {
            AddServicesServiceClient client = new AddServicesServiceClient(config, session);
            String[] lifeCycleList = client.getAvailableAspects();
            if (lifeCycleList == null || lifeCycleList.length == 0) {
                return;
            }
            for (String lifeCycle : lifeCycleList) {
                OMElement value = fac.createOMElement(UIGeneratorConstants.OPTION_VALUE, null);
View Full Code Here

Examples of org.wso2.carbon.governance.services.ui.clients.AddServicesServiceClient

    public static boolean addServiceContent(
            OMElement info, HttpServletRequest request, ServletConfig config, HttpSession session) throws UIException {

        try {
            AddServicesServiceClient serviceClient = new AddServicesServiceClient(config, session);
            OMElement filledService = AddServiceUIGenerator.getDataFromUI(info, request);

            String newServicePath = request.getParameter("path");

            if (newServicePath != null && !newServicePath.contains(SYSTEM_GOVERNANCE_TRUNK)) {
                newServicePath = newServicePath.substring(0,newServicePath.lastIndexOf(RegistryConstants.PATH_SEPARATOR));
                newServicePath = newServicePath.substring(0,newServicePath.lastIndexOf(RegistryConstants.PATH_SEPARATOR));

                filledService.build();
                OMFactory fac = OMAbstractFactory.getOMFactory();
                Iterator it = filledService.getChildrenWithLocalName("newServicePath");
                if (it.hasNext()) {
                    while (it.hasNext()) {
                        OMElement next = (OMElement) it.next();
                        next.setText(newServicePath);
                        break;
                    }
                } else {
                    OMElement operation = fac.createOMElement("newServicePath", filledService.getNamespace(), filledService);
                    operation.setText(newServicePath);
                }
            }


            return serviceClient.addService(filledService.toString());
        } catch (Exception e) {
            String msg = "Failed to get service details. " + e.getMessage();
            log.error(msg, e);
            throw new UIException(msg, e);
        }
View Full Code Here

Examples of org.wso2.carbon.governance.services.ui.clients.AddServicesServiceClient

            throw new UIException(msg, e);
        }
    }

    public static String getServicePath(ServletConfig config, HttpSession session) throws Exception {
        AddServicesServiceClient serviceClient = new AddServicesServiceClient(config, session);
        return serviceClient.getServicePath();
    }
View Full Code Here

Examples of org.wso2.carbon.governance.services.ui.clients.AddServicesServiceClient

        return resourcePath;
    }

    public static String getServiceConfiguration(HttpSession session, ServletConfig config) throws Exception {
        AddServicesServiceClient serviceClient = new AddServicesServiceClient(config, session);
        return serviceClient.getServiceConfiguration();
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.