Examples of VelocityRepresentation


Examples of org.sonatype.plexus.rest.representation.VelocityRepresentation

      dataModel.put("listItems", sortContentListResource(((ContentListResourceResponse) payload).getData()));
      dataModel.put("request", req);
      dataModel.put("nexusVersion", systemStatusProvider.get().getVersion());
      dataModel.put("nexusRoot", BaseUrlHolder.get());

      final VelocityRepresentation representation =
          new VelocityRepresentation(context, "/templates/repositoryContentHtml.vm",
              getClass().getClassLoader(), dataModel, variant.getMediaType());
      return representation;
    }

    return null;
View Full Code Here

Examples of org.sonatype.plexus.rest.representation.VelocityRepresentation

    if (null != status.getThrowable()) {
      dataModel.put("errorStackTrace",
          StringEscapeUtils.escapeHtml(ExceptionUtils.getStackTrace(status.getThrowable())));
    }

    final VelocityRepresentation representation =
        new VelocityRepresentation(Context.getCurrent(), "/templates/errorPageContentHtml.vm",
            getClass().getClassLoader(), dataModel, MediaType.TEXT_HTML);

    return representation;
  }
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.