/*
Get the type of the message body.

Javadoc description supplied by JsJmsMessage interface.
545129
@Override
    public final JmsBodyType getBodyType() {
        /* Get the subtype and get the corresponding JmsBodyType to return */
        int bType = getSubtype();
        return JmsBodyType.getJmsBodyType(Byte.valueOf((byte) bType));
    }
485204
public String getContentType() {
    if (contentType != null) {
      return contentType;
    }

    if (dataStream != null) {
      try {
        contentType = URLConnection.guessContentTypeFromStream(dataStream);
      } catch (IOException ioe) {
        // ignore exception
      }
    }

    if (data != null) {
      contentType = URLConnection.guessContentTypeFromName(filename);
    }

    // fallback - if we have no contenttype and cannot detect one, use 'application/octet-stream'
    if (contentType == null) {
      contentType = "application/octet-stream";
    }

    return contentType;
  }
732714
public String getItemType() {
        return mBodyMap.containsKey(BoxComment.FIELD_ITEM) ?
                (String) mBodyMap.get(BoxItem.FIELD_TYPE) :
                null;
    }
623594
public String getElementNameFromMessageName(TDefinitions descriptionType, TParam message)
    {
        QName qName = message.getMessage();
        String name = qName.getLocalPart();
        for (TDocumented nextElement : descriptionType.getAnyTopLevelOptionalElement())
        {
            // Create the service type
            if (nextElement instanceof TMessage)
            {
                String msgName = ((TMessage)nextElement).getName();
                for (TPart part : ((TMessage)nextElement).getPart())
                {
                    if (name.equals(part.getName()))
                    {
                        return part.getElement().getLocalPart();
                    }
                }
            }
        }
        return null;
    }
183163
public String getContentType() {
        if (WCCustomProperties.CHECK_REQUEST_OBJECT_IN_USE){
            checkRequestObjectInUse();
        }
        // 321485
        // PK57679 Start
        String contentType;
        if (!_setInputDataStreamCalled) // 516233
            contentType = _request.getContentType();
        else
            contentType = _setInputStreamContentType;
        // PK57679 End
        if (TraceComponent.isAnyTracingEnabled()&&logger.isLoggable (Level.FINE)) {  //306998.15
            logger.logp(Level.FINE, CLASS_NAME,"getContentType", "this->"+this+": "+" type --> " + contentType);
        }
        return contentType;
    }
27616
function getType(fileName) {
        var type = 'text';
        if (fileName.indexOf('.json') === fileName.length - 5) {
            type = 'json';
        } else if (fileName.indexOf('.yml') === fileName.length - 4) {
            type = 'yml';
        }
        return type;
    }
647416
private MessageEmitSvlt getMessageObj(final HttpServletRequest request,
                                        final MessageResources messages) {
    return (MessageEmitSvlt)StrutsUtil
            .getMessageObj(getId(), this, request,
                           messages,
                           getMessageObjAttrName(),
                           getErrorObjErrProp(),
                           clearMessages());
  }
884861
private JSType getJSType(Node n) {
    JSType type = n.getJSType();
    if (type == null) {
      // TODO(bradfordcsmith): This branch indicates a compiler bug. It should throw an exception.
      return compiler.getTypeRegistry().getNativeType(JSTypeNative.UNKNOWN_TYPE);
    } else {
      return type;
    }
  }
317621
private static JsJmsMessage decodeTextBody(String body) throws MessageDecodeFailedException {
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.entry(tc, "decodeTextBody");
        JsJmsTextMessage result = new JsJmsTextMessageImpl(MfpConstants.CONSTRUCTOR_NO_OP);
        if (body != null) {
            result.setText(URLDecode(body));
        }
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.exit(tc, "decodeTextBody");
        return result;
    }
209401
public Collection<Subscription> getSubscriptionsByMessageType(Class messageType) {
        Set<Subscription> subscriptions = new TreeSet<Subscription>(Subscription.SubscriptionByPriorityDesc);
        ReadLock readLock = readWriteLock.readLock();
        try {
            readLock.lock();

            Subscription subscription;
            ArrayList<Subscription> subsPerMessage = subscriptionsPerMessage.get(messageType);

            if (subsPerMessage != null) {
                subscriptions.addAll(subsPerMessage);
            }

            Class[] types = ReflectionUtils.getSuperTypes(messageType);
            for (int i=0, n=types.length; i<n; i++) {
                Class eventSuperType = types[i];
                
                ArrayList<Subscription> subs = subscriptionsPerMessage.get(eventSuperType);
                if (subs != null) {
                    for (int j = 0,m=subs.size(); j<m; j++) {
                        subscription = subs.get(j);

                        if (subscription.handlesMessageType(messageType)) {
                            subscriptions.add(subscription);
                        }
                    }
                }
            }
        }finally{
            readLock.unlock();
        }
        return subscriptions;
    }
895958
public String getMessageProcessType(BaseMessage externalMessage)
    {
        if (externalMessage.getMessageHeader() != null)
            if (externalMessage.getMessageHeader().get(TrxMessageHeader.MESSAGE_PROCESS_TYPE) != null)
                return (String)externalMessage.getMessageHeader().get(TrxMessageHeader.MESSAGE_PROCESS_TYPE);
        return MessageTypeModel.MESSAGE_IN;   // Override this to check for sure.
    }
437321
public java.lang.String getType() {
        return (java.lang.String) getStateHelper().eval(PropertyKeys.type, "submit");

    }
1267653
public MediaType getContentType() {
        if (isNull(this.contentType)) {
            contentType = getHeader(HeaderName.CONTENT_TYPE)
                .map(MediaType::of)
                .orElse(WILDCARD);
        }

        return contentType;
    }
835029
public String getMessageProcessType(BaseMessage externalMessage)
    {
        String strSubject = (String)externalMessage.getMessageHeader().get(EmailMessageTransport.SUBJECT_PARAM);
        if (strSubject != null)
            if (strSubject.toUpperCase().startsWith("RE:"))
                return MessageTypeModel.MESSAGE_IN;   // This is (most likely) a reply to my message.
        return super.getMessageProcessType(externalMessage);
    }
274786
@Override
	public String getMimeType() {
		String contentType = backing.getContentType();

		// IE6 (and apparently IE7) are broken and send the MIME type "image/pjpeg"
		// regardless of whether the image is a progressive jpeg or not. Sending the
		// incorrect MIME type back can cause display issues. It is always safe to
		// change it to just be "image/jpeg".
		if ("image/pjpeg".equals(contentType)) {
			contentType = "image/jpeg";
		}

		return contentType;
	}
110713
public String getMessageInfoType(BaseMessage externalMessage)
    {
        if (externalMessage != null)
            if (externalMessage.getMessageHeader() != null)
                if (externalMessage.getMessageHeader().get(TrxMessageHeader.MESSAGE_INFO_TYPE) != null)
                    return (String)externalMessage.getMessageHeader().get(TrxMessageHeader.MESSAGE_INFO_TYPE);
        return MessageInfoTypeModel.REQUEST;   // Override this to check for sure.
    }
90820
public final String getJmsType() {
        if (getHdr2().getChoiceField(JsHdr2Access.JMSTYPE) == JsHdr2Access.IS_JMSTYPE_EMPTY) {
            return getDerivedJmsType();
        }
        else {
            return (String) getHdr2().getField(JsHdr2Access.JMSTYPE_DATA);
        }
    }