Package org.restlet.representation

Examples of org.restlet.representation.RepresentationInfo


    if (cacheInfo != null) {
      Date lastModified = cacheInfo.getLastModified();
      Tag entityTag = cacheInfo.getEntityTag();

      for (MediaType mediaType : mediaTypes) {
        getVariants().add(new RepresentationInfo(mediaType, lastModified, entityTag));
      }
    }
    else {
      for (MediaType mediaType : mediaTypes) {
        getVariants().add(new Variant(mediaType));
View Full Code Here


     */
    protected Representation doConditionalHandle() throws ResourceException {
        Representation result = null;

        if (getConditions().hasSome()) {
            RepresentationInfo resultInfo = null;

            if (existing) {
                if (isNegotiated()) {
                    resultInfo = doGetInfo(getPreferredVariant(getVariants(Method.GET)));
                } else {
View Full Code Here

     *
     * @return The response entity.
     * @throws ResourceException
     */
    private RepresentationInfo doGetInfo() throws ResourceException {
        RepresentationInfo result = null;
        AnnotationInfo annotationInfo = getAnnotation(Method.GET);

        if (annotationInfo != null) {
            result = doHandle(annotationInfo, null);
        } else {
View Full Code Here

     * @return The response entity descriptor.
     * @throws ResourceException
     */
    private RepresentationInfo doGetInfo(Variant variant)
            throws ResourceException {
        RepresentationInfo result = null;

        if (variant != null) {
            if (variant instanceof VariantInfo) {
                result = doHandle(((VariantInfo) variant).getAnnotationInfo(),
                        variant);
View Full Code Here

     * @see org.restlet.resource.ServerResource#getInfo(org.restlet.representation.Variant)
     */
    @Override
    protected RepresentationInfo getInfo(Variant variant)
            throws ResourceException {
        return new RepresentationInfo(variant, new Date(lastModification()));
    }
View Full Code Here

TOP

Related Classes of org.restlet.representation.RepresentationInfo

Copyright © 2018 www.massapicom. 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.