Package org.apache.turbine.util

Examples of org.apache.turbine.util.ParameterParser


        throws TurbineException
    {
        this.data = data;
        valid_flag = true;
       
        ParameterParser pp = data.getParameters();
        if ( pp.containsKey(getKey()) && pp.getString(getKey()) != null )
        {
            set_flag = true;
            if (validate(pp))
            {
                // iv.reconcileNotValid(pp);
            }
        }
        else if ( pp.containsKey(getValueIfAbsent()) &&
                  pp.getString(getValueIfAbsent()) != null )
        {
            pp.add(getKey(), pp.getString(getValueIfAbsent()));
            set_flag = true;
            validate(pp);
        }

        initialized = true;
View Full Code Here


    {
        // Name of the button.
        String theButton = null;

        // ParameterParser.
        ParameterParser pp = data.getParameters();

        String button = pp.convert(BUTTON);

        // Loop through and find the button.
        for (Enumeration e = pp.keys() ; e.hasMoreElements() ;)
        {
            String key = (String) e.nextElement();
            if (key.startsWith(button))
            {
                theButton = formatString(key);
View Full Code Here

            .append( " within the screen." )
            .append( "<p>" )
            .append( "Please click " );

        message.addElement( sb.toString() );
        ParameterParser pp;
        pp = (ParameterParser)data.getUser().getTemp("prev_parameters");
        pp.remove("_session_access_counter");
        message.addElement( new A().setHref(
            new DynamicURI(data,(String)data.getUser().getTemp("prev_screen"))
                .addPathInfo( pp ).toString()).addElement("here") );
        message.addElement( " to return the the screen you were working on." );
View Full Code Here

    {
        // Name of the button.
        String theButton = null;

        // ParameterParser.
        ParameterParser pp = data.getParameters();

        String button = pp.convert(BUTTON);

        // Loop through and find the button.
        for (Enumeration e = pp.keys() ; e.hasMoreElements() ;)
        {
            String key = (String) e.nextElement();
            if (key.startsWith(button))
            {
                theButton = formatString(key);
View Full Code Here

    /**
    */
    public synchronized ConcreteElement postArticle( String provider, RunData rundata ) {
        ElementContainer ec = new ElementContainer();

        ParameterParser params = rundata.getParameters();       
       
        String topic = params.getString( "topic", "" );
        String title = params.getString( "title", "" );
        String link  = params.getString( "link", "" );
        String description  = params.getString( "description", "" );
       
        //create the JCM item
        Item item = new Item();
        item.setTopic( topic );
        item.setTitle( title );
View Full Code Here

        Table table = new Table().setBorder(0);
        form.addElement( table );
       

        ParameterParser params = rundata.getParameters();
       
        //get the default values if they were specified as params
        String topic = params.getString( "topic", "" );
        String title = params.getString( "title", "" );
        String link  = params.getString( "link", "" );
        String description  = params.getString( "description", "" );
       

        //build a select box for adding topics to.
       
        Content content = null;
View Full Code Here

    /**
    Get the content of a bookmarklet for the given provider.
    */
    private String getBookmarklet( String provider, RunData rundata ) {
       
        ParameterParser params = rundata.getParameters();
       
        StringBuffer buff = new StringBuffer();
       
        //create the JavaScript entry
       
View Full Code Here

       
        UL ul = new UL();
        //FIXME: the getReason() call has to be escaped from HTML markup, CR&LF
        DynamicURI uri = new DynamicURI( rundata );
       
        ParameterParser params = rundata.getParameters();
        uri.addQueryData( params );
       
        Iterator i = urls.iterator();
       
        while ( i.hasNext() ) {
View Full Code Here

    /**
    Get the content for this JCP Admin
    */
    public ConcreteElement getContent( RunData rundata ) {

        ParameterParser params = rundata.getParameters();
       
        String provider = params.getString( PROVIDER_NAME_KEY );
       
        if ( provider == null ) {
            return this.getProviders( rundata );
        } else if ( params.getString( POST_ARTICLE ) != null ) {
            //post the article if the user has hit the submit button.
            params.remove( PROVIDER_NAME_KEY );
            params.remove( POST_ARTICLE );
            return this.postArticle( provider, rundata );
        } else {
            //get the form if a provider is specified.
            params.remove( PROVIDER_NAME_KEY );
            return this.getForm( provider, rundata );
        }
    
    }
View Full Code Here

    private Form getForm( String daemon, RunData rundata ) {


        Form form = new Form();

        ParameterParser params = rundata.getParameters();
        Enumeration keys = params.keys();
        while( keys.hasMoreElements() ) {
            String key = (String)keys.nextElement();
            String value = (String)params.getString(key, "");
            form.addElement( new Input( ).setName( key )
                .setType( "hidden" )
                .setValue( value ) );
        }
View Full Code Here

TOP

Related Classes of org.apache.turbine.util.ParameterParser

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.