38 lines
1.2 KiB
C++
38 lines
1.2 KiB
C++
#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,
|
|
constXMLGC::XMLGregorianCalendar &exDate)
|
|
: ObjectCommand(StandardCommandType::RENEW(),
|
|
StandardObjectType::DOMAIN(),
|
|
name)
|
|
{
|
|
Init(name, exDate);
|
|
}
|
|
|
|
|
|
DomainRenewCommand::DomainRenewCommand (const std::string &name,
|
|
constXMLGC::XMLGregorianCalendar &exDate,
|
|
const Period &period)
|
|
: ObjectCommand(StandardCommandType::RENEW(),
|
|
StandardObjectType::DOMAIN(),
|
|
name)
|
|
{
|
|
Init(name, exDate);
|
|
|
|
period.appendPeriod (xmlWriter, objElement);
|
|
}
|
|
|
|
|
|
void DomainRenewCommand::Init (const std::string &name,
|
|
constXMLGC::XMLGregorianCalendar &exDate)
|
|
{
|
|
XMLHelper::setTextContent
|
|
(xmlWriter->appendChild (objElement, "curExpDate"),
|
|
EPPDateFormatter::toXSDateTime(exDate));
|
|
}
|