Package org.tubo.exception

Examples of org.tubo.exception.TuboResourceException


        }
        if (def instanceof ConnectionDef) {
            buffer = appendSpringDefinition(buffer,def,BEAN_CONNECTION_TEMPLATE,props);
            return buffer;
        }
        throw new TuboResourceException("Definition type not know.");
    }
View Full Code Here


            // indicative of as serious problem...)
            Template template =  null;
            try {
                template = Velocity.getTemplate(templateFile);
            } catch( ResourceNotFoundException rnfe ) {
                throw new TuboResourceException("Velocity template "+templateFile+" can't be founded",rnfe);
            } catch( ParseErrorException pee ) {
                throw new TuboResourceException("Velocity parsing error procesing template "+templateFile,pee);
            }
            //
            // Now have the template engine process your template using the
            // data placed into the context.  Think of it as a  'merge'
            // of the template and the data to produce the output stream.
            StringWriter writer = new StringWriter();
            if ( template != null)
                template.merge(context, writer);
            //
            //  flush and cleanup
            writer.flush();
            writer.close();

            buffer.append(writer.toString());
        } catch (Exception e) {
            throw new TuboResourceException("Error creating spring definition",e);
        }
        return buffer;
    }
View Full Code Here

TOP

Related Classes of org.tubo.exception.TuboResourceException

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.