Examples of content()


Examples of org.eclipse.sapphire.services.DocumentationService.content()

        if( propDocService == null )
        {
            if( elDocService != null )
            {
                title = element.type().getLabel( true, CapitalizationType.TITLE_STYLE, false );
                content.append( elDocService.content() );
                topics.addAll( elDocService.topics() );
            }
        }
        else
        {
View Full Code Here

Examples of org.eclipse.sapphire.ui.forms.HtmlPanelPart.content()

           
            register( browser );
           
            if( def.getContentSourceType().content() == HtmlContentSourceType.EMBEDDED )
            {
                browser.setText( part.content() );
               
                attachPartListener
                (
                    new FilteredListener<ContentEvent>()
                    {
View Full Code Here

Examples of org.elasticsearch.action.view.ViewResponse.content()

    }

    @Test
    public void testDefaultView() throws Exception {
        ViewResponse response = esSetup.client().execute(ViewAction.INSTANCE, new ViewRequest("catalog", "product", "1")).get();
        assertEquals("Rendering the document #1 in version 1 of type product from index catalog", new String(response.content(), "UTF-8"));
    }

    @Test
    public void testFullView() throws Exception {
        ViewResponse response = esSetup.client().execute(ViewAction.INSTANCE, new ViewRequest("catalog", "product", "2").format("full")).get();
View Full Code Here

Examples of org.elasticsearch.hadoop.serialization.builder.ContentBuilder.content()

                    log.warn(String.format("No mapping found [%s] and no schema found; letting Elasticsearch perform auto-mapping...",  settings.getResourceWrite()));
                }
                else {
                    log.info(String.format("No mapping found [%s], creating one based on given schema", settings.getResourceWrite()));
                    ContentBuilder builder = ContentBuilder.generate(schemaWriter).value(schema).flush();
                    BytesArray content = ((FastByteArrayOutputStream) builder.content()).bytes();
                    builder.close();
                    client.putMapping(content);
                    if (log.isDebugEnabled()) {
                        log.debug(String.format("Creating ES mapping [%s] from schema [%s]", content.toString(), schema));
                    }
View Full Code Here

Examples of org.elasticsearch.view.ViewResult.content()

                .source(getResult.sourceAsMap());

        // Ok, let's render it with a ViewEngineService
        ViewResult result = viewService.render(viewContext);

        return new ViewResponse(result.contentType(), result.content());
    }

    private ViewContext extract(Map<String, Object> sourceAsMap, String format) {
        if (sourceAsMap != null) {
            for (String key : sourceAsMap.keySet()) {
View Full Code Here

Examples of org.fusesource.stomp.codec.StompFrame.content()

        for (int i = 0; i < numberOfMessages; i++) {
            StompFrame frame = new StompFrame(SEND);
            frame.addHeader(DESTINATION, StompFrame.encodeHeader("/queue/test"));
            frame.addHeader(MESSAGE_ID, StompFrame.encodeHeader("msg:" + i));
            frame.content(utf8("Important Message " + i));
            producerConnection.send(frame);
        }

        mock.await(5, TimeUnit.SECONDS);
        mock.assertIsSatisfied();
View Full Code Here

Examples of org.jboss.aerogear.controller.router.error.ErrorResponse.content()

    @Override
    public void writeResponse(final Object entity, final RouteContext routeContext) throws Exception {
        if (entity instanceof ErrorResponse) {
            final ErrorResponse errorResponse = (ErrorResponse) entity;
            routeContext.getResponse().setStatus(errorResponse.statusCode());
            writeJsonResponse(errorResponse.content(), routeContext);
        } else {
            if (entity != null) {
                writeJsonResponse(entity, routeContext);
            }
        }
View Full Code Here

Examples of org.jboss.aerogear.io.netty.handler.codec.sockjs.protocol.CloseFrame.content()

public class CloseFrameTest {

    @Test
    public void content() {
        final CloseFrame closeFrame = new CloseFrame(3000, "Go away!");
        assertThat(closeFrame.content().toString(CharsetUtil.UTF_8), equalTo("c[3000,\"Go away!\"]"));
        closeFrame.release();
    }

}
View Full Code Here

Examples of org.jboss.aerogear.io.netty.handler.codec.sockjs.protocol.Frame.content()

                final ByteBuf content = wrapWithLN(new PreludeFrame().content());
                final DefaultHttpContent preludeChunk = new DefaultHttpContent(content);
                ctx.writeAndFlush(preludeChunk);
            }

            ctx.writeAndFlush(new DefaultHttpContent(wrapWithLN(frame.content())), promise);
            if (frame instanceof CloseFrame) {
                ctx.writeAndFlush(LastHttpContent.EMPTY_LAST_CONTENT).addListener(ChannelFutureListener.CLOSE);
            }

            if (maxBytesLimit(frame.content().readableBytes())) {
View Full Code Here

Examples of org.jboss.aerogear.io.netty.handler.codec.sockjs.protocol.PreludeFrame.content()

public class PreludeFrameTest {

    @Test
    public void content() {
        final PreludeFrame preludeFrame = new PreludeFrame();
        assertThat(preludeFrame.content().capacity(), is(PreludeFrame.CONTENT_SIZE));
        assertThat(getContent(preludeFrame), equalTo(expectedContent(PreludeFrame.CONTENT_SIZE)));
    }

    private static byte[] getContent(final PreludeFrame preludeFrame) {
        final byte[] actualContent = new byte[PreludeFrame.CONTENT_SIZE];
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.