Package org.wso2.carbon.rulecep.commons.descriptions.rule

Examples of org.wso2.carbon.rulecep.commons.descriptions.rule.SessionDescription


    }

    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

        RuleSetDescription ruleSetDescription = ruleMediatorDescription.getRuleSetDescription();
        ruleEngine = ruleServerManager.createRuleEngine(classLoader);
        if (ruleSetDescription.getRuleSource() != null) {
            String bindURI = ruleEngine.addRuleSet(ruleSetDescription);
            SessionDescription sessionDescription = ruleMediatorDescription.getSessionDescription();
            sessionDescription.setRuleSetURI(bindURI);
        } else {
            registryKey = ruleSetDescription.getKey();
        }

        inputManager = inputOutputAdaptersService.createInputManager(
View Full Code Here

            if (synLog.isTraceTraceEnabled()) {
                synLog.traceTrace("Message : " + synCtx.getEnvelope());
            }
        }

        SessionDescription sessionDescription = ruleMediatorDescription.getSessionDescription();

        if (registryKey != null) {
            ReturnValue returnValue = interceptor.extract(registryKey, synCtx, null);
            if (returnValue.getValue() == null) {
                handleException("RuleSet cannot be found for the registry key : " + registryKey,
View Full Code Here

        RuleMediatorDescription ruleMediatorDescription = new RuleMediatorDescription();
        QName sessionQName = qNameFactory.createQName(CommonsConstants.ELE_SESSION, tagQName);
        OMElement sessionElement = configurationXML.getFirstChildWithName(sessionQName);

        if (sessionElement != null) {
            SessionDescription description =
                    SessionDescriptionFactory.create(sessionElement, xPathFactory);
            ruleMediatorDescription.setSessionDescription(description);
        }

        QName executionSetQName = qNameFactory.createQName(CommonsConstants.ELE_RULESET,
View Full Code Here

                createSessionDescription(ruleServiceEngine));
    }

    private SessionDescription createSessionDescription(RuleServiceEngine ruleServiceEngine) {

        SessionDescription sessionDescription = new SessionDescription();
        AxisService axisService = ruleServiceEngine.getAxisService();
        if (isStateless(axisService.getScope())) {
            sessionDescription.setSessionType(SessionDescription.STATELESS_SESSION);
        }
        sessionDescription.setRuleSetURI(ruleServiceEngine.getRulesetURI());
        return sessionDescription;
    }
View Full Code Here

            RuleSetDescriptionSerializer.serialize(ruleSetDescription, xPathSerializer,
                    ruleSetElement, configurationExtensionSerializer);
            ruleElement.addChild(ruleSetElement);
        }

        SessionDescription sessionDescription = ruleMediatorDescription.getSessionDescription();
        if (sessionDescription != null) {
            OMElement sessionElement =
                    SessionDescriptionSerializer.serialize(sessionDescription, xPathSerializer,
                            ruleElement.getQName());
            ruleElement.addChild(sessionElement);
View Full Code Here

TOP

Related Classes of org.wso2.carbon.rulecep.commons.descriptions.rule.SessionDescription

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.