Package org.apache.commons.jelly

Examples of org.apache.commons.jelly.MissingAttributeException


    protected void checkAttribute( Object attribute, String message )
        throws MissingAttributeException
    {
        if ( attribute == null )
        {
            throw new MissingAttributeException( message );
        }
    }
View Full Code Here


    // Tag interface
    //-------------------------------------------------------------------------
    public void doTag(XMLOutput output) throws JellyTagException {
        if (test == null && xpath == null) {
            throw new MissingAttributeException( "test" );
        }
        if (test != null) {
            if (! test.evaluateAsBoolean(context)) {
                fail( getBodyText(), "evaluating test: "+ test.getExpressionText() );
            }
View Full Code Here

        Test test = getTest();
        if ( test == null ) {
            test = (Test) context.getVariable("org.apache.commons.jelly.junit.suite");
        }
        if ( test == null ) {
            throw new MissingAttributeException( "test" );
        }
        TestResult result = getResult();
        if ( result == null ) {
            result = createResult(output);
        }
View Full Code Here

    public void doTag( final XMLOutput output )
        throws JellyTagException
    {
        if ( var == null )
        {
            throw new MissingAttributeException( "var" );
        }

        Map answer = createMap();

        Iterator iter = getProject().getGoals().iterator();
View Full Code Here

        this.cactusScanner.processFileSet(this.fileset, cp);

        // output the cactusScanner
        if (var == null)
        {
            throw new MissingAttributeException("var");
        }
        context.setVariable(var, cactusScanner);
    }
View Full Code Here

        Test test = getTest();
        if ( test == null ) {
            test = (Test) context.getVariable("org.apache.commons.jelly.junit.suite");
        }
        if ( test == null ) {
            throw new MissingAttributeException( "test" );
        }
        TestResult result = getResult();
        if ( result == null ) {
            result = createResult(output);
        }
View Full Code Here

    // Tag interface
    //-------------------------------------------------------------------------
    public void doTag(XMLOutput output) throws JellyTagException {
        if (test == null && xpath == null) {
            throw new MissingAttributeException( "test" );
        }
        if (test != null) {
            if (! test.evaluateAsBoolean(context)) {
                fail( getBodyText(), "evaluating test: "+ test.getExpressionText() );
            }
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

                }
            }
            else {
                if ( end == Integer.MAX_VALUE && begin == 0 ) {
                    throw new MissingAttributeException( "items" );
                }
                else {
                    String varName = var;
                    if ( varName == null ) {
                        varName = indexVar;
View Full Code Here

                } catch (JellyException e) {
                    throw new JellyTagException(e);
                }
            }
            if (bean == null) {
                throw new MissingAttributeException("bean");
            }
        }
        setBeanProperties(bean, attributes);
    }
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.