libepp_nicbr
DomainInfoCmd.H
Go to the documentation of this file.
1 /* ${copyright}$ */
2 /* $Id: DomainInfoCmd.H 1183 2013-07-26 18:39:37Z rafael $ */
7 #ifndef __DOMAIN_INFO_CMD_H__
8 #define __DOMAIN_INFO_CMD_H__
9 
10 #include <string>
11 
12 #include "libepp_nicbr.H"
13 
14 #include "Command.H"
15 #include "CommonData.H"
16 #include "LaunchInfoCmd.H"
17 
18 using std::string;
19 
20 LIBEPP_NICBR_NS_BEGIN
21 
23 class DomainInfoCmd : public Command
24 {
25 public:
26 
28  DomainInfoCmd(bool reset = true) : Command(false)
29  {
30  if (reset) {
31  this->reset();
32  }
33  }
34 
36 
39  void set_name(const string& name) { _name = name; }
40 
42 
45  string get_name() const { return _name; }
46 
53  void set_hosts_control(const string& hosts_control)
54  {
55  _hosts_control = hosts_control;
56  }
57 
59 
62  string get_hosts_control() const { return _hosts_control; }
63 
65 
68  void set_authInfo(const AuthInfo &authInfo)
69  {
70  _authInfo = authInfo;
71  }
72 
74 
77  AuthInfo get_authInfo() const { return _authInfo; }
78 
80 
83  void set_launch(const LaunchInfoCmd &launch) { _launch = launch; }
84 
86 
89  LaunchInfoCmd get_launch() const { return _launch; }
90 
92  bool has_extension() const {
93  return has_launch_extension();
94  }
95 
97  bool has_launch_extension() const {
98  return _launch.get_phase().get_phase() != LaunchPhase::NONE;
99  }
100 
102  void reset()
103  {
104  Command::reset();
105  _name = "";
106  _hosts_control = "all";
107  _authInfo.reset();
108  _launch.reset();
109  }
110 
111 protected:
113  string _name;
114 
118 
121 
124 };
125 
126 LIBEPP_NICBR_NS_END
127 #endif //__DOMAIN_INFO_CMD_H__
string get_hosts_control() const
Returns hosts control attribute.
Definition: DomainInfoCmd.H:62
bool has_launch_extension() const
Check if there is launch extension.
Definition: DomainInfoCmd.H:97
void set_name(const string &name)
Sets domain name.
Definition: DomainInfoCmd.H:39
EPP LaunchInfoCmd Class.
LaunchPhase get_phase() const
Returns the phase of the launch.
Definition: LaunchInfoCmd.H:50
Project defines.
EPP CommonData Class.
AuthInfo get_authInfo() const
Returns authorization information.
Definition: DomainInfoCmd.H:77
void reset()
Reset object attributes.
Definition: DomainInfoCmd.H:102
DomainInfoCmd(bool reset=true)
Default constructor.
Definition: DomainInfoCmd.H:28
void reset()
Reset object attributes.
Definition: LaunchInfoCmd.H:65
void set_authInfo(const AuthInfo &authInfo)
Sets authorization information.
Definition: DomainInfoCmd.H:68
AuthInfo _authInfo
authorization information
Definition: DomainInfoCmd.H:120
void reset()
Reset all object attributes.
Definition: CommonData.H:152
bool has_extension() const
Check if there is any extension.
Definition: DomainInfoCmd.H:92
Value get_phase() const
Returns the launch phase.
Definition: Launch.H:221
string _name
fully qualified domain name
Definition: DomainInfoCmd.H:113
EPP LaunchInfoCmd Class.
Definition: LaunchInfoCmd.H:19
void set_hosts_control(const string &hosts_control)
Sets "hosts" attribute which controls return of information describing hosts.
Definition: DomainInfoCmd.H:53
string get_name() const
Returns domain name.
Definition: DomainInfoCmd.H:45
void reset()
Reset object attributes.
Definition: Command.H:33
EPP Command Class.
Definition: Command.H:18
EPP Command Class.
void set_launch(const LaunchInfoCmd &launch)
Sets the launch.
Definition: DomainInfoCmd.H:83
EPP DomainInfoCmd Class.
Definition: DomainInfoCmd.H:23
LaunchInfoCmd get_launch() const
Returns the launch.
Definition: DomainInfoCmd.H:89
string _hosts_control
Definition: DomainInfoCmd.H:117
AuthInfo Class.
Definition: CommonData.H:83
LaunchInfoCmd _launch
Launch.
Definition: DomainInfoCmd.H:123