Examples of makeRenderer()


Examples of com.pugh.sockso.templates.TCsvResultSet.makeRenderer()

            // csv
            else if ( format.equals(Format.CSV) ) {
                final TCsvResultSet tpl = new TCsvResultSet();
                tpl.setResultSet( rs );
                renderer = tpl.makeRenderer();
            }
           
            // json
            else if ( format.equals(Format.JSON) ) {
                final TResultSet tpl = new TResultSet();
View Full Code Here

Examples of com.pugh.sockso.templates.TCsvResultSet.makeRenderer()

           
            // json
            else if ( format.equals(Format.JSON) ) {
                final TResultSet tpl = new TResultSet();
                tpl.setResultSet( rs );
                renderer = tpl.makeRenderer();
            }

            if ( renderer != null )
                return renderer.asString();
View Full Code Here

Examples of com.pugh.sockso.templates.TRSSLatest.makeRenderer()

       
        tpl.setProperties( getProperties() );
        tpl.setHost( host );
        tpl.setTracks( tracks );
       
        getResponse().showRss( tpl.makeRenderer() );
                   
    }

}
View Full Code Here

Examples of com.pugh.sockso.templates.TXmlResultSet.makeRenderer()

           
            // xml
            if ( format.equals(Format.XML) ) {
                final TXmlResultSet tpl = new TXmlResultSet();
                tpl.setResultSet( rs );
                renderer = tpl.makeRenderer();
            }

            // csv
            else if ( format.equals(Format.CSV) ) {
                final TCsvResultSet tpl = new TCsvResultSet();
View Full Code Here

Examples of com.pugh.sockso.templates.TXmlResultSet.makeRenderer()

            // csv
            else if ( format.equals(Format.CSV) ) {
                final TCsvResultSet tpl = new TCsvResultSet();
                tpl.setResultSet( rs );
                renderer = tpl.makeRenderer();
            }
           
            // json
            else if ( format.equals(Format.JSON) ) {
                final TResultSet tpl = new TResultSet();
View Full Code Here

Examples of com.pugh.sockso.templates.TXmlResultSet.makeRenderer()

           
            // json
            else if ( format.equals(Format.JSON) ) {
                final TResultSet tpl = new TResultSet();
                tpl.setResultSet( rs );
                renderer = tpl.makeRenderer();
            }

            if ( renderer != null )
                return renderer.asString();
View Full Code Here

Examples of com.pugh.sockso.templates.TXspf.makeRenderer()

        tpl.setRequest( req );
        tpl.setProtocol( protocol );
        tpl.setTracks( new Track[] {track} );
        tpl.setProperties( new StringProperties() );
       
        res.showTemplate( tpl.makeRenderer() );
       
        final String data = res.getOutput();
       
        assertTrue( data.length() > 0 );
        assertTrue( data.contains(track.getName()) );
View Full Code Here

Examples of com.pugh.sockso.templates.api.TAlbum.makeRenderer()

    protected void showAlbum( final Album album ) throws IOException {
       
        TAlbum tpl = new TAlbum();
        tpl.setAlbum( album );
       
        getResponse().showJson( tpl.makeRenderer() );
       
    }

    /**
     *  Indicates if the action can handle the request
View Full Code Here

Examples of com.pugh.sockso.templates.api.TAlbums.makeRenderer()

    protected void showAlbums( final List<Album> albums ) throws IOException {
       
        TAlbums tpl = new TAlbums();
        tpl.setAlbums( albums );
       
        getResponse().showJson( tpl.makeRenderer() );
       
    }

    /**
     *  Indicates if the action can handle the request
View Full Code Here

Examples of com.pugh.sockso.templates.api.TAlbums.makeRenderer()

                .name("Album\"")
                .year("1980")
                .build()
                );
        tpl.setAlbums(albums);
        tpl.makeRenderer().renderTo(jsonWriter);

        String expected = "[{\"id\":2,\"name\":\"Album\\\"\",\"date_added\":\"null\",\"artist\":{\"id\":1,\"name\":\"Artist\\\"\",\"date_added\":\"null\"}}]";
        String actual = stringWriter.toString();

        assertEquals( expected, actual );
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.