Examples of render()


Examples of org.apache.hadoop.yarn.webapp.View.render()

    if(params != null) {
      for(Map.Entry<String, String> entry: params.entrySet()) {
        view.set(entry.getKey(), entry.getValue());
      }
    }
    view.render();
    flushOutput(injector);
    return injector;
  }
 
  public static <T> Injector testPage(Class<? extends View> page, Class<T> api,
View Full Code Here

Examples of org.apache.hadoop.yarn.webapp.log.AggregatedLogsBlockForTest.render()

        configuration, "owner", "container_0_0001_01_000001");
    ByteArrayOutputStream data = new ByteArrayOutputStream();
    PrintWriter printWriter = new PrintWriter(data);
    HtmlBlock html = new HtmlBlockForTest();
    HtmlBlock.Block block = new BlockForTest(html, printWriter, 10, false);
    aggregatedBlock.render(block);

    block.getWriter().flush();
    String out = data.toString();
    assertTrue(out
        .contains("User [owner] is not authorized to view the logs for entity"));
View Full Code Here

Examples of org.apache.hbase.tmpl.master.MasterStatusTmpl.render()

      .setDeadServers(deadServers);
    if (request.getParameter("filter") != null)
      tmpl.setFilter(request.getParameter("filter"));
    if (request.getParameter("format") != null)
      tmpl.setFormat(request.getParameter("format"));
    tmpl.render(response.getWriter(),
          master, admin);
  }

  private ServerName getRootLocationOrNull(HMaster master) {
    try {
View Full Code Here

Examples of org.apache.hbase.tmpl.regionserver.RSStatusTmpl.render()

    RSStatusTmpl tmpl = new RSStatusTmpl();
    if (req.getParameter("format") != null)
      tmpl.setFormat(req.getParameter("format"));
    if (req.getParameter("filter") != null)
      tmpl.setFilter(req.getParameter("filter"));
    tmpl.render(resp.getWriter(), hrs);
  }

}
View Full Code Here

Examples of org.apache.isis.viewer.json.viewer.resources.domainobjects.DomainObjectReprRenderer.render()

        final RendererFactory domainObjectRendererFactory = rendererFactoryRegistry.find(RepresentationType.DOMAIN_OBJECT);
        final DomainObjectReprRenderer domainObjectRenderer = (DomainObjectReprRenderer) domainObjectRendererFactory.newRenderer(getResourceContext(), null, JsonRepresentation.newMap());
        final ObjectAdapter transientInstance = getResourceContext().getPersistenceSession().createInstance(domainTypeSpec);
        domainObjectRenderer.with(transientInstance).includesSelf();

        renderer.with(domainTypeSpec).withSelf(selfLink).withValue(domainObjectRenderer.render());

        return responseOfOk(renderer, Caching.ONE_DAY).build();
    }

    private static String domainTypeFor(final String domainTypeStr, final String argumentsQueryString, final String argsParamName) {
View Full Code Here

Examples of org.apache.isis.viewer.json.viewer.resources.domainobjects.ListReprRenderer.render()

            final RendererFactory factory = RendererFactoryRegistry.instance.find(RepresentationType.LIST);

            final ListReprRenderer renderer = (ListReprRenderer) factory.newRenderer(getResourceContext(), linkFollower, JsonRepresentation.newMap());
            renderer.usingLinkToBuilder(new DomainServiceLinkTo()).withSelf("services").with(serviceAdapters);

            link.mapPut("value", renderer.render());
        }

        getLinks().arrayAdd(link);
    }
View Full Code Here

Examples of org.apache.isis.viewer.json.viewer.resources.domaintypes.TypeListReprRenderer.render()

            final Collection<ObjectSpecification> specifications = getResourceContext().getSpecificationLookup().allSpecifications();

            renderer.withSelf("domainTypes").with(specifications);

            link.mapPut("value", renderer.render());
        }

        getLinks().arrayAdd(link);
    }
View Full Code Here

Examples of org.apache.isis.viewer.json.viewer.resources.user.UserReprRenderer.render()

        if (linkFollower.matches(link)) {
            final RendererFactory factory = RendererFactoryRegistry.instance.find(RepresentationType.USER);
            final UserReprRenderer renderer = (UserReprRenderer) factory.newRenderer(getResourceContext(), linkFollower, JsonRepresentation.newMap());
            renderer.with(getResourceContext().getAuthenticationSession());

            link.mapPut("value", renderer.render());
        }

        getLinks().arrayAdd(link);
    }
View Full Code Here

Examples of org.apache.isis.viewer.json.viewer.resources.version.VersionReprRenderer.render()

        if (linkFollower.matches(link)) {

            final RendererFactory factory = RendererFactoryRegistry.instance.find(RepresentationType.VERSION);
            final VersionReprRenderer renderer = (VersionReprRenderer) factory.newRenderer(getResourceContext(), linkFollower, JsonRepresentation.newMap());

            link.mapPut("value", renderer.render());
        }

        getLinks().arrayAdd(link);
    }
View Full Code Here

Examples of org.apache.isis.viewer.restfulobjects.rendering.domainobjects.DomainObjectReprRenderer.render()

    JsonRepresentation asPayloadRepr(final RendererContext rendererContext, EventPayload payload) {
        final DomainObjectReprRenderer renderer = new DomainObjectReprRenderer(rendererContext, null, JsonRepresentation.newMap());
        final ObjectAdapter objectAdapter = rendererContext.getAdapterManager().adapterFor(payload);
        renderer.with(objectAdapter).asEventSerialization();
        return renderer.render();
    }

    String jsonFor(final Object object) {
        try {
            return getJsonMapper().write(object);
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.