Examples of ContentType


Examples of com.google.opengse.httputil.ContentType

    }

    // We need to modify the Content-Type header as a result.
    String contentTypeString = getContentType();
    if (contentTypeString != null) {
      ContentType ctype = ContentType.parse(contentTypeString);
      if (specified_charset == null) {
        ctype.removeParameter("charset");
      } else {
        ctype.setParameter("charset", specified_charset);
      }
      setHeader("Content-Type", ctype.toString());
    }
  }
View Full Code Here

Examples of com.ibm.wps.pe.om.definition.ContentType

        for(Iterator iterator =
            ((ServletDefinition) getPortletDefinitionFromRequest(request).
            getServletDefinition()).getContentTypeSet().iterator();
            iterator.hasNext();)
        {
            ContentType contentType = (ContentType)iterator.next();
            if(contentType.getContentType().equalsIgnoreCase(markup)) {
                return true;
            }
        }

        return false;
View Full Code Here

Examples of com.jeecms.cms.entity.main.ContentType

      return null;
    }
  }

  public ContentType findById(Integer id) {
    ContentType entity = get(id);
    return entity;
  }
View Full Code Here

Examples of com.microsoft.windowsazure.services.media.implementation.atom.ContentType

    @SuppressWarnings({ "unchecked", "rawtypes" })
    protected ODataEntity(T content) {
        this.content = content;

        ContentType contentElement = new ContentType();
        contentElement.getContent().add(
                new JAXBElement(Constants.ODATA_PROPERTIES_ELEMENT_NAME,
                        content.getClass(), content));
        entry = new EntryType();
        entry.getEntryChildren().add(
                new JAXBElement(Constants.ATOM_CONTENT_ELEMENT_NAME,
View Full Code Here

Examples of com.oracle.webservices.api.message.ContentType

        MTOMFeature myMtomFeature = getMtomFeature();
        if(myMtomFeature != null && myMtomFeature.isEnabled()) {
          //If the content type is set already on this outbound Packet,
          //(e.g.) through Codec.decode(InputStream, String contentType, Packet)
          //and it is a non-mtom content type, then don't use mtom to encode it
          ContentType curContentType = getInternalContentType();
          if (curContentType != null && !isMtomContentType(curContentType)) {
            return false;
          }
            //On client, always use XOP encoding if MTOM is enabled
            //On Server, mtomAcceptable and mtomRequest will be set - use XOP encoding
View Full Code Here

Examples of com.psddev.cms.db.ContentType

    @Override
    protected void doService(ToolPageContext page) throws IOException, ServletException {
        List<ObjectType> types = new ArrayList<ObjectType>(Database.Static.getDefault().getEnvironment().getTypes());
        UUID selectedId = page.param(UUID.class, "typeId");
        ObjectType selected = null;
        ContentType sct = null;

        for (ObjectType t : types) {
            if (t.getId().equals(selectedId)) {
                selected = t;
                break;
            }
        }

        if (selected != null) {
            sct = Query.from(ContentType.class).where("internalName = ?", selected.getInternalName()).first();

            if (page.isFormPost()) {
                if (sct == null) {
                    sct = new ContentType();
                    sct.getState().setId(page.param(UUID.class, "id"));
                }

                if (page.tryStandardUpdate(sct)) {
                    return;
                }

            } else if (sct == null) {
                sct = new ContentType();

                sct.setDisplayName(selected.getDisplayName());
                sct.setInternalName(selected.getInternalName());
            }

            for (ObjectField of : selected.getFields()) {
                ToolUi ui = of.as(ToolUi.class);

                if (!ui.isHidden()) {
                    boolean found = false;
                    for (ContentField cf : sct.getFields()) {
                        if (of.getInternalName().equals(cf.getInternalName())) {
                            found = true;
                            break;
                        }
                    }

                    if (!found) {
                        ContentField cf = new ContentField();

                        cf.setTab(ui.getTab());
                        cf.setDisplayName(of.getDisplayName());
                        cf.setInternalName(of.getInternalName());
                        sct.getFields().add(cf);
                    }
                }
            }

            for (Iterator<ContentField> i = sct.getFields().iterator(); i.hasNext();) {
                ContentField cf = i.next();
                boolean found = false;

                for (ObjectField of : selected.getFields()) {
                    if (of.getInternalName().equals(cf.getInternalName())) {
View Full Code Here

Examples of com.sun.xml.internal.messaging.saaj.packaging.mime.internet.ContentType

     * Return the content.
     */
    public Object getContent(DataSource ds) {
        try {
            return new MimeMultipart(
                ds, new ContentType(ds.getContentType()));
        } catch (Exception e) {
            return null;
        }
    }
View Full Code Here

Examples of com.sun.xml.internal.ws.api.pipe.ContentType

    @Override
    public ContentType getStaticContentType(Packet packet) {
        setRootCodec(packet);

        ContentType ct = null;
        if (packet.getMessage() instanceof MessageDataSource) {
            final MessageDataSource mds = (MessageDataSource)packet.getMessage();
            if (mds.hasUnconsumedDataSource()) {
                ct = getStaticContentType(mds);
                return (ct != null)
View Full Code Here

Examples of com.sun.xml.internal.ws.encoding.ContentType

            if (in == null) {
                return Messages.createEmpty(SOAPVersion.SOAP_11);
            }

            if (ct != null) {
                final ContentType contentType = new ContentType(ct);
                final int contentTypeId = identifyContentType(contentType);
                if ((contentTypeId & MIME_MULTIPART_FLAG) != 0) {
                    data = new XMLMultiPart(ct, in, binding.getFeature(StreamingAttachmentFeature.class));
                } else if ((contentTypeId & PLAIN_XML_FLAG) != 0) {
                    data = new XmlContent(ct, in);
View Full Code Here

Examples of com.sun.xml.messaging.saaj.packaging.mime.internet.ContentType

     * Return the content.
     */
    public Object getContent(DataSource ds) {
  try {
      return new MimeMultipart(
                ds, new ContentType(ds.getContentType()));
  } catch (Exception e) {
      return null;
  }
    }
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.