2013-12-31 19:36:07 +00:00
|
|
|
#include "se/DomainRenewCommand.hpp"
|
|
|
|
|
|
|
|
#include "se/StandardCommandType.hpp"
|
|
|
|
#include "se/StandardObjectType.hpp"
|
|
|
|
#include "xml/XMLHelper.hpp"
|
|
|
|
#include "se/EPPDateFormatter.hpp"
|
|
|
|
|
|
|
|
DomainRenewCommand::DomainRenewCommand (const std::string &name,
|
2014-01-17 01:46:48 +00:00
|
|
|
constXMLGC::XMLGregorianCalendar &exDate)
|
2013-12-31 19:36:07 +00:00
|
|
|
: ObjectCommand(StandardCommandType::RENEW(),
|
|
|
|
StandardObjectType::DOMAIN(),
|
|
|
|
name)
|
|
|
|
{
|
|
|
|
Init(name, exDate);
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
DomainRenewCommand::DomainRenewCommand (const std::string &name,
|
2014-01-17 01:46:48 +00:00
|
|
|
constXMLGC::XMLGregorianCalendar &exDate,
|
2013-12-31 19:36:07 +00:00
|
|
|
const Period &period)
|
|
|
|
: ObjectCommand(StandardCommandType::RENEW(),
|
|
|
|
StandardObjectType::DOMAIN(),
|
|
|
|
name)
|
|
|
|
{
|
|
|
|
Init(name, exDate);
|
|
|
|
|
|
|
|
period.appendPeriod (xmlWriter, objElement);
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void DomainRenewCommand::Init (const std::string &name,
|
2014-01-17 01:46:48 +00:00
|
|
|
constXMLGC::XMLGregorianCalendar &exDate)
|
2013-12-31 19:36:07 +00:00
|
|
|
{
|
|
|
|
XMLHelper::setTextContent
|
|
|
|
(xmlWriter->appendChild (objElement, "curExpDate"),
|
|
|
|
EPPDateFormatter::toXSDateTime(exDate));
|
|
|
|
}
|