Examples of ElementContainer


Examples of org.apache.ecs.ElementContainer

            rundata.getParameters().remove( RETRY_URL );
        }


       
        ElementContainer root = new ElementContainer();

        List urls = URLManager.list( URLManagerService.STATUS_BAD );
       
        root.addElement( "The following " +
                         urls.size() +
                         " URL(s) are considered bad: " );

        root.addElement( new BR() );
       
        root.addElement( "Click on a url to take it out of the list" +
                         " and retry it in when requested. " );

        root.addElement( new BR() );
       
        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() ) {
            URLInfo info = URLManager.getInfo( (String)i.next() );
            /* It can happen that url is no longer in list while
               we are processing */
            if( info != null ) {
                uri.removeQueryData( RETRY_URL );
                uri.addQueryData(RETRY_URL, info.getURL());
                ul.addElement( new LI()
                    .addElement( new A(uri.toString() )
                        .addElement( info.getURL() ) )
                    .addElement( new B( info.getMessage() ) ) );
            }
        }
       
        root.addElement( ul );

        java.util.Hashtable rt = URLFetcher.getRealtimeURLs();

        root.addElement( "The following " +
                         rt.size() +
                         " URL(s) are being loaded: " );

        root.addElement( new BR() );
        ul = new UL();
       
        java.util.Enumeration en = rt.keys();
        while (en.hasMoreElements()) {
            String key = (String)en.nextElement();
            LI li = new LI().addElement( key )
                .addElement( " - by " );
            if (rt.get(key) != null )
                li.addElement( String.valueOf(((Vector)rt.get(key)).size()) )
                    .addElement( " threads." );
            ul.addElement( li );
        }
       
        root.addElement( ul );
       

       
        return root;
    }
View Full Code Here

Examples of org.drools.eclipse.flow.common.editor.core.ElementContainer

* Policy for editing elements.
*/
public class ElementEditPolicy extends ComponentEditPolicy {

    protected Command createDeleteCommand(GroupRequest deleteRequest) {
        ElementContainer parent = (ElementContainer) getHost().getParent().getModel();
        DeleteElementCommand deleteCmd = new DeleteElementCommand();
        deleteCmd.setParent(parent);
        deleteCmd.setChild((ElementWrapper) (getHost().getModel()));
        return deleteCmd;
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.