Package org.apache.commons.jelly

Examples of org.apache.commons.jelly.JellyTagException


    {
        ConcatTag tag = (ConcatTag) findAncestorWithClass( ConcatTag.class );

        if ( tag == null )
        {
            throw new JellyTagException( "no current concatenation" );
        }

        tag.addFile( file );
    }
View Full Code Here


        {
            log.error( "Plugin '" + plugin + "' in project '" + project + "' is not available" );
        }
        catch ( Exception e )
        {
            throw new JellyTagException( "Error loading plugin", e );
        }
    }
View Full Code Here

        {
            manager.uninstallPlugin( artifactId );
        }
        catch ( IOException e )
        {
            throw new JellyTagException( "error uninstalling plugin", e );
        }
    }
View Full Code Here

        {
            log.error( "Plugin '" + plugin + "' in project '" + project + "' is not available" );
        }
        catch ( Exception e )
        {
            throw new JellyTagException( "Error loading plugin", e );
        }
    }
View Full Code Here

        {
            BeanUtils.setProperty(this, theName, theValue);
        }
        catch (IllegalAccessException anException)
        {
            throw new JellyTagException(anException);
        }
        catch (InvocationTargetException anException)
        {
            throw new JellyTagException(anException);
        }
       
    }
View Full Code Here

        {
            BeanUtils.setProperty(this, theName, theValue);
        }
        catch (IllegalAccessException anException)
        {
            throw new JellyTagException(anException);
        }
        catch (InvocationTargetException anException)
        {
            throw new JellyTagException(anException);
        }

    }
View Full Code Here

    public void run(JellyContext context, XMLOutput output) throws JellyTagException {

        try {
            startNamespacePrefixes(output);
        } catch (SAXException e) {
            throw new JellyTagException("could not start namespace prefixes",e);
        }

        Tag tag = null;
        try {
            tag = getTag();

            // lets see if we have a dynamic tag
            if (tag instanceof StaticTag) {
                tag = findDynamicTag(context, (StaticTag) tag);
            }

            setTag(tag);
        } catch (JellyException e) {
            throw new JellyTagException(e);
        }

        try {
            if ( tag == null ) {
                return;
            }
            tag.setContext(context);

            DynaTag dynaTag = (DynaTag) tag;

            // ### probably compiling this to 2 arrays might be quicker and smaller
            for (Iterator iter = attributes.entrySet().iterator(); iter.hasNext();) {
                Map.Entry entry = (Map.Entry) iter.next();
                String name = (String) entry.getKey();
                Expression expression = (Expression) entry.getValue();

                Object value = null;

                if ( Expression.class.isAssignableFrom( dynaTag.getAttributeType(name) ) ) {
                    value = expression;
                } else {
                    value = expression.evaluate(context);
                }

                dynaTag.setAttribute(name, value);
            }

            tag.doTag(output);
        }
        catch (JellyTagException e) {
            handleException(e);
        }
        catch (RuntimeException e) {
            handleException(e);
        }

        try {
            endNamespacePrefixes(output);
        } catch (SAXException e) {
            throw new JellyTagException("could not end namespace prefixes",e);
        }
    }
View Full Code Here

        if ( text != null ) {

            try {
              output.write(text);
            } catch (SAXException e) {
                throw new JellyTagException("Could not write to XMLOutput",e);
            }

        }
    }
View Full Code Here

            log.trace( "Caught exception: " + e, e );
        }

        applyLocation(e);

        throw new JellyTagException(e);
    }
View Full Code Here

        if ( e instanceof JellyException ) {
            e.fillInStackTrace();
        }

        if ( e instanceof InvocationTargetException) {
            throw new JellyTagException( ((InvocationTargetException)e).getTargetException(),
                                      fileName,
                                      elementName,
                                      columnNumber,
                                      lineNumber );
        }

        throw new JellyTagException(e, fileName, elementName, columnNumber, lineNumber);
    }
View Full Code Here

TOP

Related Classes of org.apache.commons.jelly.JellyTagException

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.