Return the stanza-id element of a message.

@param message message
@return stanza-id element of a jid, or null if absent.
5808
public static StanzaIdElement getStanzaId(Message message) {
        return message.getExtension(StanzaIdElement.ELEMENT, StableUniqueStanzaIdManager.NAMESPACE);
    }
1316081
public static String readCorrelationId(Message message) {
        if (!(message instanceof SoapMessage)) {
            return null;
        }
        String correlationId = null;
        Header hdCorrelationId = ((SoapMessage) message).getHeader(CORRELATION_ID_QNAME);
        if (hdCorrelationId != null) {
            if (hdCorrelationId.getObject() instanceof String) {
                correlationId = (String) hdCorrelationId.getObject();
            } else if (hdCorrelationId.getObject() instanceof Node) {
                Node headerNode = (Node) hdCorrelationId.getObject();
                correlationId = headerNode.getTextContent();
            } else {
                LOG.warning("Found CorrelationId soap header but value is not a String or a Node! Value: "
                        + hdCorrelationId.getObject().toString());
            }
        }
        return correlationId;
    }
270698
public static String msgToString(AbstractMessage message)
   {
     if (message == null) return STRING_NULL;
     if (message instanceof JsMessage) return message + "[" + ((JsMessage)message).getSystemMessageId() + "]";
     return message.toString();
   }
1140998
public Class<?> getBody(String message) {
		final Set<IdentifierLine> identifierLines = this.definitions.keySet();
		final IdentifierLine messageId =  new IdentifierLine();
		for(IdentifierLine id : identifierLines){
			final Map<Integer, String> mapIds = id.getMapIds();
			final Set<Integer> keys = mapIds.keySet();
			for (Integer startPosition :  keys){
				final String textId = mapIds.get(startPosition);
				int sizeText =  textId.length();
				int finalPosition =  startPosition + sizeText;
				if (finalPosition > message.length()){
					break;
				}
				messageId.putId(startPosition, message.substring(startPosition, finalPosition));
			}
			if (id.equals(messageId)){
				this.body = this.definitions.get(messageId);
				break;
			}else{
				messageId.getMapIds().clear();
			}
		}
		if (this.body == null){
			throw new FFPojoException(String.format("No class matches with the line starting with:  %s ", getStartWithText(message)));
		}

		return this.body;
	}
1356299
public static String getMessageJson(Object message) {
        VersionedMessage<?> versionedMessage = new VersionedMessage<>(CURRENT_MESSAGE_VERSION, message);

        return GSON.toJson(versionedMessage);
    }
244989
public boolean matches( Message message ) throws JMSException
    {
        Boolean result = selectorTree != null ? selectorTree.evaluateBoolean(message) : null;
        return result != null && result.booleanValue();
    }
994373
private String getMessageId(String response) {
		if (StringUtils.isNullOrEmptyTrimmed(response)) {
			return null;
		}

		try {
			MailGunSendResponse res = JsonUtils.fromJson(response, MailGunSendResponse.class);
			return res != null ? res.id : null;
		}
		catch (IllegalArgumentException e) {
			log.warn("Failed to parse MailGun send response: ", e);
			return null;
		}
	}
1171198
public String getMessage(String id, String defaultMsg) {
    return getMessage(id, lang, defaultMsg);
  }
455731
public String getId(Node node) {
        String id = null;
        try {
            id = node.getIdentifier();
        } catch (RepositoryException e) {
            id = node.toString(); // use Java 'ID'
        }
        return id;
    }
248749
public CallActivityMock onExecutionSendMessage(final String message) {
    return onExecutionDo(execution -> execution.getProcessEngineServices()
      .getRuntimeService().correlateMessage(message));
  }
627401
public byte [] detached(byte [] message) {
            byte[] signedMsg = this.sign(message);
            byte[] sig = new byte[signatureLength];
            for (int i = 0; i < sig.length; i++)
                sig[i] = signedMsg[i];
            return sig;
        }
1287807
public static List<CharSequence> getBodies(Message message) {
        XHTMLExtension xhtmlExtension = XHTMLExtension.from(message);
        if (xhtmlExtension != null)
            return xhtmlExtension.getBodies();
        else
            return null;
    }
730646
public int getMessageLength() {
    // Message ID
    int length = 1;

    if (this.weights != null) {
      for (String origin : this.weights.keySet()) {
        // String prefix, weight
        length += 8;
        try {
          length += origin.getBytes("UTF-16BE").length;
        } catch (UnsupportedEncodingException uee) {
          log.error("Unable to encode to UTF-16BE.");
        }
      }
    }

    return length;
  }
860221
public String getId()
  {
    try
    {
      if(id == null) 
        id = ""+itemStream.getID();
    }
    catch(MessageStoreException e)
    {
      // FFDC
      FFDCFilter.processException(
          e,
          "com.ibm.ws.sib.processor.runtime.XmitPointControl.getId",
          "1:136:1.17", 
          this);
      
      SibTr.exception(tc, e);
    }
    return id;
  }
1313586
public String getPainMessageId() {
        String result = getPainParam("messageId");
        if (result == null) {
            SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss:SSSS");
            result = format.format(new Date());
            result = result.substring(0, Math.min(result.length(), 35));
            setSEPAParam("messageId", result);
        }
        return result;
    }
853983
public static Map<String, String> getSpoilers(Message message) {
        if (!containsSpoiler(message)) {
            return Collections.emptyMap();
        }

        List<ExtensionElement> spoilers = message.getExtensions(SpoilerElement.ELEMENT, NAMESPACE);
        Map<String, String> map = new HashMap<>();

        for (ExtensionElement e : spoilers) {
            SpoilerElement s = (SpoilerElement) e;
            if (s.getLanguage() == null || s.getLanguage().equals("")) {
                map.put("", s.getHint());
            } else {
                map.put(s.getLanguage(), s.getHint());
            }
        }

        return map;
    }
228931
public SimpleDialog message(int id){
        return message(id == 0 ? null : getContext().getResources().getString(id));
    }