Package org.wso2.carbon.rule.core

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


        return initialized;
    }

    private void assertInitialized() {
        if (!initialized) {
            throw new LoggedRuntimeException("RuleServerManager has not been initialized, " +
                    "it requires to be initialized, with the required " +
                    "configurations before starting", log);
        }
    }
View Full Code Here


        }
    }

    private void assertRuleServerConfigurationNull(RuleServerConfiguration configuration) {
        if (configuration == null) {
            throw new LoggedRuntimeException("Given RuleServerConfiguration is null", log);
        }
    }
View Full Code Here

                RuleServerConfigurationFactory.create(config, new AXIOMXPathFactory());
        RuleServerManager ruleServerManager = new RuleServerManager();
        ruleServerManager.init(ruleServerConfiguration);

        if (!ruleServerManager.isInitialized()) {
            throw new LoggedRuntimeException("Rule engine cannot be initiated with the given " +
                    "config : " + config, log);
        }

        ruleEngineMangerRegistration = componentContext.getBundleContext().registerService(
                RuleServerManagerService.class.getName(),
View Full Code Here

            XMLStreamReader parser = XMLInputFactory.newInstance().
                    createXMLStreamReader(inputStream);
            StAXOMBuilder builder = new StAXOMBuilder(parser);
            return builder.getDocumentElement();
        } catch (FileNotFoundException e) {
            throw new LoggedRuntimeException(RULE_COMPONENT_CONF + "cannot be found in" +
                    " the path : " + path,
                    e, log);
        } catch (XMLStreamException e) {
            throw new LoggedRuntimeException("Invalid XML for " + RULE_COMPONENT_CONF + " located in" +
                    " the path : " +
                    path, e, log);
        } finally {
            try {
                if (inputStream != null) {
View Full Code Here

     *         Otherwise LoggedRuntimeExceptions are thrown
     */
    public static RuleServerConfiguration create(OMElement configurationXML, XPathFactory xPathFactory) {

        if (configurationXML == null) {
            throw new LoggedRuntimeException("Invalid  configuration. " +
                    "The configuration cannot be null.", log);
        }

        QName tagQName = configurationXML.getQName();
        QNameFactory qNameFactory = QNameFactory.getInstance();
View Full Code Here

        return initialized;
    }

    private void assertInitialized() {
        if (!initialized) {
            throw new LoggedRuntimeException("OSGIServiceLocator has not been initialized, " +
                    "it requires to be initialized, with the required " +
                    "configurations before starting", log);
        }
    }
View Full Code Here

        }
    }

    private void assertBundleContextNull(BundleContext bundleContext) {
        if (bundleContext == null) {
            throw new LoggedRuntimeException("Given BundleContext is null", log);
        }
    }
View Full Code Here

        }
    }

    private void assertNameNull(String name) {
        if (name == null || "".equals(name)) {
            throw new LoggedRuntimeException("Name argument cannot be null", log);
        }
    }
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

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.