Package org.wso2.carbon.rulecep.commons

Examples of org.wso2.carbon.rulecep.commons.LoggedRuntimeException


                        return resource.getContentStream();
                    }
                }
            }
        } catch (RegistryException e) {
            throw new LoggedRuntimeException("Error accessing ConfigUserRegistry", e, log);
        }
        return null;
    }
View Full Code Here


            }
            ReturnValue returnValue = new ReturnValue(result);
            returnValue.setFresh(true);
            return returnValue;
        } catch (JaxenException e) {
            throw new LoggedRuntimeException("Error when evaluating XPath : " + xPath, log);
        }

    }
View Full Code Here

    public ReturnValue extractEnvelope(Object message) {
        if (message instanceof MessageContext) {
            return new ReturnValue(((MessageContext) message).getEnvelope(), true);
        }
        throw new LoggedRuntimeException("Invalid context object, expected Axis2 Message Context",
                log);
    }
View Full Code Here

            }
            try {
                ResourceAdapter fac = (ResourceAdapter) c.newInstance();
                adaptersMap.put(fac.getType(), (InputAdaptable) fac);
            } catch (Exception e) {
                throw new LoggedRuntimeException("Error instantiating " + c.getName(), e, log);
            }
        }
    }
View Full Code Here

     *                           value which is used as the class name of teh adapter
     */
    public void addInputAdapter(ResourceDescription adapterDescription) {

        if (adapterDescription == null) {
            throw new LoggedRuntimeException("Provided input adapter information is null", log);
        }

        String type = adapterDescription.getType();
        if (type == null || "".equals(type.trim())) {
            throw new LoggedRuntimeException("Cannot find the adapter type from the given " +
                    "adapter information " + adapterDescription, log);
        }

        String className = (String) adapterDescription.getValue();

        InputAdaptable resourceAdapter = (InputAdaptable) ClassHelper.createInstance(className);
        if (resourceAdapter == null) {
            throw new LoggedRuntimeException("Cannot create an adapter instance from the given " +
                    "adapter information " + adapterDescription, log);
        }
        adaptersMap.put(type, resourceAdapter);
    }
View Full Code Here

            AXIOMXPath axiomxPath = new AXIOMXPath(xpath);
            axiomxPath.addNamespaces(source);
            return axiomxPath;
        } catch (JaxenException e) {
            throw new LoggedRuntimeException("Error creating XPath " + xpath, log);
        }
    }
View Full Code Here

        if (o instanceof Calendar) {
            return (Calendar) o;
        } else if (o instanceof String) {
            return ConverterUtil.convertToDateTime((String) o);
        } else {
            throw new LoggedRuntimeException("Invalid XPath :  " + xpath + ". Can not create" +
                    " a datatime from the value : " + o, log);
        }
    }
View Full Code Here

        if (o instanceof Integer) {
            return (Integer) o;
        } else if (o instanceof String) {
            return ConverterUtil.convertToInt((String) o);
        } else {
            throw new LoggedRuntimeException("Invalid XPath :  " + xpath + ". Can not select" +
                    " a int from the value : " + o, log);
        }
    }
View Full Code Here

        if (o instanceof BigInteger) {
            return (BigInteger) o;
        } else if (o instanceof String) {
            return ConverterUtil.convertToInteger((String) o);
        } else {
            throw new LoggedRuntimeException("Invalid XPath :  " + xpath + ". Can not select" +
                    " a integer from the value : " + o, log);
        }
    }
View Full Code Here

        if (o instanceof Double) {
            return (Double) o;
        } else if (o instanceof String) {
            return ConverterUtil.convertToDouble((String) o);
        } else {
            throw new LoggedRuntimeException("Invalid XPath :  " + xpath + ". Can not select" +
                    " a double from the value : " + o, log);
        }
    }
View Full Code Here

TOP

Related Classes of org.wso2.carbon.rulecep.commons.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.