public TrxMessageHeader addMessageProperties ( TrxMessageHeader trxMessageHeader ) { Map < String , Object > mapHeaderMessageInfo = trxMessageHeader . getMessageInfoMap ( ) ; Map < String , Object > propMessageProcessInfo = ( ( PropertiesField ) this . getField ( MessageProcessInfo . PROPERTIES ) ) . loadProperties ( ) ; String strQueueName = this . getQueueName ( false ) ; if ( propMessageProcessInfo . get ( MessageConstants . QUEUE_NAME ) == null ) if ( strQueueName != null ) propMessageProcessInfo . put ( MessageConstants . QUEUE_NAME , strQueueName ) ; String strQueueType = this . getQueueType ( false ) ; if ( propMessageProcessInfo . get ( MessageConstants . QUEUE_TYPE ) == null ) if ( strQueueType != null ) propMessageProcessInfo . put ( MessageConstants . QUEUE_TYPE , strQueueType ) ; if ( ! this . getField ( MessageProcessInfo . REPLY_MESSAGE_PROCESS_INFO_ID ) . isNull ( ) ) propMessageProcessInfo . put ( TrxMessageHeader . MESSAGE_RESPONSE_ID , this . getField ( MessageProcessInfo . REPLY_MESSAGE_PROCESS_INFO_ID ) . toString ( ) ) ; if ( ! this . getField ( MessageProcessInfo . LOCAL_MESSAGE_PROCESS_INFO_ID ) . isNull ( ) ) propMessageProcessInfo . put ( LocalMessageTransport . LOCAL_PROCESSOR , this . getField ( MessageProcessInfo . LOCAL_MESSAGE_PROCESS_INFO_ID ) . toString ( ) ) ; if ( ! this . getField ( MessageProcessInfo . MESSAGE_TYPE_ID ) . isNull ( ) ) { MessageType recMessageType = ( MessageType ) ( ( ReferenceField ) this . getField ( MessageProcessInfo . MESSAGE_TYPE_ID ) ) . getReference ( ) ; if ( recMessageType != null ) propMessageProcessInfo . put ( TrxMessageHeader . MESSAGE_PROCESS_TYPE , recMessageType . getField ( MessageType . CODE ) . toString ( ) ) ; } if ( ! this . getField ( MessageProcessInfo . PROCESSOR_CLASS ) . isNull ( ) ) propMessageProcessInfo . put ( TrxMessageHeader . MESSAGE_PROCESSOR_CLASS , this . getField ( MessageProcessInfo . PROCESSOR_CLASS ) . toString ( ) ) ; if ( mapHeaderMessageInfo != null ) mapHeaderMessageInfo . putAll ( propMessageProcessInfo ) ; else mapHeaderMessageInfo = propMessageProcessInfo ; if ( mapHeaderMessageInfo . get ( TrxMessageHeader . MESSAGE_PROCESSOR_CLASS ) == null ) this . setDefaultMessageProcessor ( mapHeaderMessageInfo ) ; trxMessageHeader . setMessageInfoMap ( mapHeaderMessageInfo ) ; trxMessageHeader . put ( TrxMessageHeader . MESSAGE_PROCESS_INFO_ID , this . getCounterField ( ) . toString ( ) ) ; String strDescription = this . getField ( MessageProcessInfo . DESCRIPTION ) . toString ( ) ; if ( ( ( ReferenceField ) this . getField ( MessageProcessInfo . MESSAGE_INFO_ID ) ) . getReference ( ) != null ) if ( ! ( ( ReferenceField ) this . getField ( MessageProcessInfo . MESSAGE_INFO_ID ) ) . getReference ( ) . getField ( MessageInfo . DESCRIPTION ) . isNull ( ) ) strDescription = ( ( ReferenceField ) this . getField ( MessageProcessInfo . MESSAGE_INFO_ID ) ) . getReference ( ) . getField ( MessageInfo . DESCRIPTION ) . toString ( ) ; trxMessageHeader . put ( TrxMessageHeader . DESCRIPTION , strDescription ) ; return trxMessageHeader ; }
AddMessageProperties Method .