Package org.wso2.carbon.mediation.dependency.mgt

Examples of org.wso2.carbon.mediation.dependency.mgt.ConfigurationObject


    }

    public byte[] getProcessImage(String processId) {

        QName qName = decode(processId);
        SVGInterface svg = createSVG(qName);
        return svg.toPNGBytes();
    }
View Full Code Here


    private SVGInterface createSVG(QName qName) {

        // generate new
        InputStream in = getBpelDescriptor(qName);

        SVGInterface svg = null;

        try {
            svg = BPEL2SVGUtil.generate(in);

            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

        if (sequence.getKey() != null) {
            // If this is a sequence which simply refers to another sequence then
            // the provider sequence acts as the only dependency
            Value key = sequence.getKey();
            if (key != null) {
                addProvider(new ConfigurationObject(ConfigurationObject.TYPE_SEQUENCE,
                                                    key.getKeyValue()), providers);
            }
            return providers;
        } else {
            // Otherwise we need to resolve child mediators
View Full Code Here

                    cacheMediator.getOnCacheHitSequence());
            for (ConfigurationObject o : sequenceProviders) {
                addProvider(o, providers);
            }
        } else if (cacheMediator.getOnCacheHitRef() != null) {
            addProvider(new ConfigurationObject(ConfigurationObject.TYPE_SEQUENCE,
                    cacheMediator.getOnCacheHitRef()), providers);
        }
        return providers;
    }
View Full Code Here

                    throttleMediator.getOnAcceptMediator());
            for (ConfigurationObject o : sequenceProviders) {
                addProvider(o, providers);
            }
        } else if (throttleMediator.getOnAcceptSeqKey() != null) {
            addProvider(new ConfigurationObject(ConfigurationObject.TYPE_SEQUENCE,
                    throttleMediator.getOnAcceptSeqKey()), providers);
        }

        if (throttleMediator.getOnRejectMediator() != null) {
            DependencyResolver resolver = DependencyResolverFactory.getInstance().
                    getResolver(throttleMediator.getOnRejectMediator());
            List<ConfigurationObject> sequenceProviders = resolver.resolve(
                    throttleMediator.getOnRejectMediator());
            for (ConfigurationObject o : sequenceProviders) {
                addProvider(o, providers);
            }
        } else if (throttleMediator.getOnRejectSeqKey() != null) {
            addProvider(new ConfigurationObject(ConfigurationObject.TYPE_SEQUENCE,
                    throttleMediator.getOnRejectSeqKey()), providers);
        }

        return providers;
    }
View Full Code Here

        List<ConfigurationObject> providers = new ArrayList<ConfigurationObject>();
        XSLTMediator xsltMediator = (XSLTMediator) m;
        Value xsltKey = xsltMediator.getXsltKey();
        if (xsltKey.getKeyValue() != null) {
            addProvider(new ConfigurationObject(ConfigurationObject.TYPE_ENTRY,
                    xsltKey.getKeyValue()),
                    providers);
        }

        if (xsltMediator.getResourceMap() != null) {
            ResourceMap resources = xsltMediator.getResourceMap();
            for (String key : resources.getResources().values()) {
                addProvider(new ConfigurationObject(ConfigurationObject.TYPE_ENTRY, key),
                        providers);
            }
        }
       
        return providers;
View Full Code Here

        }

        List<ConfigurationObject> providers = new ArrayList<ConfigurationObject>();
        SpringMediator springMediator  = (SpringMediator) m;
        if (springMediator.getConfigKey() != null) {
            addProvider(new ConfigurationObject(ConfigurationObject.TYPE_ENTRY,
                    springMediator.getConfigKey()), providers);
        }
        return providers;
    }
View Full Code Here

TOP

Related Classes of org.wso2.carbon.mediation.dependency.mgt.ConfigurationObject

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.