libepp_nicbr
BrOrgInfoRsp.H
Go to the documentation of this file.
1 /* ${copyright}$ */
2 /* $Id: BrOrgInfoRsp.H 1260 2014-12-02 17:38:55Z rafael $ */
7 #ifndef __BR_ORG_INFO_RSP_H__
8 #define __BR_ORG_INFO_RSP_H__
9 
10 #include <string>
11 #include <map>
12 #include <set>
13 #include <memory>
14 
15 #include "libepp_nicbr.H"
16 
17 #include "ContactInfoRsp.H"
18 #include "CommonData.H"
19 
20 using std::string;
21 using std::map;
22 using std::set;
23 using std::auto_ptr;
24 
25 LIBEPP_NICBR_NS_BEGIN
26 
29 {
30 public:
32  BrOrgInfoRsp(bool reset = true) : ContactInfoRsp(false)
33  {
34  if (reset) {
35  this->reset();
36  }
37  }
38 
41  {
42  _roid = parent.get_roid();
43  _status_set = parent.get_status_set();
44  _clID = parent.get_clID();
45  _crID = parent.get_crID();
46  _crDate = parent.get_crDate();
47  _upID = parent.get_upID();
48  _upDate = parent.get_upDate();
49  _trDate = parent.get_trDate();
50  _common = parent.get_common_data();
51  _authInfo = parent.get_authInfo();
52  }
53 
55 
58  void set_organization(const string &organization)
59  {
60  _organization = organization;
61  }
62 
64 
68  {
69  return _organization;
70  }
71 
72 
74 
77  void set_responsible(const string &responsible)
78  {
79  _responsible = responsible;
80  }
81 
83 
86  string get_responsible()
87  {
88  return _responsible;
89  };
90 
92 
96  void insert_contact(const string &type, const string &id)
97  {
98  _contact_list[type] = id;
99  }
100 
102 
105  map< string, string, less<string> > get_contact_list()
106  {
107  return _contact_list;
108  }
109 
111 
114  void set_proxy(const string &proxy)
115  {
116  _proxy = proxy;
117  }
118 
120 
123  string get_proxy()
124  {
125  return _proxy;
126  }
127 
129 
132  void insert_domainName(const string &fqdn)
133  {
134  _domain_list.insert(fqdn);
135  }
136 
138 
141  set<string> get_domainName_list()
142  {
143  return _domain_list;
144  }
145 
148 
151  void set_exDate(const string &exDate)
152  {
153  _exDate = exDate;
154  }
155 
158 
161  string get_exDate() const
162  {
163  return _exDate;
164  }
165 
168  void insert_asn(const int &asn)
169  {
170  _asn_list.insert(asn);
171  }
172 
175  set<int> get_asn_list() const
176  {
177  return _asn_list;
178  }
179 
182  void insert_ipRange(const IpRange &ipRange)
183  {
184  _ipRange_list.insert(ipRange);
185  }
186 
189  set<IpRange> get_ipRange_list() const
190  {
191  return _ipRange_list;
192  }
193 
195  /*
196  @param suspended flag
197  */
198  void set_suspended(const bool suspended)
199  {
200  if (suspended) {
201  _suspended = SuspendedStatus::SUSPENDED;
202 
203  } else {
204  _suspended = SuspendedStatus::NORMAL;
205  }
206  }
207 
210  /*
211  @return suspended flag
212  */
213  SuspendedStatus::Value get_suspended() const
214  {
215  return _suspended;
216  }
217 
219  // LACNIC Org extension methods
220 
222 
225  void set_type(const string &type)
226  {
227  _type = type;
228  }
229 
231 
234  string get_type() const
235  {
236  return _type;
237  }
238 
240 
243  void set_epp_status(const string &epp_status)
244  {
245  _epp_status = epp_status;
246  }
247 
249 
252  string get_epp_status() const
253  {
254  return _epp_status;
255  }
256 
259  /*
260  @param ip IP or range
261  */
262  void insert_epp_ip(const string &ip)
263  {
264  _epp_ips.push_back(ip);
265  }
266 
269  /*
270  @return list of EPP IPs or ranges
271  */
272  vector<string> get_epp_ips() const
273  {
274  return _epp_ips;
275  }
276 
278  /*
279  @param type renewal type
280  */
281  void insert_renewal_type(const string &type)
282  {
283  _renewal_types.push_back(type);
284  }
285 
287  /*
288  @param types renewal types
289  */
290  void set_renewal_types(const vector<string> &types)
291  {
292  _renewal_types = types;
293  }
294 
296  /*
297  @return list of renewal types of an organization
298  */
299  vector<string> get_renewal_types() const
300  {
301  return _renewal_types;
302  }
303 
305  /*
306  @param date renewal date
307  */
308  void set_renewal_date(const string &date)
309  {
310  _renewal_date = date;
311  }
312 
314  /*
315  @return renewal date
316  */
317  string get_renewal_date() const
318  {
319  return _renewal_date;
320  }
321 
323  /*
324  @param resources_class for now can be "all-resources" or "non-legacy-only"
325  */
326  void set_resources_class(const string &resources_class)
327  {
328  _resources_class = resources_class;
329  }
330 
332  /*
333  @return organization resources class
334  */
335  string get_resources_class() const
336  {
337  return _resources_class;
338  }
339 
341  /*
342  @param password legacy organization password
343  */
344  void set_password(const string &password)
345  {
346  _password = password;
347  }
348 
350  /*
351  @return legacy organization password
352  */
353  string get_password() const
354  {
355  return _password;
356  }
357 
359  void reset()
360  {
362  _organization = "";
363  _responsible = "";
364  _proxy = "";
365  _contact_list.clear();
366  _domain_list.clear();
367  _exDate = "";
368  _asn_list.clear();
369  _ipRange_list.clear();
370  _suspended = SuspendedStatus::UNDEFINED;
371  _type = "";
372  _epp_status = "";
373  _epp_ips.clear();
374  _renewal_types.clear();
375  _renewal_date = "";
376  _resources_class = "";
377  _password = "";
378  }
379 
380 protected:
383 
385  string _responsible;
386 
388  map<string, string, less<string> > _contact_list;
389 
391  string _proxy;
392 
394  set<string> _domain_list;
395 
397  string _exDate;
398 
400  set<int> _asn_list;
401 
402  // IP Ranges
403  set<IpRange> _ipRange_list;
404 
406  SuspendedStatus::Value _suspended;
407 
409  // LACNIC Org extension methods
410 
412  string _type;
413 
415  string _epp_status;
416 
419  vector<string> _epp_ips;
420 
422  vector<string> _renewal_types;
423 
426 
432 
434  string _password;
435 };
436 
437 LIBEPP_NICBR_NS_END
438 #endif //__BR_ORG_INFO_RSP_H__
void set_exDate(const string &exDate)
Definition: BrOrgInfoRsp.H:151
void set_organization(const string &organization)
Sets the Organization.
Definition: BrOrgInfoRsp.H:58
void insert_renewal_type(const string &type)
Inserts a renewal type.
Definition: BrOrgInfoRsp.H:281
void set_resources_class(const string &resources_class)
Sets the organization resources class.
Definition: BrOrgInfoRsp.H:326
string _upDate
Last modification date and time.
Definition: ContactInfoRsp.H:285
void insert_domainName(const string &fqdn)
Inserts a domain name into the list.
Definition: BrOrgInfoRsp.H:132
string get_clID() const
Returns the client id.
Definition: ContactInfoRsp.H:103
set< string > get_domainName_list()
Returns the domain name list.
Definition: BrOrgInfoRsp.H:141
string _proxy
Local Legal Representative.
Definition: BrOrgInfoRsp.H:391
AuthInfo _authInfo
authorization information
Definition: ContactInfoRsp.H:294
EPP ContactInfoRsp Class.
Definition: ContactInfoRsp.H:28
string _upID
last client id that updated the object
Definition: ContactInfoRsp.H:282
string _trDate
Last transfer date and time.
Definition: ContactInfoRsp.H:288
Project defines.
map< string, string, less< string > > get_contact_list()
Returns the Contact List.
Definition: BrOrgInfoRsp.H:105
EPP CommonData Class.
vector< string > _epp_ips
Definition: BrOrgInfoRsp.H:419
string _crDate
Creation date and time.
Definition: ContactInfoRsp.H:279
string _clID
Sponsoring client id.
Definition: ContactInfoRsp.H:273
void set_renewal_date(const string &date)
Sets the organization billing date.
Definition: BrOrgInfoRsp.H:308
string _exDate
Expiration date.
Definition: BrOrgInfoRsp.H:397
void set_password(const string &password)
Sets the legacy organization password.
Definition: BrOrgInfoRsp.H:344
vector< string > get_renewal_types() const
Returns list of renewal types of an organization.
Definition: BrOrgInfoRsp.H:299
SuspendedStatus::Value get_suspended() const
Definition: BrOrgInfoRsp.H:213
Describes IpRange structure.
Definition: CommonData.H:192
string get_crDate() const
Returns the creation date.
Definition: ContactInfoRsp.H:115
string get_roid() const
Returns the repository object id.
Definition: ContactInfoRsp.H:91
set< string > get_status_set() const
Returns the status list of the object.
Definition: ContactInfoRsp.H:97
void insert_contact(const string &type, const string &id)
Inserts a Contact into the list.
Definition: BrOrgInfoRsp.H:96
string get_resources_class() const
Returns the organization resources class.
Definition: BrOrgInfoRsp.H:335
BrOrgInfoRsp(bool reset=true)
Default constructor.
Definition: BrOrgInfoRsp.H:32
string get_type() const
Returns the organization type.
Definition: BrOrgInfoRsp.H:234
string get_trDate() const
Returns the last transfer date.
Definition: ContactInfoRsp.H:133
string _resources_class
Definition: BrOrgInfoRsp.H:431
vector< string > get_epp_ips() const
Definition: BrOrgInfoRsp.H:272
string get_upDate() const
Returns the last update.
Definition: ContactInfoRsp.H:127
void set_epp_status(const string &epp_status)
Sets the organization epp status.
Definition: BrOrgInfoRsp.H:243
string _renewal_date
Billing date for organizations that have resources.
Definition: BrOrgInfoRsp.H:425
map< string, string, less< string > > _contact_list
Human Contacts.
Definition: BrOrgInfoRsp.H:388
string get_password() const
Returns the legacy organization password.
Definition: BrOrgInfoRsp.H:353
vector< string > _renewal_types
List of category and characteristics of the organization.
Definition: BrOrgInfoRsp.H:422
EPP BrOrgInfoRsp Class.
Definition: BrOrgInfoRsp.H:28
void insert_epp_ip(const string &ip)
Definition: BrOrgInfoRsp.H:262
string _password
Authenticate updates of legacy organizations.
Definition: BrOrgInfoRsp.H:434
void copy_parent_data(ContactInfoRsp &parent)
Copies data from the parent.
Definition: BrOrgInfoRsp.H:40
void insert_ipRange(const IpRange &ipRange)
Definition: BrOrgInfoRsp.H:182
void set_suspended(const bool suspended)
Sets suspended flag for organizations with payment problems.
Definition: BrOrgInfoRsp.H:198
void reset()
reset attributes
Definition: BrOrgInfoRsp.H:359
string _roid
Repository id.
Definition: ContactInfoRsp.H:267
CommonData get_common_data() const
Returns the common data of the object.
Definition: ContactInfoRsp.H:148
EPP ContactInfoRsp Class.
void set_renewal_types(const vector< string > &types)
Sets the organization category and characteristics.
Definition: BrOrgInfoRsp.H:290
void reset()
reset attributes
Definition: ContactInfoRsp.H:247
set< string > _domain_list
Domain names.
Definition: BrOrgInfoRsp.H:394
void set_type(const string &type)
Sets the organization type.
Definition: BrOrgInfoRsp.H:225
void set_proxy(const string &proxy)
Sets the Legal Representative.
Definition: BrOrgInfoRsp.H:114
void set_responsible(const string &responsible)
Sets Responsible for the organization.
Definition: BrOrgInfoRsp.H:77
string get_epp_status() const
Returns the organization epp status.
Definition: BrOrgInfoRsp.H:252
SuspendedStatus::Value _suspended
Suspended flag.
Definition: BrOrgInfoRsp.H:406
CommonData _common
Common data object.
Definition: ContactInfoRsp.H:291
set< string > _status_set
Status list.
Definition: ContactInfoRsp.H:270
string get_organization()
Returns the Organization.
Definition: BrOrgInfoRsp.H:67
string _responsible
Person responsible for the organization.
Definition: BrOrgInfoRsp.H:385
set< int > get_asn_list() const
Definition: BrOrgInfoRsp.H:175
string get_renewal_date() const
Returns the organization billing date.
Definition: BrOrgInfoRsp.H:317
string _epp_status
Determine if the organization is blocked for EPP access.
Definition: BrOrgInfoRsp.H:415
set< int > _asn_list
ASNs.
Definition: BrOrgInfoRsp.H:400
void insert_asn(const int &asn)
Definition: BrOrgInfoRsp.H:168
set< IpRange > get_ipRange_list() const
Definition: BrOrgInfoRsp.H:189
string _organization
Organization Identifier.
Definition: BrOrgInfoRsp.H:382
string get_crID() const
Returns the creator client id.
Definition: ContactInfoRsp.H:109
string get_responsible()
Returns Responsible for the organization.
Definition: BrOrgInfoRsp.H:86
string _crID
Creator client id.
Definition: ContactInfoRsp.H:276
string get_upID() const
Returns the last update client id.
Definition: ContactInfoRsp.H:121
AuthInfo get_authInfo() const
Returns authorization information.
Definition: ContactInfoRsp.H:163
string _type
Define the organization type.
Definition: BrOrgInfoRsp.H:412
string get_exDate() const
Definition: BrOrgInfoRsp.H:161
string get_proxy()
Returns the Legal Representative.
Definition: BrOrgInfoRsp.H:123