Package org.wso2.carbon.rule.core

Examples of org.wso2.carbon.rule.core.LoggedRuntimeException


            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

   
    if (is == null) {
      fail("BPEL process '"+filename+"' not found");
    }
   
    SVGInterface svg=null;
   
    try {
      svg = BPEL2SVGUtil.generate(is);
     
      if (svg == null) {
        fail("Failed to get SVGInterface");
      }
    } catch(Exception e) {
      fail("Failed: "+e);
    }

    ActivityInterface act=svg.getActivityAtLineNumber(lineNo);
   
    if (act == null) {
      fail("Failed to get '"+type.getName()+"' at line "+lineNo);
    }
   
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

    public BaseXPath createXPath(OMElement element, QName attributeName) {
        try {
            return org.apache.synapse.config.xml.SynapseXPathFactory.getSynapseXPath(element,
                    attributeName);
        } catch (JaxenException e) {
            throw new LoggedRuntimeException("Error creating XPath from omelement : " + element
                    + " with attribute : " + attributeName, e, log);
        }
    }
View Full Code Here

        }
    }

    public BaseXPath createXPath(String xpath, Collection<OMNamespace> omNameSpaces) {
        if (xpath == null || "".equals(xpath)) {
            throw new LoggedRuntimeException("XPath expression is null or empty", log);
        }
        try {
            SynapseXPath synapseXPath = new SynapseXPath(xpath);
            for (OMNamespace omNamespace : omNameSpaces) {
                if (omNamespace != null) {
                    synapseXPath.addNamespace(omNamespace.getPrefix(), omNamespace.getNamespaceURI());
                }
            }
            return synapseXPath;
        } catch (JaxenException e) {
            throw new LoggedRuntimeException("Invalid XPapth expression : " +
                    xpath, e, log);
        }
    }
View Full Code Here

                }
                return new ReturnValue(defaultValue);
            }
            return new ReturnValue(result, true);
        } catch (JaxenException e) {
            throw new LoggedRuntimeException("Error when evaluating XPath : " + xPath, e, log);
        }
    }
View Full Code Here

TOP

Related Classes of org.wso2.carbon.rule.core.LoggedRuntimeException

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.