Package org.apache.excalibur.instrument.manager

Examples of org.apache.excalibur.instrument.manager.InstrumentableDescriptor


    /*---------------------------------------------------------------
     * Methods
     *-------------------------------------------------------------*/
    private void assertInstrumentableExists( String name )
    {
        InstrumentableDescriptor descriptor =
            m_instrumentManager.locateInstrumentableDescriptor( name );
        assertEquals( "Looked up instrumentable name incorrect.", descriptor.getName(), name );
    }
View Full Code Here


    {
        String name = getParameter( parameters, "name" );
        boolean packed = getBooleanParameter( parameters, "packed", false );
        boolean recurse = getBooleanParameter( parameters, "recurse", false );
       
        InstrumentableDescriptor desc;
        try
        {
            desc = getInstrumentManager().locateInstrumentableDescriptor( name );
        }
        catch ( NoSuchInstrumentableException e )
View Full Code Here

        }
    }
   
    protected void breadCrumbs( PrintWriter out, InstrumentableDescriptor desc, boolean link )
    {
        InstrumentableDescriptor parent = desc.getParentInstrumentableDescriptor();
        if ( parent == null )
        {
            breadCrumbs( out, true );
        }
        else
View Full Code Here

        tableHeaderCell( out, "Name" );
        endTableHeaderRow( out );
       
        for ( int i = 0; i < descs.length; i++ )
        {
            InstrumentableDescriptor desc = descs[i];
           
            startTableRow( out, i );
            tableCell( out,
                "<a href='instrumentable.html?name=" + urlEncode( desc.getName() ) + "'>"
                + desc.getDescription() + "</a>" );
            endTableRow( out );
        }
       
        endTable( out );
    }
View Full Code Here

        String childIndent = indent + INDENT;
       
        InstrumentableDescriptor[] instrumentables = manager.getInstrumentableDescriptors();
        for ( int i = 0; i < instrumentables.length; i++ )
        {
            InstrumentableDescriptor instrumentable = instrumentables[i];
            if ( recurse )
            {
                outputInstrumentable( out, instrumentable, childIndent, recurse, packed );
            }
            else
View Full Code Here

        {
            String childIndent = indent + INDENT;
           
            for ( int i = 0; i < instrumentables.length; i++ )
            {
                InstrumentableDescriptor child = instrumentables[i];
                if ( recurse )
                {
                    outputInstrumentable( out, child, childIndent, recurse, packed );
                }
                else
View Full Code Here

     */
    public void doGet( String path, Map parameters, PrintWriter out )
        throws IOException
    {
        String name = getParameter( parameters, "name" );
        InstrumentableDescriptor desc;
        try
        {
            desc = getInstrumentManager().locateInstrumentableDescriptor( name );
        }
        catch ( NoSuchInstrumentableException e )
        {
            // Sample no longer exists, go back to the parent instrument.
            int pos = name.lastIndexOf( '.' );
            if ( pos >= 0 )
            {
                throw new HTTPRedirect(
                    "instrumentable.html?name=" + urlEncode( name.substring( 0,  pos ) ) );
            }
            else
            {
                throw new HTTPRedirect( "instrument-manager.html" );
            }
        }
       
        out.println( "<html>" );
        out.println( "<head><title>" + desc.getDescription() + "</title></head>" );
        out.println( "<body>" );
       
        breadCrumbs( out, desc, false );
       
        out.println( "<h2>Instrumentable</h2>" );
        startTable( out );
        tableRow( out, 0, "Name", desc.getName() );
        tableRow( out, 0, "Description", desc.getDescription() );
        endTable( out );
       
        InstrumentableDescriptor[] instrumentables = desc.getChildInstrumentableDescriptors();
        if ( instrumentables.length > 0 )
        {
            out.println( "<h2>Instrumentables</h2>" );
            outputInstrumentables( out, instrumentables );
        }
       
        InstrumentDescriptor[] instruments = desc.getInstrumentDescriptors();
        if ( instruments.length > 0 )
        {
            out.println( "<h2>Instruments</h2>" );
            outputInstruments( out, instruments );
        }
View Full Code Here

        String childIndent = indent + INDENT;
       
        InstrumentableDescriptor[] instrumentables = manager.getInstrumentableDescriptors();
        for ( int i = 0; i < instrumentables.length; i++ )
        {
            InstrumentableDescriptor instrumentable = instrumentables[i];
            if ( recurse )
            {
                outputInstrumentable( out, instrumentable, childIndent, recurse, packed );
            }
            else
View Full Code Here

        {
            String childIndent = indent + INDENT;
           
            for ( int i = 0; i < instrumentables.length; i++ )
            {
                InstrumentableDescriptor child = instrumentables[i];
                if ( recurse )
                {
                    outputInstrumentable( out, child, childIndent, recurse, packed );
                }
                else
View Full Code Here

    {
        String name = getParameter( parameters, "name" );
        boolean packed = getBooleanParameter( parameters, "packed", false );
        boolean recurse = getBooleanParameter( parameters, "recurse", false );
       
        InstrumentableDescriptor desc;
        try
        {
            desc = getInstrumentManager().locateInstrumentableDescriptor( name );
        }
        catch ( NoSuchInstrumentableException e )
View Full Code Here

TOP

Related Classes of org.apache.excalibur.instrument.manager.InstrumentableDescriptor

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.