Examples of DefaultRenderer


Examples of com.cedarsoft.renderer.DefaultRenderer

   * @param presenter a {@link Renderer} object.
   */
  protected <T> void printPossibleElements( @Nonnull List<? extends T> elements, @Nullable Renderer<? super T, Object> presenter ) {
    if ( presenter == null ) {
      //noinspection AssignmentToMethodParameter
      presenter = new DefaultRenderer();
    }
    int index = 0;
    for ( T element : elements ) {
      out( "\t" + index + '\t' + presenter.render( element, null ) );
      index++;
View Full Code Here

Examples of org.apache.ambari.server.api.query.render.DefaultRenderer

   * @param name   name of sub resource
   * @param query  sub resource
   */
  private void addSubResource(String name, QueryImpl query) {
    // renderer specified for request only applies to top level query
    query.setRenderer(new DefaultRenderer());
    requestedSubResources.put(name, query);
  }
View Full Code Here

Examples of org.apache.ambari.server.api.query.render.DefaultRenderer

  }

  @Override
  public Renderer getRenderer(String name) {
    if (name == null || name.equals("default")) {
      return new DefaultRenderer();
    } else if (name.equals("minimal")) {
      return new MinimalRenderer();
    } else {
      throw new IllegalArgumentException("Invalid renderer name: " + name +
          " for resource of type: " + m_type);
View Full Code Here

Examples of org.apache.ambari.server.api.query.render.DefaultRenderer

    RequestStatus status = createMock(RequestStatus.class);
    Resource resource1 = createMock(Resource.class);
    Resource resource2 = createMock(Resource.class);
    Predicate userPredicate = createNiceMock(Predicate.class);
    Query query = createNiceMock(Query.class);
    Renderer renderer = new DefaultRenderer();

    Set<Resource> setResources = new HashSet<Resource>();
    setResources.add(resource1);
    setResources.add(resource2);
View Full Code Here

Examples of org.apache.ambari.server.api.query.render.DefaultRenderer

    RequestStatus status = createMock(RequestStatus.class);
    Resource resource1 = createMock(Resource.class);
    Resource resource2 = createMock(Resource.class);
    Predicate userPredicate = createNiceMock(Predicate.class);
    Query query = createNiceMock(Query.class);
    Renderer renderer = new DefaultRenderer();

    Set<Resource> setResources = new HashSet<Resource>();
    setResources.add(resource1);
    setResources.add(resource2);
View Full Code Here

Examples of org.apache.ambari.server.api.query.render.DefaultRenderer

    Resource resource1 = createMock(Resource.class);
    Resource resource2 = createMock(Resource.class);
    Resource requestResource = createMock(Resource.class);
    Predicate userPredicate = createNiceMock(Predicate.class);
    Query query = createNiceMock(Query.class);
    Renderer renderer = new DefaultRenderer();

    Set<Resource> setResources = new HashSet<Resource>();
    setResources.add(resource1);
    setResources.add(resource2);
View Full Code Here

Examples of org.apache.ambari.server.api.query.render.DefaultRenderer

    Query query = createStrictMock(Query.class);
    PersistenceManager pm = createStrictMock(PersistenceManager.class);
    RequestStatus status = createNiceMock(RequestStatus.class);
    Resource resource1 = createNiceMock(Resource.class);
    Resource resource2 = createNiceMock(Resource.class);
    Renderer renderer = new DefaultRenderer();

    Set<Resource> setResources = new HashSet<Resource>();
    setResources.add(resource1);
    setResources.add(resource2);
View Full Code Here

Examples of org.apache.ambari.server.api.query.render.DefaultRenderer

    Query query = createStrictMock(Query.class);
    PersistenceManager pm = createStrictMock(PersistenceManager.class);
    RequestStatus status = createNiceMock(RequestStatus.class);
    Resource resource1 = createNiceMock(Resource.class);
    Resource resource2 = createNiceMock(Resource.class);
    Renderer renderer = new DefaultRenderer();

    Set<Resource> setResources = new HashSet<Resource>();
    setResources.add(resource1);
    setResources.add(resource2);
View Full Code Here

Examples of org.apache.ambari.server.api.query.render.DefaultRenderer

    PersistenceManager pm = createStrictMock(PersistenceManager.class);
    RequestStatus status = createNiceMock(RequestStatus.class);
    Resource resource1 = createNiceMock(Resource.class);
    Resource resource2 = createNiceMock(Resource.class);
    Resource requestResource = createNiceMock(Resource.class);
    Renderer renderer = new DefaultRenderer();

    Set<Resource> setResources = new HashSet<Resource>();
    setResources.add(resource1);
    setResources.add(resource2);
View Full Code Here

Examples of org.apache.ambari.server.api.query.render.DefaultRenderer

   * @param name   name of sub resource
   * @param query  sub resource
   */
  private void addSubResource(String name, QueryImpl query) {
    // renderer specified for request only applies to top level query
    query.setRenderer(new DefaultRenderer());
    requestedSubResources.put(name, query);
  }
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.