1 /* 2 * Copyright (C) 2006-2021 Registro.br. All rights reserved. 3 * 4 * Redistribution and use in source and binary forms, with or without 5 * modification, are permitted provided that the following conditions are 6 * met: 7 * 1. Redistribution of source code must retain the above copyright 8 * notice, this list of conditions and the following disclaimer. 9 * 2. Redistributions in binary form must reproduce the above copyright 10 * notice, this list of conditions and the following disclaimer in the 11 * documentation and/or other materials provided with the distribution. 12 * 13 * THIS SOFTWARE IS PROVIDED BY REGISTRO.BR ``AS IS AND ANY EXPRESS OR 14 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 15 * WARRANTIE OF FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO 16 * EVENT SHALL REGISTRO.BR BE LIABLE FOR ANY DIRECT, INDIRECT, 17 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, 18 * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS 19 * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 20 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR 21 * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE 22 * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH 23 * DAMAGE. 24 */ 25 /* $Id$ */ 26 /** @file DefRegInfoRsp.H 27 * @brief EPP DefRegInfoRsp Class 28 */ 29 30 #ifndef __DEF_REG_INFO_RSP_H__ 31 #define __DEF_REG_INFO_RSP_H__ 32 33 #include <list> 34 #include <string> 35 36 #include "libepp_nicbr.H" 37 38 #include "Response.H" 39 #include "CommonData.H" 40 41 using std::list; 42 using std::string; 43 44 LIBEPP_NICBR_NS_BEGIN 45 46 /// EPP DefRegInfoRsp Class 47 class DefRegInfoRsp : public Response 48 { 49 public: 50 /// Default constructor Response(false)51 DefRegInfoRsp(bool reset = true) : Response(false) 52 { 53 if (reset) { 54 this->reset(); 55 } 56 } 57 58 /// Sets repository object identification 59 /** 60 @param roid repository object identification 61 */ set_roid(const string & roid)62 void set_roid(const string& roid) { _roid = roid; } 63 64 /// Returns repository object identification 65 /** 66 @return repository object identification 67 */ get_roid()68 string get_roid() const { return _roid; } 69 70 /// Sets name of the Defensive Registration object 71 /** 72 @param name name of the Defensive Registration object 73 */ set_name(const DefRegName & name)74 void set_name(const DefRegName &name) { _name = name; } 75 76 /// Returns name of the Defensive Registration object 77 /** 78 @return name of the Defensive Registration object 79 */ get_name()80 DefRegName get_name() const { return _name; } 81 82 /// Sets registrant 83 /** 84 @param registrant registrant identification 85 */ set_registrant(const string & registrant)86 void set_registrant(const string& registrant) { _registrant = registrant; } 87 88 /// Returns registrant 89 /** 90 @return registrant identification 91 */ get_registrant()92 string get_registrant() const { return _registrant; } 93 94 /// Sets the Trademark Identifier (ID) associated with the Defensive 95 /// Registration Object 96 /** 97 * @param id trademark identifier 98 */ set_trademark_id(const string & id)99 void set_trademark_id(const string &id) { _trademark_id = id; } 100 101 /// Returns the trademark Identifier (ID) associated with the 102 /// Defensive Registration Object 103 /** 104 * @return trademark identifier 105 */ get_trademark_id()106 string get_trademark_id() const { return _trademark_id; } 107 108 /// Sets the country which issued the Trademark associated with the 109 /// Defensive Registration Object 110 /** 111 * @param country country 112 */ set_trademark_country(const string & country)113 void set_trademark_country(const string &country) { _trademark_country = country; } 114 115 /// Returns country which issued the Trademark associated with the 116 /// Defensive Registration Object 117 /** 118 * @return country 119 */ get_trademark_country()120 string get_trademark_country() const { return _trademark_country; } 121 122 /// Sets date when the Trademark was issued 123 /** 124 * @param date date when the Trademark was issued 125 */ set_trademark_date(const string & date)126 void set_trademark_date(const string &date) { _trademark_date = date; } 127 128 /// Returns the date when the Trademark was issued 129 /** 130 * @return date when the Trademark was issued 131 */ get_trademark_date()132 string get_trademark_date() const { return _trademark_date; } 133 134 /// Sets the identifier for the administrator associated with the 135 /// Defensive Registration object 136 /** 137 * @param contact administrator contact id 138 */ set_admin_contact(const string & contact)139 void set_admin_contact(const string &contact) { _admin_contact = contact; } 140 141 /// Returns the identifier for the administrator associated with the 142 /// Defensive Registration object 143 /** 144 * @return administrator contact id 145 */ get_admin_contact()146 string get_admin_contact() const { return _admin_contact; } 147 148 /// Inserts a new status 149 /** 150 * @param status status to be inserted 151 */ insert_status(const string & status)152 void insert_status(const string& status) { _status_set.insert(status); } 153 154 /// Returns set of status 155 /** 156 * @return set of status 157 */ get_status_set()158 set<string> get_status_set() const { return _status_set; } 159 160 /// Sets the sponsoring client 161 /** 162 * @param clID sponsoring client 163 */ set_clID(const string & clID)164 void set_clID(const string& clID) 165 { 166 _clID = clID; 167 } 168 169 /// Returns sponsoring client 170 /** 171 @return sponsoring client 172 */ get_clID()173 string get_clID() const { return _clID; } 174 175 /// Sets the identifier of the client that created the object 176 /** 177 @param crID id of the client that created the object 178 */ set_crID(const string & crID)179 void set_crID(const string& crID) { _crID = crID; } 180 181 /// Returns the name of the Defensive Registration object 182 /** 183 @return name of the Defensive Registration object 184 */ get_crID()185 string get_crID() const { return _crID; } 186 187 /// Sets creation date 188 /** 189 @param crDate object creation date 190 */ set_crDate(const string & crDate)191 void set_crDate(const string& crDate) { _crDate = crDate; } 192 193 /// Returns creation date 194 /** 195 @return creation date 196 */ get_crDate()197 string get_crDate() const { return _crDate; } 198 199 /// Sets the identifier of the client that last updated the object 200 /** 201 @param upID id of the client that created the object 202 */ set_upID(const string & upID)203 void set_upID(const string& upID) { _upID = upID; } 204 205 /// Returns the identifier of the client that last updated the object 206 /** 207 @return id of client that last updated the object 208 */ get_upID()209 string get_upID() const { return _upID; } 210 211 /// Sets last modification date 212 /** 213 @param upDate last modification date 214 */ set_upDate(const string & upDate)215 void set_upDate(const string& upDate) { _upDate = upDate; } 216 217 /// Returns last modification date 218 /** 219 @return last modification date 220 */ get_upDate()221 string get_upDate() const { return _upDate; } 222 223 /// Sets expiration date 224 /** 225 @param exDate expiration date 226 */ set_exDate(const string & exDate)227 void set_exDate(const string& exDate) { _exDate = exDate; } 228 229 /// Returns expiration date 230 /** 231 @return expiration date 232 */ get_exDate()233 string get_exDate() const { return _exDate; } 234 235 /// Sets last successfull transfer date 236 /** 237 @param trDate last successfull transfer date 238 */ set_trDate(const string & trDate)239 void set_trDate(const string& trDate) { _trDate = trDate; } 240 241 /// Returns last successfull transfer date 242 /** 243 @return last successfull transfer date 244 */ get_trDate()245 string get_trDate() const { return _trDate; } 246 247 /// Sets authorization information 248 /** 249 @param authInfo authorization information 250 */ set_authInfo(const AuthInfo & authInfo)251 void set_authInfo(const AuthInfo &authInfo) 252 { 253 _authInfo = authInfo; 254 } 255 256 /// Returns authorization information 257 /** 258 @return authorization information 259 */ get_authInfo()260 AuthInfo get_authInfo() const { return _authInfo; } 261 262 /// Resets object attributes reset()263 void reset() 264 { 265 Response::reset(); 266 _name.reset(); 267 _roid = ""; 268 _status_set.clear(); 269 _registrant = ""; 270 _trademark_id = ""; 271 _trademark_country = ""; 272 _trademark_date = ""; 273 _admin_contact = ""; 274 _clID = ""; 275 _crID = ""; 276 _crDate = ""; 277 _upID = ""; 278 _upDate = ""; 279 _exDate = ""; 280 _upDate = ""; 281 _trDate = ""; 282 _authInfo.reset(); 283 } 284 285 protected: 286 /// Contains the Repository Object Identifier assigned to the 287 /// Defensive Registration object when the object was created 288 string _roid; 289 290 /// Name of the Defensive Registration object 291 DefRegName _name; 292 293 /// Identifier for the human or organizational social information 294 /// (contact) object to be associated with the Defensive 295 /// Registration object as the object registrant 296 string _registrant; 297 298 /// Trademark Identifier (ID) associated with the Defensive 299 /// Registration Object 300 string _trademark_id; 301 302 /// Country which issued the Trademark associated with the Defensive 303 /// Registration Object 304 string _trademark_country; 305 306 /// Date when the Trademark was issued 307 string _trademark_date; 308 309 /// Identifier for the administrator associated with the Defensive 310 /// Registration object 311 string _admin_contact; 312 313 /// Contain the current status descriptors associated with the 314 /// Defensive Registration 315 set<string> _status_set; 316 317 /// sponsoring client id 318 string _clID; 319 320 /// client that created object 321 string _crID; 322 323 /// creation date 324 string _crDate; 325 326 /// client that last updated object 327 string _upID; 328 329 /// last modification date 330 string _upDate; 331 332 /// expiration date 333 string _exDate; 334 335 /// last successfull transfer date 336 string _trDate; 337 338 /// authorization information 339 AuthInfo _authInfo; 340 }; 341 342 LIBEPP_NICBR_NS_END 343 344 #endif // __DEF_REG_INFO_RSP_H__ 345