Package org.wso2.carbon.bpel.ode.integration.config

Examples of org.wso2.carbon.bpel.ode.integration.config.EndpointConfiguration


         * configuration. But BPEL engine is using old method even now.
         */
        final Map map = eprContext.getConfigLookup(endpointReference);
        final QName service = (QName) map.get("service");
        final String port = (String) map.get("port");
        EndpointConfiguration endpointConfig = null;

        if (bpelPackageConfiguration != null) {
            MultiKeyMap endpointConfigs = bpelPackageConfiguration.getEndpoints();
            if (endpointConfigs.size() > 0) {
                endpointConfig = (EndpointConfiguration) endpointConfigs.get(service.getLocalPart(),
View Full Code Here


                            new QName(BPELConstants.BPEL_PKG_ENDPOINT_CONFIG_NS,
                                      BPELConstants.ENDPOINT))) {
                        continue;
                    }

                    EndpointConfiguration epConf = EndpointConfigBuilder.
                            buildEndpointConfiguration(endpointEle, depDir.getAbsolutePath());
                    epConf.setServiceName(tInvoke.getService().getName().getLocalPart());
                    epConf.setServiceNS(tInvoke.getService().getName().getNamespaceURI());
                    epConf.setServicePort(tInvoke.getService().getPort());
                    bpelPackageConfiguration.addEndpoint(epConf);
                } catch (XMLStreamException e) {
                    log.warn("Error occurred while reading endpoint configuration. " +
                             "Endpoint config will not be applied to: " + tInvoke.getService());
                }
            }

            List<TProvide> tProvideList = process.getProvideList();
            for (TProvide tProvide : tProvideList) {
                OMElement serviceEle;
                if (tProvide.getService() == null) {
                    String errMsg = "Service element missing for the provide element in deploy.xml";
                    log.error(errMsg);
                    throw new BPELDeploymentException(errMsg);
                }
                try {
                    serviceEle = AXIOMUtil.stringToOM(tProvide.getService().toString());
                    OMElement endpointEle = serviceEle.getFirstElement();
                    if (endpointEle == null || !endpointEle.getQName().equals(
                            new QName(BPELConstants.BPEL_PKG_ENDPOINT_CONFIG_NS,
                                      BPELConstants.ENDPOINT))) {
                        continue;
                    }

                    EndpointConfiguration epConf = EndpointConfigBuilder.
                            buildEndpointConfiguration(endpointEle, depDir.getAbsolutePath());
                    epConf.setServiceName(tProvide.getService().getName().getLocalPart());
                    epConf.setServiceNS(tProvide.getService().getName().getNamespaceURI());
                    epConf.setServicePort(tProvide.getService().getPort());
                    bpelPackageConfiguration.addEndpoint(epConf);
                } catch (XMLStreamException e) {
                    log.warn("Error occured while reading endpoint configuration. " +
                            "Endpoint config will not be applied to: " + tProvide.getService());
                }
View Full Code Here

     * @return The end line number, or -1 if could not be determined
     */
    public int getEndLineNumber() {
      int ret=-1;
     
      ActivityInterface parent=getParent();
     
      if (parent != null) {
        int index=parent.getSubActivities().indexOf(this);
       
        if (index != -1) {
          if (index < (parent.getSubActivities().size()-1)) {
            ActivityInterface other=parent.getSubActivities().get(index+1);
           
            ret = other.getStartLineNumber()-1;
          } else {
            ret = parent.getEndLineNumber();
          }
        }
      }
View Full Code Here

     *
     * @param lineNumber The line number
     * @return The activity, or null if not found
     */
    public ActivityInterface getActivityAtLineNumber(int lineNumber) {
      ActivityInterface ret=null;
     
      int endline=getEndLineNumber();
     
      if (getStartLineNumber() <= lineNumber && (endline == -1 || endline >= lineNumber)) {
       
View Full Code Here

            int width = 0;
            int height = 0;
            dimensions = new SVGDimension(width, height);

            SVGDimension subActivityDim = null;
            ActivityInterface activity = null;
            Iterator<org.wso2.carbon.bpel.ui.bpel2svg.ActivityInterface> itr = getSubActivities().iterator();
            while (itr.hasNext()) {
                activity = itr.next();
                subActivityDim = activity.getDimensions();
                if (subActivityDim.getWidth() > width) {
                    width += subActivityDim.getWidth();
                }
                height += subActivityDim.getHeight();
            }
View Full Code Here

    protected Element getArrows(SVGDocument doc) {
        Element subGroup = null;
        subGroup = doc.createElementNS("http://www.w3.org/2000/svg", "g");

        if (subActivities != null) {
            ActivityInterface prevActivity = null;
            ActivityInterface activity = null;
            String id = null;
            org.wso2.carbon.bpel.ui.bpel2svg.SVGCoordinates exitCoords = null;
            SVGCoordinates entryCoords = null;
            Iterator<org.wso2.carbon.bpel.ui.bpel2svg.ActivityInterface> itr = subActivities.iterator();
            while (itr.hasNext()) {
                activity = itr.next();
                if (prevActivity != null) {
                    exitCoords = prevActivity.getExitArrowCoords();
                    entryCoords = activity.getEntryArrowCoords();
                    id = prevActivity.getId() + "-" + activity.getId();
                    subGroup.appendChild(getArrowDefinition(doc, exitCoords.getXLeft(),
                        exitCoords.getYTop(), entryCoords.getXLeft(),
                        entryCoords.getYTop(), id, prevActivity, activity));
                }
                prevActivity = activity;
View Full Code Here

    @Override
    public org.wso2.carbon.bpel.ui.bpel2svg.SVGCoordinates getExitArrowCoords() {
        SVGCoordinates coords = getStartIconExitArrowCoords();

        if (subActivities != null && subActivities.size() > 0) {
            ActivityInterface activity = subActivities.get(subActivities.size() - 1);
            coords = activity.getExitArrowCoords();
        }
        return coords;
    }
View Full Code Here

    protected Element getArrows(SVGDocument doc) {
        Element subGroup = null;
        subGroup = doc.createElementNS("http://www.w3.org/2000/svg", "g");
        if (subActivities != null) {
            ActivityInterface prevActivity = null;
            ActivityInterface activity = null;
            String id = null;
            org.wso2.carbon.bpel.ui.bpel2svg.SVGCoordinates myStartCoords = getStartIconExitArrowCoords();
            org.wso2.carbon.bpel.ui.bpel2svg.SVGCoordinates exitCoords = null;
            SVGCoordinates entryCoords = null;
            Iterator<org.wso2.carbon.bpel.ui.bpel2svg.ActivityInterface> itr = subActivities.iterator();
            while (itr.hasNext()) {
                activity = itr.next();
                if (prevActivity != null) {
                    exitCoords = prevActivity.getExitArrowCoords();
                    entryCoords = activity.getEntryArrowCoords();
                    id = prevActivity.getId() + "-" + activity.getId();
                    subGroup.appendChild(getArrowDefinition(doc, exitCoords.getXLeft(),
                        exitCoords.getYTop(), entryCoords.getXLeft(),
                        entryCoords.getYTop(), id, prevActivity, activity));
                } else {
                    entryCoords = activity.getEntryArrowCoords();
                    subGroup.appendChild(getArrowDefinition(doc, myStartCoords.getXLeft(),
                        myStartCoords.getYTop(), entryCoords.getXLeft(),
                        entryCoords.getYTop(), id, prevActivity, activity));
                }
                prevActivity = activity;
View Full Code Here

            int width = 0;
            int height = 0;
            dimensions = new org.wso2.carbon.bpel.ui.bpel2svg.SVGDimension(width, height);

            org.wso2.carbon.bpel.ui.bpel2svg.SVGDimension subActivityDim = null;
            ActivityInterface activity = null;
            Iterator<org.wso2.carbon.bpel.ui.bpel2svg.ActivityInterface> itr = getSubActivities().iterator();
            while (itr.hasNext()) {
                activity = itr.next();
                subActivityDim = activity.getDimensions();
                if (subActivityDim.getHeight() > height) {
                    height += subActivityDim.getHeight();
                }
                width += subActivityDim.getWidth();
            }
View Full Code Here

        int xLeft = centreOfMyLayout - (getStartIconWidth() / 2);
        int yTop = startYTop + (getYSpacing() / 2);
        int endXLeft = centreOfMyLayout - (getEndIconWidth() / 2);
        int endYTop = startYTop + dimensions.getHeight() - getEndIconHeight() - (getYSpacing() / 2);

        ActivityInterface activity = null;
        Iterator<org.wso2.carbon.bpel.ui.bpel2svg.ActivityInterface> itr = getSubActivities().iterator();
        int childYTop = yTop + getStartIconHeight() + (getYSpacing() / 2);
        int childXLeft = startXLeft + (getXSpacing() / 2);
        while (itr.hasNext()) {
            activity = itr.next();
//            childYTop += centreOfMyLayout - (activity.getDimensions().getHeight() / 2);
            activity.layout(childXLeft, childYTop);
            childXLeft += activity.getDimensions().getWidth();
        }

        // Set the values
        setStartIconXLeft(xLeft);
        setStartIconYTop(yTop);
View Full Code Here

TOP

Related Classes of org.wso2.carbon.bpel.ode.integration.config.EndpointConfiguration

Copyright © 2018 www.massapicom. 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.