/*
Get the value of the JsMessageType from the message header.

Javadoc description supplied by JsMessage interface.
775273
public final MessageType getJsMessageType() {
        /* Get the int value and get the corresponding MessageType to return */
        Byte mType = (Byte) jmo.getField(JsHdrAccess.MESSAGETYPE);
        return MessageType.getMessageType(mType);
    }
1368545
public BaseConvertToMessage getConvertToMessage()
    {
        if (m_convertToMessage == null)
        {
            BaseMessageHeader trxMessageHeader = this.getMessage().getMessageHeader();
            String strMessageClass = (String)trxMessageHeader.get(TrxMessageHeader.MESSAGE_MARSHALLER_CLASS);
            String strPackage = (String)trxMessageHeader.get(TrxMessageHeader.BASE_PACKAGE);
            strMessageClass = ClassServiceUtility.getFullClassName(strPackage, strMessageClass);
            m_convertToMessage = (BaseConvertToMessage)ClassServiceUtility.getClassService().makeObjectFromClassName(strMessageClass);
            if (m_convertToMessage != null)
            	m_convertToMessage.init(this);
        }
        return m_convertToMessage;
    }
945397
private String getMessageType(FacesMessage message) {
		if (message.getSeverity().equals(FacesMessage.SEVERITY_WARN))
			return "warning";
		else if (message.getSeverity().equals(FacesMessage.SEVERITY_ERROR))
			return "danger";
		else if (message.getSeverity().equals(FacesMessage.SEVERITY_FATAL))
			return "danger";
		else if (message.getSeverity().equals(FacesMessage.SEVERITY_INFO))
			return "info";
		return "success";
	}
284993
@Override
	protected int retrieveMessagePriority(int handle) throws JMSException
    {
    	// Only read the first header bytes of the message to read the priority field
    	byte[] msgHeader = ((AbstractBlockBasedDataStore)dataStore).retrieveHeader(handle, 2);    	
    	return msgHeader[1] & 0x0F;
    }
1324611
@Override
    public String getMessageControlClassification(boolean throwExceptionIfMessageNotAvailable)
    {
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.entry(this, tc, "getMessageControlClassification", Boolean.valueOf(throwExceptionIfMessageNotAvailable));

        // Have we retrieved the messageControlClassification from the message already?
        // Note that the value of messageControlClassification might be null where XD is
        // registered but is not classifying messages.
        if (!retrievedMessageControlClassification)
        {
            JsMessage localMsg = getJSMessage(throwExceptionIfMessageNotAvailable);
            if (localMsg == null)
            {
                messageControlClassification = null;
            }
            else
            {
                // Cannot set this parameter on a Control message
                if (localMsg.isApiMessage())
                {
                    if (localMsg instanceof JsApiMessage)
                    {
                        messageControlClassification = ((JsApiMessage) localMsg).getMessageControlClassification();
                    }
                }
                retrievedMessageControlClassification = true;
            }
        }

        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.exit(this, tc, "getMessageControlClassification", messageControlClassification);

        return messageControlClassification;
    }
761200
public int handleMessage(BaseMessage message)
    {
        Map<String,Object> properties = new HashMap<String,Object>();
        String strMessageType =  (String)message.get(MessageConstants.MESSAGE_TYPE_PARAM);
        String strStartIndex = (String)message.get(START_INDEX_PARAM);
        String strEndIndex = (String)message.get(END_INDEX_PARAM);
        if (strMessageType != null)
            properties.put(MessageConstants.MESSAGE_TYPE_PARAM, strMessageType);
        if (strStartIndex != null)
            properties.put(START_INDEX_PARAM, strStartIndex);
        if (strEndIndex != null)
            properties.put(END_INDEX_PARAM, strEndIndex);
        Map<String,Object> propertiesHdr = null;
        if (message.getMessageHeader() != null)
            propertiesHdr = message.getMessageHeader().getProperties();
        if (propertiesHdr != null)
            properties.putAll(propertiesHdr); // Merge them to simplify access
        if (properties != null)
        {
            strMessageType =  (String)properties.get(MessageConstants.MESSAGE_TYPE_PARAM);
            try {
                int iMessageType = Integer.parseInt(strMessageType);
                if ((Constants.AFTER_ADD_TYPE == iMessageType)
                    || (Constants.AFTER_DELETE_TYPE == iMessageType)
                    || (Constants.AFTER_UPDATE_TYPE == iMessageType))
                {
                    SwingUtilities.invokeLater(new UpdateGridTable(properties));
                }
            } catch (NumberFormatException ex) {
                // Ignore
            }
        }
        return super.handleMessage(message);
    }
