fintp_connectors
 All Classes Namespaces Files Functions Variables Enumerations Enumerator Macros Pages
Message.h
Go to the documentation of this file.
1 /*
2 * FinTP - Financial Transactions Processing Application
3 * Copyright (C) 2013 Business Information Systems (Allevo) S.R.L.
4 *
5 * This program is free software: you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation, either version 3 of the License, or
8 * (at your option) any later version.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with this program. If not, see <http://www.gnu.org/licenses/>
17 * or contact Allevo at : 031281 Bucuresti, 23C Calea Vitan, Romania,
18 * phone +40212554577, office@allevo.ro <mailto:office@allevo.ro>, www.allevo.ro.
19 */
20 
21 #ifndef QPIMESSAGE_H
22 #define QPIMESSAGE_H
23 
24 #include "ConnectorMain.h"
25 
26 #include "XmlUtil.h"
27 #include "Collections.h"
28 
29 namespace FinTPMessage
30 {
32  {
33  private :
34 
35  string m_Id;
36  string m_GroupId;
37  string m_Format;
38  unsigned long m_Length;
39 
40  public :
41 
42  string groupId() const { return m_GroupId; }
43  void setGroupId( const string& messageGroupId ) { m_GroupId = messageGroupId; }
44 
45  string id() const { return m_Id; }
46  void setId( const string& messageId ) { m_Id = messageId; }
47 
48  string format() const { return m_Format; }
49  void setFormat( const string& messageFormat ) { m_Format = messageFormat; }
50 
51  unsigned long length() const { return m_Length; }
52  void setLength( const unsigned long messageLength ) { m_Length = messageLength; }
53 
54  Metadata();
55  Metadata( const string& messageId, const string& messageGroupId = "", const unsigned long messageLength = 0 );
56  Metadata( const FinTPMessage::Metadata& metadata );
57  };
58 
60  {
61  private :
63  XERCES_CPP_NAMESPACE_QUALIFIER DOMDocument* m_Dom;
64 
65  string m_Payload;
67  string m_Requestor;
68  string m_Responder;
69  string m_Feedback;
70 
71  public :
72 
74  {
79  AQCONNECTOR
80  };
81 
82  Message();
83  Message( const FinTPMessage::Metadata& metadata, const string& payload = "", const string& correlationId = "",
84  const string& requestor = "", const string& responder = "", const string& feedback = "" );
85 
86  ~Message();
87 
88  void releaseDom();
89 
90  //getting payload, requestor, ....
91  void getInformation( const FinTPMessage::Message::ConnectorType connType );
92 
93  const FinTPMessage::Metadata & metadata() const { return m_Metadata; }
94  XERCES_CPP_NAMESPACE_QUALIFIER DOMDocument* dom() { return m_Dom; }
95 
96  // needed by : all publishers
97  string payload() const { return m_Payload; }
98 
99  // needed by : all publishers
100  string correlationId() const { return m_CorrelationId; }
101 
102  // needed by : db publisher
103  string requestor() const { return m_Requestor; }
104 
105  // needed by : db publisher
106  string responder() const { return m_Responder; }
107 
108  // needed by : file publisher
109  string feedback() const { return m_Feedback; }
110 
111  };
112 
114  {
115  private :
116 
118  };
119 }
120 
121 #endif //QPIMESSAGE_H