Package com.britesnow.snow

Examples of com.britesnow.snow.SnowException


        String key = getParam(args,"key",String.class);
       
        LinkType linkType = ObjectUtil.getValue(typeStr, LinkType.class, null);
       
        if (linkType == null){
            throw new SnowException(Alert.NOT_VALID_WEBBUNDLE_TYPE,"type",typeStr);
        }
       
        String fileExt = "." + linkType.name();

        BufferedWriter bw = new BufferedWriter(env.getOut());
       
        //Part part = webApplication.getPart(path);
        //File folder = part.getResourceFile();
        String resourcePath = resourcePathResolver.resolve(path, rc);
        File folder = pathFileResolver.resolve(resourcePath,rc);
       
        if (!folder.exists()){
            throw new SnowException(Alert.NOT_VALID_WEBBUNDLE_PATH,"path",folder.getAbsolutePath());
        }
       
        StringBuilder sb = new StringBuilder();
       
        //if debug mode, include all the files
View Full Code Here


    // --------- WebHandler Processing --------- //
    WebActionResponse processWebAction(String actionName, RequestContext rc) {
        WebActionHandlerRef webActionRef = webObjectRegistry.getWebActionHandlerRef(actionName);

        if (webActionRef == null) {
            throw new SnowException(Error.NO_WEB_ACTION, "WebAction", actionName);
        }

        // --------- Invoke Method --------- //

        Object result = null;
View Full Code Here

    private void init(Class[] jaxbClasses) {
        this.jaxbClasses = jaxbClasses;
        try {
            jaxbContext = JAXBContext.newInstance(jaxbClasses);
        } catch (JAXBException e) {
            throw new SnowException(Alert.CANNOT_INIT_JAXBCONTEXT, e, "jaxbClasses", jaxbClasses);
        }
    }
View Full Code Here

            Unmarshaller m;
            try {
                m = jaxbContext.createUnmarshaller();
                obj = (T) m.unmarshal(element);
            } catch (JAXBException e) {
                throw new SnowException(Alert.CANNOT_CREATE_OBJECT_FROM_XML_ELEMENT, e);
            }
        }

        return obj;
    }
View Full Code Here

            }
            m.marshal(obj, rootElement);
            value = (Element) rootElement.getLastChild();

        } catch (JAXBException e) {
            throw new SnowException(Alert.CANNOT_CREATE_XML_FROM_OBJECT, e, "object", obj);
        }
        return value;
    }
View Full Code Here

    // --------- WebHandler Processing --------- //
    WebActionResponse processWebAction(String actionName, RequestContext rc) {
        WebActionHandlerRef webActionRef = webObjectRegistry.getWebActionHandlerRef(actionName);

        if (webActionRef == null) {
            throw new SnowException(Error.NO_WEB_ACTION, "WebAction", actionName);
        }

        // --------- Invoke Method --------- //
        Object result = null;
        try {
View Full Code Here

    // --------- WebHandler Processing --------- //
    WebActionResponse processWebAction(String actionName, RequestContext rc) {
        WebActionHandlerRef webActionRef = webObjectRegistry.getWebActionHandlerRef(actionName);

        if (webActionRef == null) {
            throw new SnowException(Error.NO_WEB_ACTION, "WebAction", actionName);
        }

        // --------- Invoke Method --------- //
        boolean invokeWebAction = true;
View Full Code Here

        String key = getParam(args,"key",String.class);
       
        LinkType linkType = ObjectUtil.getValue(typeStr, LinkType.class, null);
       
        if (linkType == null){
            throw new SnowException(Alert.NOT_VALID_WEBBUNDLE_TYPE,"type",typeStr);
        }
       
        String fileExt = "." + linkType.name();

        BufferedWriter bw = new BufferedWriter(env.getOut());
       
        //Part part = webApplication.getPart(path);
        //File folder = part.getResourceFile();
        File folder = pathFileResolver.resolve(path);
       
        if (!folder.exists()){
            throw new SnowException(Alert.NOT_VALID_WEBBUNDLE_PATH,"path",folder.getAbsolutePath());
        }
       
        StringBuilder sb = new StringBuilder();
       
        //if debug mode, include all the files
View Full Code Here

            try {
                namingStrategyClass = Class.forName(namingStrategyClassStr);
                NamingStrategy namingStrategy = (NamingStrategy) namingStrategyClass.newInstance();
                cfg.setNamingStrategy(namingStrategy);
            } catch (Exception e) {
                throw new SnowException(Error.ERROR_INITIALIZING_NAMING_STRATEGY_CLASS,e, "namingStrategyClass",
                                        namingStrategyClassStr);
            }

        }
View Full Code Here

    private void init(Class[] jaxbClasses) {
        this.jaxbClasses = jaxbClasses;
        try {
            jaxbContext = JAXBContext.newInstance(jaxbClasses);
        } catch (JAXBException e) {
            throw new SnowException(Alert.CANNOT_INIT_JAXBCONTEXT, e, "jaxbClasses", jaxbClasses);
        }
    }
View Full Code Here

TOP

Related Classes of com.britesnow.snow.SnowException

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.