564087
def FromMessageGetSimpleElementDeclaration(message):
    '''

    '''
    assert isinstance(message, WSDLTools.Message), 'expecting WSDLTools.Message'

    if len(message.parts) == 1 and message.parts[0].element is not None:
       part = message.parts[0]
       nsuri,name = part.element
       wsdl = message.getWSDL()
       types = wsdl.types
       if types.has_key(nsuri) and types[nsuri].elements.has_key(name):
            e = types[nsuri].elements[name]
            if isinstance(e, XMLSchema.ElementDeclaration) is True and e.getAttribute('type'):
                typ = e.getAttribute('type')
                bt = BaseTypeInterpreter()
                ptype = bt.get_pythontype(typ[1], typ[0])
                return ptype

    return None
143509
JSMessageData getCopy() {

    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) JmfTr.entry(this, tc, "getCopy");
    JSMessageImpl copy;

    synchronized (getMessageLockArtefact()) {
      // Create a new instance of ourselves
      copy = new JSMessageImpl(this);

      // Allow the message data to be lazy-copied
      copy.lazyCopy(this);

      // The copy is a new top-level message
      copy.setMaster();

      // We must clear our boxed cache at this stage, since items in the
      // boxed cache may refer to entries in our now potentially shared cache
      // and this could result in  consistency problems. By clearing the
      // cache here it will get recreated with new copies when required.
      if (boxManager != null) {
        boxManager.reset();
      }

    }

    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) JmfTr.exit(this, tc, "getCopy", copy);
    return copy;
  }
812880
protected String getMessageCode(Object o) {
		if (o instanceof TypeResolvable) {
			String type = ((TypeResolvable) o).getType();
			if (type != null) {
				return type;
			}
		}
		return ClassUtils.getShortNameAsProperty(o.getClass());
	}
507937
@Override
    public SmsMessage getSmsMessageBySmppMessageId(final String smppMessageId) {
        final SqlSession session = sessions.openSession();
        try {
            final Map<String, Object> result = session.selectOne(namespace + "getSmsMessageBySmppMessageId", smppMessageId);
            if (result != null) {
                return toSmsMessage(result);
            } else {
                return null;
            }
        } finally {
            session.close();
        }
    }
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));
    }
1307929
public String getMessageInfoType(BaseMessage externalMessage)
    {
        String strSubject = (String)externalMessage.getMessageHeader().get(EmailMessageTransport.SUBJECT_PARAM);
        if (strSubject != null)
            if (strSubject.toUpperCase().startsWith("RE:"))
                return MessageInfoTypeModel.REPLY;   // This is (most likely) a reply to my message.
        return super.getMessageInfoType(externalMessage);
    }
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.
    }
1368568
@Override
    public String getMessageSelector() throws JMSException {
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.entry(this, tc, "getMessageSelector");
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.exit(this, tc, "getMessageSelector", theSelector);

        //if selector is null or empty return null
        if (theSelector == null || theSelector.trim().isEmpty())
            return null;

        return theSelector;
    }
455842
public static MessageType getSchemaForRead(MessageType fileMessageType, MessageType projectedMessageType) {
    assertGroupsAreCompatible(fileMessageType, projectedMessageType);
    return projectedMessageType;
  }
424267
public JsMessage getJsMessage()
  {
		if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
			SibTr.entry(tc, "getJsMessage");

    InvalidOperationException finalE =
      new InvalidOperationException(
        nls.getFormattedMessage(
          "INTERNAL_MESSAGING_ERROR_CWSIP0005",
          new Object[] {"RemoteMessageRequest.getJsMessage",
                        "1:127:1.34",
                        this},
          null));

    SibTr.exception(tc, finalE);

    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
      SibTr.exit(tc, "getJsMessage");
    throw finalE;
  }
275557
@Override
	public Object evaluate(Message message) throws JMSException
    {
    	Object leftValue = leftOperand.evaluate(message);
    	Object rightValue = rightOperand.evaluate(message);
    	if (leftValue == null || rightValue == null)
            return null;
    	
    	int leftType = getNodeType(leftValue);
        int rightType = getNodeType(rightValue);
        if (leftType != SelectorNodeType.NUMBER ||
            rightType != SelectorNodeType.NUMBER)
        {
        	return Boolean.FALSE; // [JMS Spec]
        }
        
        return ArithmeticUtils.greaterThanOrEquals((Number)leftValue, (Number)rightValue);
    }