libepp_nicbr
IpNetworkUpdateCmd.H
Go to the documentation of this file.
1 /* ${copyright}$ */
2 /* $Id: IpNetworkUpdateCmd.H 1273 2014-12-08 15:41:50Z gustavo $ */
7 #ifndef __IPNETWORKUPDATECMD_H__
8 #define __IPNETWORKUPDATECMD_H__
9 
10 #include <list>
11 #include <map>
12 #include <vector>
13 
14 #include "libepp_nicbr.H"
15 
16 #include "Command.H"
17 #include "ReverseDSInfo.H"
18 
19 using std::list;
20 using std::map;
21 using std::vector;
22 
23 LIBEPP_NICBR_NS_BEGIN
24 
27 {
28 public:
30  IpNetworkUpdateCmd(bool reset = true) : Command(false)
31  {
32  if (reset) {
33  this->reset();
34  }
35  }
36 
38 
41  void set_roid(const string &roid)
42  {
43  _roid = roid;
44  }
45 
47 
50  string get_roid() const
51  {
52  return _roid;
53  }
54 
56 
59  void set_organization(const string &organization)
60  {
61  _organization = organization;
62  }
63 
65 
68  string get_organization() const
69  {
70  return _organization;
71  }
72 
74 
77  void set_allocType(const string &allocType)
78  {
79  _allocType = allocType;
80  }
81 
83 
86  string get_allocType() const
87  {
88  return _allocType;
89  }
90 
92 
95  void set_asn(const unsigned int &asn)
96  {
97  _asn = asn;
98  _asn_changed = true;
99  }
100 
102 
105  unsigned int get_asn() const
106  {
107  return _asn;
108  }
109 
111 
114  bool asn_changed() const
115  {
116  return _asn_changed;
117  }
118 
120 
123  void insert_reverseDNS_add(const ReverseDns &reverseDns)
124  {
125  _reverseDNS_add.push_back(reverseDns);
126  }
127 
129 
132  vector<ReverseDns> get_reverseDns_add() const
133  {
134  return _reverseDNS_add;
135  }
136 
138 
141  void insert_reverseDNS_rem(const ReverseDns &reverseDns)
142  {
143  _reverseDNS_rem.push_back(reverseDns);
144  }
145 
147 
150  vector<ReverseDns> get_reverseDns_rem() const
151  {
152  return _reverseDNS_rem;
153  }
154 
156 
159  void insert_dsInfo_add(const ReverseDSInfo &ds_info)
160  {
161  _ds_list_add.push_back(ds_info);
162  }
163 
165 
168  list<ReverseDSInfo> get_dsInfo_add() const
169  {
170  return _ds_list_add;
171  }
172 
174 
177  void insert_dsInfo_rem(const ReverseDSInfo &ds_info)
178  {
179  _ds_list_rem.push_back(ds_info);
180  }
181 
183 
186  list<ReverseDSInfo> get_dsInfo_rem() const
187  {
188  return _ds_list_rem;
189  }
190 
192 
196  void insert_contact_add(const string &type, const string &identification)
197  {
198  _contacts_add[type] = identification;
199  }
200 
202 
205  map< string, string, less<string> > get_contacts_add() const
206  {
207  return _contacts_add;
208  }
209 
211 
215  void insert_contact_rem(const string &type, const string &identification)
216  {
217  _contacts_rem[type] = identification;
218  }
219 
221 
224  map< string, string, less<string> > get_contacts_rem() const
225  {
226  return _contacts_rem;
227  }
228 
229  void setAggregateRoid(const string &aggregateRoid)
230  {
231  _aggregateRoid = aggregateRoid;
232  }
233 
234  string getAggregateRoid() const
235  {
236  return _aggregateRoid;
237  }
238 
239  void insertAggregateHostname(const string &hostname)
240  {
241  _aggregateHostnames.push_back(hostname);
242  }
243 
244  vector<string> getAggregateHostnames() const
245  {
246  return _aggregateHostnames;
247  }
248 
249  void setCreationDate(const string &creationDate)
250  {
251  _creationDate = creationDate;
252  }
253 
254  string getCreationDate() const
255  {
256  return _creationDate;
257  }
258 
259  void reset()
260  {
261  Command::reset();
262  _roid = "";
263  _organization = "";
264  _allocType = "";
265  _asn = 0;
266  _asn_changed = false;
267  _reverseDNS_add.clear();
268  _reverseDNS_rem.clear();
269  _ds_list_add.clear();
270  _ds_list_rem.clear();
271  _contacts_add.clear();
272  _contacts_rem.clear();
273  _aggregateRoid = "";
274  _aggregateHostnames.clear();
275  _creationDate.clear();
276  }
277 
278 protected:
280  string _roid;
281 
283  vector<ReverseDns> _reverseDNS_add;
284 
286  vector<ReverseDns> _reverseDNS_rem;
287 
289  list<ReverseDSInfo> _ds_list_add;
290 
292  list<ReverseDSInfo> _ds_list_rem;
293 
295  map<string, string> _contacts_add;
296 
298  map<string, string> _contacts_rem;
299 
302 
304  string _allocType;
305 
307  unsigned int _asn;
308 
311 
314 
316  vector<string> _aggregateHostnames;
317 
320 };
321 
322 LIBEPP_NICBR_NS_END
323 #endif // __IPNETWORKUPDATECMD_H__
map< string, string, less< string > > get_contacts_rem() const
Returns map of other contacts to be removed.
Definition: IpNetworkUpdateCmd.H:224
void set_asn(const unsigned int &asn)
Sets asn.
Definition: IpNetworkUpdateCmd.H:95
unsigned int _asn
autonomous system number that manages the ip range
Definition: IpNetworkUpdateCmd.H:307
vector< ReverseDns > _reverseDNS_rem
Reverses DNS to be removed.
Definition: IpNetworkUpdateCmd.H:286
bool _asn_changed
flag used to indicate whether asn has changed.
Definition: IpNetworkUpdateCmd.H:310
map< string, string > _contacts_add
contacts to be added
Definition: IpNetworkUpdateCmd.H:295
EPP/DNSSEC DS information class for reverse DNS.
void insert_dsInfo_rem(const ReverseDSInfo &ds_info)
Inserts a reverse DS to be removed.
Definition: IpNetworkUpdateCmd.H:177
Project defines.
list< ReverseDSInfo > get_dsInfo_add() const
Returns all the reverse DS to be added.
Definition: IpNetworkUpdateCmd.H:168
string get_allocType() const
Returns allocation type.
Definition: IpNetworkUpdateCmd.H:86
list< ReverseDSInfo > _ds_list_rem
DS info to be removed.
Definition: IpNetworkUpdateCmd.H:292
void insert_contact_add(const string &type, const string &identification)
Inserts a contact to be added.
Definition: IpNetworkUpdateCmd.H:196
void set_organization(const string &organization)
Sets organization.
Definition: IpNetworkUpdateCmd.H:59
void set_allocType(const string &allocType)
Sets allocation type.
Definition: IpNetworkUpdateCmd.H:77
unsigned int get_asn() const
Returns asn.
Definition: IpNetworkUpdateCmd.H:105
vector< ReverseDns > get_reverseDns_rem() const
Returns all the reverse DNS to be removed.
Definition: IpNetworkUpdateCmd.H:150
map< string, string, less< string > > get_contacts_add() const
Returns map of other contacts to be added.
Definition: IpNetworkUpdateCmd.H:205
EPP IpNetworkUpdateCmd Class.
Definition: IpNetworkUpdateCmd.H:26
void set_roid(const string &roid)
Sets repository object ID.
Definition: IpNetworkUpdateCmd.H:41
vector< ReverseDns > get_reverseDns_add() const
Returns all the reverse DNS to be added.
Definition: IpNetworkUpdateCmd.H:132
string _roid
server-unique id for the created IP network
Definition: IpNetworkUpdateCmd.H:280
string _creationDate
updates the creation date
Definition: IpNetworkUpdateCmd.H:319
void insert_dsInfo_add(const ReverseDSInfo &ds_info)
Inserts a reverse DS to be added.
Definition: IpNetworkUpdateCmd.H:159
void reset()
Reset object attributes.
Definition: Command.H:33
EPP Command Class.
Definition: Command.H:18
void insert_reverseDNS_add(const ReverseDns &reverseDns)
Inserts a reverse DNS to be added.
Definition: IpNetworkUpdateCmd.H:123
list< ReverseDSInfo > _ds_list_add
DS info to be added.
Definition: IpNetworkUpdateCmd.H:289
string get_roid() const
Returns repository object ID.
Definition: IpNetworkUpdateCmd.H:50
map< string, string > _contacts_rem
contacts to be removed
Definition: IpNetworkUpdateCmd.H:298
EPP Command Class.
list< ReverseDSInfo > get_dsInfo_rem() const
Returns all the reverse DS to be removed.
Definition: IpNetworkUpdateCmd.H:186
string _allocType
allocation type associated with the ip network
Definition: IpNetworkUpdateCmd.H:304
IpNetworkUpdateCmd(bool reset=true)
Default constructor.
Definition: IpNetworkUpdateCmd.H:30
bool asn_changed() const
Returns asn_changed.
Definition: IpNetworkUpdateCmd.H:114
vector< ReverseDns > _reverseDNS_add
Reverses DNS to be added.
Definition: IpNetworkUpdateCmd.H:283
string _organization
organization associated with the ip network
Definition: IpNetworkUpdateCmd.H:301
void insert_contact_rem(const string &type, const string &identification)
Inserts a contact to be removed.
Definition: IpNetworkUpdateCmd.H:215
void insert_reverseDNS_rem(const ReverseDns &reverseDns)
Inserts a reverse DNS to be removed.
Definition: IpNetworkUpdateCmd.H:141
vector< string > _aggregateHostnames
List of hostnames to be used in case of /16 aggregation.
Definition: IpNetworkUpdateCmd.H:316
string _aggregateRoid
server-unique ID for the IP range being aggregated
Definition: IpNetworkUpdateCmd.H:313
Reverse DSInfo Class.
Definition: ReverseDSInfo.H:16
string get_organization() const
Returns organization associated with the ip network.
Definition: IpNetworkUpdateCmd.H:68