Examples of ContentType


Examples of org.apache.tapestry5.ContentType

    {
        // This is a complex area as we are trying to keep public and private services properly
        // separated, and trying to keep stateless and stateful (i.e., perthread scope) services
        // separated. So we inform the stateful queue service what it needs to do here ...

        ContentType pageContentType = (ContentType) request.getAttribute(InternalConstants.CONTENT_TYPE_ATTRIBUTE_NAME);

        ContentType contentType = new ContentType(InternalConstants.JSON_MIME_TYPE, outputEncoding);

        MarkupWriter writer = factory.newPartialMarkupWriter(pageContentType);

        JSONObject reply = new JSONObject();

        // ... and here, the pipeline eventually reaches the PRQ to let it render the root render command.

        partialMarkupRenderer.renderMarkup(writer, reply);

        PrintWriter pw = response.getPrintWriter(contentType.toString());

        if (compactJSON)
            reply.print(pw);
        else
            reply.prettyPrint(pw);
View Full Code Here

Examples of org.apache.tapestry5.ContentType

        this.outputEncoding = outputEncoding;
    }

    public void processResultValue(JSONObject value) throws IOException
    {
        ContentType contentType = new ContentType(InternalConstants.JSON_MIME_TYPE, outputEncoding);

        PrintWriter pw = response.getPrintWriter(contentType.toString());

        pw.print(value.toString());

        pw.flush();
    }
View Full Code Here

Examples of org.apache.tapestry5.ContentType

        this.outputEncoding = outputEncoding;
    }

    public void processResultValue(JSONArray value) throws IOException
    {
        ContentType contentType = new ContentType(InternalConstants.JSON_MIME_TYPE, outputEncoding);

        PrintWriter pw = response.getPrintWriter(contentType.toString());

        pw.print(value.toString());

        pw.flush();
    }
View Full Code Here

Examples of org.apache.tapestry5.annotations.ContentType

    {
        ClassTransformation ct = mockClassTransformation();
        MutableComponentModel model = mockMutableComponentModel();
        String value = "text/pdf";

        ContentType annotation = newMock(ContentType.class);

        train_getAnnotation(ct, ContentType.class, annotation);

        expect(annotation.value()).andReturn(value);

        model.setMeta(MetaDataConstants.RESPONSE_CONTENT_TYPE, value);

        replay();
View Full Code Here

Examples of org.dmtf.schemas.ovf.envelope._1.ContentType

        Map<String, TemplateDto> requiredByVSs = new HashMap<String, TemplateDto>();
        DiskSectionType diskSectionType;

        try
        {
            ContentType contentType = OVFEnvelopeUtils.getTopLevelVirtualSystemContent(envelope);

            ProductSectionType product =
                OVFEnvelopeUtils.getSection(contentType, ProductSectionType.class);
            OperatingSystemSectionType ossection = null;
            try
View Full Code Here

Examples of org.docx4j.openpackaging.contenttype.ContentType

 
  public void setAltChunkType(AltChunkType altChunkType) {
    this.altChunkType = altChunkType;

    // ContentType will vary - see spec 11.3.1
    this.setContentType(new ContentType(altChunkType.getContentType()));
  }
View Full Code Here

Examples of org.exolab.castor.xml.schema.ContentType

       }
       ElementDecl schemaElement = new ElementDecl(schema, name);

       // start converting content of the element
       ComplexType complexType = schema.createComplexType();
       ContentType contentType = null;
       Group group = null; // auxiliary
       Iterator mixedChildrenIterator = null; // auxiliary
       String elementRef = null; // auxiliary
       ElementDecl elem = null// auxiliary
View Full Code Here

Examples of org.fenixedu.academic.util.ContentType

                        if (personalPhotoEvenIfPending == null) {
                            missing++;
                            final byte[] content = file.getContent();
                            if (content != null && content.length > 0) {
                                withContent++;
                                final ContentType contentType = ContentType.getContentType(file.getContentType());
                                if (contentType != null) {
                                    withContentType++;
                                    if (chew(content)) {
                                        final Photograph p = new Photograph(PhotoType.INSTITUTIONAL, contentType, content);
                                        p.setState(PhotoState.APPROVED);
View Full Code Here

Examples of org.gatein.common.net.media.ContentType

         queryParameters = Collections.emptyMap();
      }

      if (request.getContentType() != null)
      {
         ContentType contentType = ContentType.create(request.getContentType());
         mediaType = contentType.getMediaType();
      }
      else
      {
         mediaType = null;
      }
View Full Code Here

Examples of org.gatein.management.api.ContentType

   }

   //----------------------------------------- Private Handler -----------------------------------------//
   private Response executeRequest(UriInfo uriInfo, HttpManagedRequest request)
   {
      ContentType contentType = request.getContentType();
      if (contentType == null)
      {
         return Response.notAcceptable(Variant.mediaTypes(ContentTypeUtils.mediaTypes()).build()).build();
      }
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.