Package org.apache.commons.jelly

Examples of org.apache.commons.jelly.MissingAttributeException


            message = "field";
        else if(className == null)
            message = "className";

        if(message != null)
            throw new MissingAttributeException(message);

        try {
            Class type     = ClassLoaderUtils.getClassLoader(getClass()).loadClass(className);
            Object result  = type.getField(field).get(null);
            JellyContext context = getContext();
View Full Code Here


        this.defaultEncountered = false;
        this.someCaseMatched = false;
        this.fallingThru = false;
               
        if(null == on) {
            throw new MissingAttributeException("on");
        } else {
            value = on.evaluate(context);
            invokeBody(output);
        }
    }
View Full Code Here

            return (Class) classObject;
        }
        else if ( classObject == null ) {
            Class theClass = getDefaultClass();
            if (theClass == null) {
                throw new MissingAttributeException("class");
            }
            return theClass;
        }
        else {
            String className = classObject.toString();
View Full Code Here

        this.fallThru = fallThru;
    }

    public void doTag(XMLOutput output) throws MissingAttributeException, JellyTagException {
        if(null == this.valueExpression) {
            throw new MissingAttributeException("value");
        }
        SwitchTag tag = (SwitchTag)findAncestorWithClass(SwitchTag.class);
        if(null == tag) {
            throw new JellyTagException("This tag must be enclosed inside a <switch> tag" );
        }
View Full Code Here

    public void doTag(XMLOutput output) throws MissingAttributeException {
        if (var != null) {
            context.removeVariable( var.evaluateAsString(context) );
        }
        else {
            throw new MissingAttributeException("var");
        }
    }
View Full Code Here

    //-------------------------------------------------------------------------
    public void doTag(XMLOutput output)
        throws MissingAttributeException, JellyTagException {

        if (uri == null && file == null) {
            throw new MissingAttributeException("uri");
        }

        // we need to create a new JellyContext of the URI
        // take off the script name from the URL
        String text = null;
View Full Code Here

     * @throws MissingAttributeException if a required attribute is missing
     * @throws JellyTagException on any other errors
     */
    public void doTag(XMLOutput output) throws MissingAttributeException, JellyTagException {
        if (uri == null && file == null) {
            throw new MissingAttributeException( "uri" );
        }

        try {
            if (uri != null) {
                // we need to create a new JellyContext of the URI
View Full Code Here

            if (test.evaluateAsBoolean(context)) {
                invokeBody(output);
            }
        }
        else {
            throw new MissingAttributeException( "test" );
        }

    }
View Full Code Here

                    log.debug("loop terminated by break: " + e, e);
                }
            }
        }
        else {
            throw new MissingAttributeException("test");
        }
    }
View Full Code Here

        for ( Iterator iter = attributes.values().iterator(); iter.hasNext(); ) {
            Attribute attribute = (Attribute) iter.next();
            String name = attribute.getName();
            if ( ! setAttributesSet.contains( name ) ) {
                if ( attribute.isRequired() ) {
                    throw new MissingAttributeException(name);
                }
                // lets get the default value
                Object value = null;
                Expression expression = attribute.getDefaultValue();
                if ( expression != null ) {
View Full Code Here

TOP

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

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.