Package org.wso2.carbon.mediation.initializer.persistence

Examples of org.wso2.carbon.mediation.initializer.persistence.MediationPersistenceManager$MediationPersistenceWorker


            int conHeight = 0;
            dimensions = new org.wso2.carbon.bpel.ui.bpel2svg.SVGDimension(coreWidth, coreHeight);
            coreDimensions = new org.wso2.carbon.bpel.ui.bpel2svg.SVGDimension(coreWidth, coreHeight);
            conditionalDimensions = new org.wso2.carbon.bpel.ui.bpel2svg.SVGDimension(conWidth, conHeight);

            SVGDimension subActivityDim = null;
            org.wso2.carbon.bpel.ui.bpel2svg.ActivityInterface activity = null;
            Iterator<org.wso2.carbon.bpel.ui.bpel2svg.ActivityInterface> itr = getSubActivities().iterator();
            while (itr.hasNext()) {
                activity = itr.next();
                subActivityDim = activity.getDimensions();
                if (activity instanceof FaultHandlerImpl || activity instanceof TerminationHandlerImpl || activity instanceof CompensationHandlerImpl || activity instanceof EventHandlerImpl) {
                    if (subActivityDim.getHeight() > conHeight) {
                        conHeight = subActivityDim.getHeight();
                    }
                    conWidth += subActivityDim.getWidth();
                } else {
                    if (subActivityDim.getWidth() > coreWidth) {
                        coreWidth = subActivityDim.getWidth();
                    }
                    coreHeight += subActivityDim.getHeight();
                }
            }

            coreHeight += getYSpacing() + getStartIconHeight() + getEndIconHeight();
            if (!isSimpleLayout()) {
View Full Code Here


   
    if (is == null) {
      fail("BPEL process not found");
    }
   
    SVGInterface svg=null;
   
    try {
      svg = BPEL2SVGUtil.generate(is);
     
      if (svg == null) {
View Full Code Here

   
    if (is == null) {
      fail("BPEL process not found");
    }
   
    SVGInterface svg=null;
   
    try {
      svg = BPEL2SVGUtil.generate(is);
     
      if (svg == null) {
View Full Code Here

   
    protected static SVGImpl generateSVGImpl(java.io.InputStream is) throws java.io.IOException {
      byte[] b=new byte[is.available()];
      is.read(b);
   
      BPELInterface bpel = new BPELImpl();
        OMElement bpelStr = bpel.load(new String(b));
       
        bpel.processBpelString(bpelStr);

        LayoutManager layoutManager = BPEL2SVGFactory.getInstance().getLayoutManager();
        layoutManager.setVerticalLayout(true);
        layoutManager.setYSpacing(20);
        layoutManager.setYSpacing(50);
        layoutManager.layoutSVG(bpel.getRootActivity());

        SVGImpl svg = new SVGImpl();
        svg.setRootActivity(bpel.getRootActivity());
       
        return(svg);
    }
View Full Code Here

   * @param transformer The optional image transformer
   * @throws java.io.IOException Failed to generate the representation
   */
    public static void generate(java.io.InputStream is, java.io.OutputStream os,
                SVGImageTransformer transformer) throws java.io.IOException {
        SVGImpl svg = generateSVGImpl(is);
       
        if (transformer == null) {
          String str=svg.getHeaders()+svg.generateSVGString();
          os.write(str.getBytes());
        } else {
          transformer.transform(svg, os);
        }
    }
View Full Code Here

        layoutManager.setVerticalLayout(true);
        layoutManager.setYSpacing(20);
        layoutManager.setYSpacing(50);
        layoutManager.layoutSVG(bpel.getRootActivity());

        SVGImpl svg = new SVGImpl();
        svg.setRootActivity(bpel.getRootActivity());
       
        return(svg);
    }
View Full Code Here

            String fileName = null;
            if (st instanceof AbstractStartup) {
                fileName = st.getFileName();
            }
            synapseConfiguration.removeStartup(name);
            MediationPersistenceManager pm = ServiceBusUtils.getMediationPersistenceManager(
                    synapseConfiguration.getAxisConfiguration());
            pm.deleteItem(name, fileName, ServiceBusConstants.ITEM_TYPE_TASK);

        } else {
            log.warn("Cannot delete the startup named " + name
                    + ", it doesn't exists in the SynapseConfiguration");
        }
View Full Code Here

    public static void shutDown() {
    }

    private static void persistStartup(Startup startup, AxisConfiguration axisCfg) {
        MediationPersistenceManager pm = ServiceBusUtils.getMediationPersistenceManager(axisCfg);
        pm.saveItem(startup.getName(), ServiceBusConstants.ITEM_TYPE_TASK);
    }
View Full Code Here

            if (!keepHistory) {
                ProxyService proxySvc = synapseConfig.getProxyService(axisService.getName());
                if (proxySvc != null) {
                    synapseConfig.removeProxyService(axisService.getName());
                    MediationPersistenceManager pm = getMediationPersistenceManager();
                    pm.deleteItem(proxySvc.getName(), proxySvc.getFileName(),
                            ServiceBusConstants.ITEM_TYPE_PROXY_SERVICE);
                    log.info("Deleted the proxy service : " + proxySvc.getName());

                } else if (log.isDebugEnabled()) {
                    log.debug("Proxy Service representing the service " + axisService.getName()
View Full Code Here

    private void persistChanges(String proxyName, AxisConfiguration axisConfiguration) {
        Parameter param = axisConfiguration.getParameter(ServiceBusConstants.SUSPEND_PERSISTENCE);
        if (param != null && Boolean.parseBoolean((String) param.getValue())) {
            return;
        }
        MediationPersistenceManager mpm = getMediationPersistenceManager();
        if (mpm != null) {
            mpm.saveItem(proxyName, ServiceBusConstants.ITEM_TYPE_PROXY_SERVICE);
        }
    }
View Full Code Here

TOP

Related Classes of org.wso2.carbon.mediation.initializer.persistence.MediationPersistenceManager$MediationPersistenceWorker

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.