This commit is contained in:
Ren RenJuan 2014-01-15 21:41:16 +00:00
parent d9ec3a171b
commit 7a11d07def
25 changed files with 179 additions and 233 deletions

View File

@ -55,7 +55,7 @@ INCLUDE_DIR = -I . -I $(XERCES_INC_DIR) -I $(XALAN_INC_DIR)
build_obj_dir = $(BUILD_OBJ_DIR) build_obj_dir = $(BUILD_OBJ_DIR)
src_dirs_cpp = se se/secDNS common session xml src_dirs_cpp = se se/secDNS common OTE session xml
src_dirs_c = config src_dirs_c = config
srcs_all = $(foreach dir,$(src_dirs_cpp),$(wildcard $(dir)/*.cpp)) srcs_all = $(foreach dir,$(src_dirs_cpp),$(wildcard $(dir)/*.cpp))
srcs_all += $(foreach dir,$(src_dirs_c),$(wildcard $(dir)/*.c)) srcs_all += $(foreach dir,$(src_dirs_c),$(wildcard $(dir)/*.c))
@ -79,7 +79,7 @@ include $(foreach name,$(srcs_all),$(basename $(name)).d)
vpath %.cpp ./ \ vpath %.cpp ./ \
./se\ ./se\
.OTE \ ./OTE \
./se/secDNS\ ./se/secDNS\
./xml\ ./xml\
./common\ ./common\

View File

@ -1,7 +1,7 @@
#ifndef __LPE_CHECK_COMMAND_HPP #ifndef __LPE_CHECK_COMMAND_HPP
#define __LPE_CHECK_COMMAND_HPP #define __LPE_CHECK_COMMAND_HPP
#include "se/CheckCommand.hpp" #include "OTE/LPECheckCommand.hpp"
#include "se/StandardObjectType.hpp" #include "se/StandardObjectType.hpp"
#include <string> #include <string>

View File

@ -1,7 +1,7 @@
#include "common/init.hpp" #include "common/init.hpp"
#include "common/Test.hpp" #include "common/Test.hpp"
#include "se/CLTRID.hpp" #include "se/CLTRID.hpp"
#include "se/LPECheckCommand.hpp" #include "OTE/LPECheckCommand.hpp"
#include "session/Timer.hpp" #include "session/Timer.hpp"
#include <iostream> #include <iostream>
@ -15,12 +15,12 @@ void doWork()
CLTRID::setClID("JTKUTEST"); CLTRID::setClID("JTKUTEST");
Timer::setTime("20070101.010101"); Timer::setTime("20070101.010101");
LPECheckCommand cmd("test.com.au"); LPECheckCommand cmd("test-andvalidate.claimsgafour");
const string xml(cmd.toXML()); const string xml(cmd.toXML());
ASSERT_EQ(cmd.getCommandType()->getCommandName(), "check"); ASSERT_EQ(cmd.getCommandType()->getCommandName(), "check");
ASSERT_EQ(cmd.getObjectType()->getName(), "domain"); ASSERT_EQ(cmd.getObjectType()->getName(), "domain");
ASSERT_EQ(xml, "<?xml version=\"1.0\" encoding=\"UTF-8\"?><epp xmlns=\"urn:ietf:params:xml:ns:epp-1.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:epp-1.0 epp-1.0.xsd\"><command><check><check xmlns=\"urn:ietf:params:xml:ns:domain-1.0\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:domain-1.0 domain-1.0.xsd\"><name>test.com.au</name></check></check><clTRID>JTKUTEST.20070101.010101.0</clTRID></command></epp>"); ASSERT_EQ(xml, "<?xml version=\"1.0\" encoding=\"UTF-8\"?><epp xmlns=\"urn:ietf:params:xml:ns:epp-1.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:epp-1.0 epp-1.0.xsd\"><command><check><check xmlns=\"urn:ietf:params:xml:ns:domain-1.0\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:domain-1.0 domain-1.0.xsd\"><name>test-andvalidate.claimsgafour</name></check></check><clTRID>JTKUTEST.20070101.010101.0</clTRID></command></epp>");
} }
} }

View File

@ -1,4 +1,4 @@
#include "se/LPECheckResponse.hpp" #include "OTE/LPECheckResponse.hpp"
#include "common/StringUtils.hpp" #include "common/StringUtils.hpp"
#include "se/StandardObjectType.hpp" #include "se/StandardObjectType.hpp"

View File

@ -11,10 +11,10 @@
* *
* @see DomainCheckCommand * @see DomainCheckCommand
*/ */
class DomainCheckResponse : public CheckResponse class LPECheckResponse : public CheckResponse
{ {
public: public:
DomainCheckResponse (); LPECheckResponse ();
protected: protected:
const std::string& chkDataCountExpr() const { return DOM_CHKDATA_COUNT_EXPR(); }; const std::string& chkDataCountExpr() const { return DOM_CHKDATA_COUNT_EXPR(); };

View File

@ -1,4 +1,4 @@
#include "se/LPECheckResponse.hpp" #include "OTE/LPECheckResponse.hpp"
// #include "session/TestEnvironment.hpp" // #include "session/TestEnvironment.hpp"
#include "xml/XMLParser.hpp" #include "xml/XMLParser.hpp"
#include "xml/XMLDocument.hpp" #include "xml/XMLDocument.hpp"

View File

@ -1,54 +0,0 @@
#include "se/LPECreateCommand.hpp"
#include "se/StandardObjectType.hpp"
#include "xml/XMLHelper.hpp"
LPECreateCommand::LPECreateCommand (const std::string& name,
const std::string& pw,
const std::string* registrantID,
const std::vector<std::string>* techContacts,
const std::vector<std::string>* nameservers,
const std::vector<std::string>* adminContacts,
const std::vector<std::string>* billingContacts,
const Period* period)
: CreateCommand(StandardObjectType::DOMAIN(), name)
{
std::vector<std::string>::const_iterator p;
if (period)
period->appendPeriod (xmlWriter, objElement);
if (nameservers)
{
DOMElement *ns = xmlWriter->appendChild (objElement, "ns");
for (p = nameservers->begin(); p != nameservers->end(); p++)
XMLHelper::setTextContent
(xmlWriter->appendChild (ns, "hostObj"), *p);
}
if (registrantID)
{
XMLHelper::setTextContent
(xmlWriter->appendChild(objElement, "registrant"), *registrantID);
}
if (adminContacts)
for (p = adminContacts->begin(); p != adminContacts->end(); p++)
xmlWriter->appendChild(objElement, "contact", *p, "type", "admin");
if (techContacts)
for (p = techContacts->begin(); p != techContacts->end(); p++)
xmlWriter->appendChild(objElement, "contact", *p, "type", "tech");
if (billingContacts)
for (p = billingContacts->begin(); p != billingContacts->end(); p++)
xmlWriter->appendChild(objElement, "contact", *p, "type", "billing");
XMLHelper::setTextContent
(xmlWriter->appendChild
(xmlWriter->appendChild
(objElement,
"authInfo"),
"pw"),
pw);
}

View File

@ -12,7 +12,7 @@
* input parameters. The toXML method in Command serialises this object to * input parameters. The toXML method in Command serialises this object to
* XML. * XML.
*/ */
class DomainCreateCommand : public CreateCommand class LPECreateCommand : public CreateCommand
{ {
public: public:
/** /**
@ -29,4 +29,4 @@ public:
const Period* period = NULL); const Period* period = NULL);
}; };
#endif // __DOMAINCREATECOMMAND_HPP #endif // __LPECREATECOMMAND_HPP

View File

@ -1,4 +1,4 @@
#include "se/LPECreateResponse.hpp" #include "OTE/LPECreateResponse.hpp"
#include "se/StandardObjectType.hpp" #include "se/StandardObjectType.hpp"
#include "se/EPPDateFormatter.hpp" #include "se/EPPDateFormatter.hpp"
#include "common/StringUtils.hpp" #include "common/StringUtils.hpp"

View File

@ -12,10 +12,10 @@
* *
* @see DomainCreateCommand * @see DomainCreateCommand
*/ */
class DomainCreateResponse : public CreateResponse class LPECreateResponse : public CreateResponse
{ {
public: public:
DomainCreateResponse(); LPECreateResponse();
const std::string & getName() const { return name; }; const std::string & getName() const { return name; };
const XMLGregorianCalendar* getExpiryDate() const { return exDate.get(); }; const XMLGregorianCalendar* getExpiryDate() const { return exDate.get(); };

View File

@ -1,20 +1,20 @@
#include "se/OteDomainInfoResponse.hpp" #include "OTE/OteDomainInfoResponse.hpp"
#include "se/StandardObjectType.hpp" #include "se/StandardObjectType.hpp"
#include <stdlib.h> // atoi() #include <stdlib.h> // atoi()
using namespace std; using namespace std;
*oteext:infData"); const std::string OteDomainInfoResponse::OTEEXT_EXPR(Response::RESPONSE_EXPR() + "/e:extension/oteext:infData");
*oteProperties"); const std::string OteDomainInfoResponse::OTE_PROPERTIES_EXPR(OteDomainInfoResponse::OTEEXT_EXPR + "/oteext:aeProperties");
*oteext:registrantName/text()"); const std::string OteDomainInfoResponse::OTE_REGISTRANT_NAME_EXPR(OteDomainInfoResponse::OTE_PROPERTIES_EXPR + "/oteext:registrantName/text()");
*oteext:registrantID/text()"); const std::string OteDomainInfoResponse::OTE_REGISTRANT_ID_EXPR(OteDomainInfoResponse::OTE_PROPERTIES_EXPR + "/oteext:registrantID/text()");
*oteext:registrantID/@type"); const std::string OteDomainInfoResponse::OTE_REGISTRANT_ID_TYPE_EXPR(OteDomainInfoResponse::OTE_PROPERTIES_EXPR + "/oteext:registrantID/@type");
*oteext:eligibilityType/text()"); const std::string OteDomainInfoResponse::OTE_ELI_TYPE_EXPR(OteDomainInfoResponse::OTE_PROPERTIES_EXPR + "/oteext:eligibilityType/text()");
*oteext:eligibilityName/text()"); const std::string OteDomainInfoResponse::OTE_ELI_NAME_EXPR(OteDomainInfoResponse::OTE_PROPERTIES_EXPR + "/oteext:eligibilityName/text()");
*oteext:eligibilityID/text()"); const std::string OteDomainInfoResponse::OTE_ELI_ID_EXPR(OteDomainInfoResponse::OTE_PROPERTIES_EXPR + "/oteext:eligibilityID/text()");
*oteext:eligibilityID/@type"); const std::string OteDomainInfoResponse::OTE_ELI_ID_TYPE_EXPR(OteDomainInfoResponse::OTE_PROPERTIES_EXPR + "/oteext:eligibilityID/@type");
*oteext:policyReason/text()"); const std::string OteDomainInfoResponse::OTE_POLICY_REASON_EXPR(OteDomainInfoResponse::OTE_PROPERTIES_EXPR + "/oteext:policyReason/text()");

View File

@ -35,7 +35,7 @@ public:
DEPRECATED(OteDomainInfoResponse()); DEPRECATED(OteDomainInfoResponse());
const std::string& getRegistrantName() const { return registrantName; }; const std::string& getRegistrantName() const { return registrantName; };
const std::string& getAERegistrantID() const { return registrantID; }; const std::string& getOTERegistrantID() const { return registrantID; };
const std::string& getRegistrantIDType() const { return registrantIDType; }; const std::string& getRegistrantIDType() const { return registrantIDType; };
const std::string& getEligibilityType() const { return eligibilityType; }; const std::string& getEligibilityType() const { return eligibilityType; };
const std::string& getEligibilityName() const { return eligibilityName; }; const std::string& getEligibilityName() const { return eligibilityName; };
@ -46,16 +46,16 @@ public:
virtual void fromXML (XMLDocument *xmlDoc) throw (ParsingException); virtual void fromXML (XMLDocument *xmlDoc) throw (ParsingException);
private: private:
static const std::string AEEXT_EXPR, static const std::string OTEEXT_EXPR,
AE_PROPERTIES_EXPR, OTE_PROPERTIES_EXPR,
AE_REGISTRANT_NAME_EXPR, OTE_REGISTRANT_NAME_EXPR,
AE_REGISTRANT_ID_EXPR, OTE_REGISTRANT_ID_EXPR,
AE_REGISTRANT_ID_TYPE_EXPR, OTE_REGISTRANT_ID_TYPE_EXPR,
AE_ELI_TYPE_EXPR, OTE_ELI_TYPE_EXPR,
AE_ELI_NAME_EXPR, OTE_ELI_NAME_EXPR,
AE_ELI_ID_EXPR, OTE_ELI_ID_EXPR,
AE_ELI_ID_TYPE_EXPR, OTE_ELI_ID_TYPE_EXPR,
AE_POLICY_REASON_EXPR; OTE_POLICY_REASON_EXPR;
std::string registrantName, std::string registrantName,
registrantID, registrantID,
@ -68,5 +68,5 @@ private:
int policyReason; int policyReason;
}; };
#endif // __AE_DOMAIN_INFO_RESPONSE_HPP #endif // __OTE_DOMAIN_INFO_RESPONSE_HPP

View File

@ -1,12 +1,12 @@
#include "se/OteDomainModifyRegistrantCommand.hpp" #include "OTE/OteDomainModifyRegistrantCommand.hpp"
#include "common/ErrorPkg.hpp" #include "common/ErrorPkg.hpp"
#include "se/OteExtension.hpp" #include "OTE/OteExtension.hpp"
#include "xml/XMLHelper.hpp" #include "xml/XMLHelper.hpp"
namespace { namespace {
*oteExtension() { OteExtension& oteExtension() {
*oteExtension = new OteExtension(); static OteExtension* oteExtension = new OteExtension();
*oteExtension; return *oteExtension;
} }
}; // anonymous namespace }; // anonymous namespace
@ -29,29 +29,29 @@ OteDomainModifyRegistrantCommand::OteDomainModifyRegistrantCommand(
|| (eligibilityID != NULL && eligibilityIDType == NULL)) || (eligibilityID != NULL && eligibilityIDType == NULL))
{ {
throw IllegalArgException( throw IllegalArgException(
*ote.missing_arg")); ErrorPkg::getMessage("se.domain.modify.ote.missing_arg"));
} }
*oteextUpdate = xmlWriter->appendChild( DOMElement* oteextUpdate = xmlWriter->appendChild(
xmlWriter->appendChild(command, "extension"), xmlWriter->appendChild(command, "extension"),
"update", "update",
*oteExtension().getURI()); oteExtension().getURI());
*oteextUpdate->setAttribute( oteextUpdate->setAttribute(
XStr("xsi:schemaLocation").str(), XStr("xsi:schemaLocation").str(),
*oteExtension().getSchemaLocation()).str()); XStr(oteExtension().getSchemaLocation()).str());
*oteextUpdate, DOMElement* oteProperties = xmlWriter->appendChild(oteextUpdate,
*oteProperties"); "oteProperties");
XMLHelper::setTextContent( XMLHelper::setTextContent(
*oteProperties, "registrantName"), xmlWriter->appendChild(oteProperties, "registrantName"),
registrantName); registrantName);
if (registrantID != NULL && registrantIDType != NULL) if (registrantID != NULL && registrantIDType != NULL)
{ {
xmlWriter->appendChild( xmlWriter->appendChild(
*oteProperties, oteProperties,
"registrantID", "registrantID",
*registrantID, *registrantID,
"type", "type",
@ -61,21 +61,21 @@ OteDomainModifyRegistrantCommand::OteDomainModifyRegistrantCommand(
if (eligibilityType != NULL) if (eligibilityType != NULL)
{ {
XMLHelper::setTextContent( XMLHelper::setTextContent(
*oteProperties, "eligibilityType"), xmlWriter->appendChild(oteProperties, "eligibilityType"),
*eligibilityType); *eligibilityType);
} }
if (eligibilityName != NULL) if (eligibilityName != NULL)
{ {
XMLHelper::setTextContent( XMLHelper::setTextContent(
*oteProperties, "eligibilityName"), xmlWriter->appendChild(oteProperties, "eligibilityName"),
*eligibilityName); *eligibilityName);
} }
if (eligibilityID != NULL && eligibilityIDType != NULL) if (eligibilityID != NULL && eligibilityIDType != NULL)
{ {
xmlWriter->appendChild( xmlWriter->appendChild(
*oteProperties, oteProperties,
"eligibilityID", "eligibilityID",
*eligibilityID, *eligibilityID,
"type", "type",
@ -83,11 +83,11 @@ OteDomainModifyRegistrantCommand::OteDomainModifyRegistrantCommand(
} }
XMLHelper::setTextContent( XMLHelper::setTextContent(
*oteProperties, "policyReason"), xmlWriter->appendChild(oteProperties, "policyReason"),
policyReason); policyReason);
XMLHelper::setTextContent( XMLHelper::setTextContent(
*oteextUpdate, "explanation"), xmlWriter->appendChild(oteextUpdate, "explanation"),
explanation); explanation);
} }

View File

@ -26,11 +26,11 @@
* and * and
* {@link DomainKVCommandExtension}. * {@link DomainKVCommandExtension}.
*/ */
class AeDomainModifyRegistrantCommand : public DomainUpdateCommand class OteDomainModifyRegistrantCommand : public DomainUpdateCommand
{ {
public: public:
DEPRECATED( DEPRECATED(
AeDomainModifyRegistrantCommand(const std::string& name, OteDomainModifyRegistrantCommand(const std::string& name,
const std::string& registrantName, const std::string& registrantName,
const std::string& explanation, const std::string& explanation,
const std::string* eligibilityType = NULL, const std::string* eligibilityType = NULL,
@ -42,5 +42,5 @@ public:
const std::string* eligibilityIDType = NULL)); const std::string* eligibilityIDType = NULL));
}; };
#endif // __AE_DOMAIN_MODIFY_REGISTRANT_COMMAND_HPP #endif // __OTE_DOMAIN_MODIFY_REGISTRANT_COMMAND_HPP

View File

@ -3,18 +3,18 @@
#include <string> #include <string>
const std::string& OteDomainObjectType::getName() const { const std::string& OteDomainObjectType::getName() const {
*otedom"; static const std::string name = "otedom";
return name; return name;
} }
const std::string& OteDomainObjectType::getURI() const { const std::string& OteDomainObjectType::getURI() const {
*otedomain-1.0"; static const std::string uri = "urn:X-ote:params:xml:ns:otedomain-1.0";
return uri; return uri;
} }
const std::string& OteDomainObjectType::getSchemaLocation() const { const std::string& OteDomainObjectType::getSchemaLocation() const {
static const std::string schemaLocation = static const std::string schemaLocation =
*otedomain-1.0.xsd"; "urn:X-ote:params:xml:ns:otedomain-1.0 otedomain-1.0.xsd";
return schemaLocation; return schemaLocation;
} }

View File

@ -1,13 +1,13 @@
#ifndef AEDOMAIN_OBJECT_TYPE #ifndef OTEDOMAIN_OBJECT_TYPE
#define AEDOMAIN_OBJECT_TYPE #define OTEDOMAIN_OBJECT_TYPE
#include "ObjectType.hpp" #include "se/ObjectType.hpp"
#include <string> #include <string>
class AeDomainObjectType : public ObjectType { class OteDomainObjectType : public ObjectType {
public: public:
virtual ~AeDomainObjectType(void) { } virtual ~OteDomainObjectType(void) { }
virtual const std::string& getName() const; virtual const std::string& getName() const;
virtual const std::string& getURI() const; virtual const std::string& getURI() const;
@ -15,5 +15,5 @@ public:
virtual const std::string& getIdentType() const; virtual const std::string& getIdentType() const;
}; };
#endif // AEDOMAIN_OBJECT_TYPE #endif // OTEDOMAIN_OBJECT_TYPE

View File

@ -1,8 +1,8 @@
#include "se/OteDomainTransferRegistrantCommand.hpp" #include "OTE/OteDomainTransferRegistrantCommand.hpp"
#include "se/XMLGregorianCalendar.hpp" #include "se/XMLGregorianCalendar.hpp"
#include "se/OteExtension.hpp" #include "OTE/OteExtension.hpp"
#include "se/OteDomainObjectType.hpp" #include "OTE/OteDomainObjectType.hpp"
#include "se/RegistrantTransferCommandType.hpp" #include "se/RegistrantTransferCommandType.hpp"
#include "se/CommandType.hpp" #include "se/CommandType.hpp"
#include "se/Period.hpp" #include "se/Period.hpp"
@ -13,13 +13,13 @@
#include "xml/XMLHelper.hpp" #include "xml/XMLHelper.hpp"
namespace { namespace {
*oteExtension() { Extension& oteExtension() {
*oteExt = new OteExtension(); static Extension* oteExt = new OteExtension();
*oteExt; return *oteExt;
} }
const RegistrantTransferCommandType rtrnType; const RegistrantTransferCommandType rtrnType;
*otedomType; OteDomainObjectType otedomType;
} // anonymous namespace } // anonymous namespace
OteDomainTransferRegistrantCommand::OteDomainTransferRegistrantCommand ( OteDomainTransferRegistrantCommand::OteDomainTransferRegistrantCommand (
@ -35,7 +35,7 @@ OteDomainTransferRegistrantCommand::OteDomainTransferRegistrantCommand (
const std::string* eligibilityID, const std::string* eligibilityID,
const std::string* eligibilityIDType, const std::string* eligibilityIDType,
const Period* period) : ProtocolExtensionCommand( const Period* period) : ProtocolExtensionCommand(
*oteExtension()) &rtrnType, &otedomType, name, oteExtension())
{ {
if ((registrantID && registrantIDType == NULL) if ((registrantID && registrantIDType == NULL)
|| (registrantIDType == NULL && registrantIDType) || (registrantIDType == NULL && registrantIDType)
@ -45,7 +45,7 @@ OteDomainTransferRegistrantCommand::OteDomainTransferRegistrantCommand (
// If provided, a registrantID must have a type. // If provided, a registrantID must have a type.
// If provided, an eligibilityName must have both an eligibilityID and type. // If provided, an eligibilityName must have both an eligibilityID and type.
throw IllegalArgException( throw IllegalArgException(
*ote.missing_arg")); ErrorPkg::getMessage("se.domain.registrantTransfer.ote.missing_arg"));
} }
DOMElement *element; DOMElement *element;
@ -57,32 +57,32 @@ OteDomainTransferRegistrantCommand::OteDomainTransferRegistrantCommand (
if (period) if (period)
period->appendPeriod(xmlWriter, objElement); period->appendPeriod(xmlWriter, objElement);
*oteProperties"); DOMElement *oteProperties = xmlWriter->appendChild(objElement, "oteProperties");
XMLHelper::setTextContent( XMLHelper::setTextContent(
*oteProperties, "registrantName"), registrantName); xmlWriter->appendChild(oteProperties, "registrantName"), registrantName);
if (registrantID) if (registrantID)
{ {
*oteProperties, "registrantID"); element = xmlWriter->appendChild(oteProperties, "registrantID");
XMLHelper::setTextContent(element, *registrantID); XMLHelper::setTextContent(element, *registrantID);
XMLHelper::setAttribute(element, "type", *registrantIDType); XMLHelper::setAttribute(element, "type", *registrantIDType);
} }
XMLHelper::setTextContent XMLHelper::setTextContent
*oteProperties, "eligibilityType"), eligibilityType); (xmlWriter->appendChild(oteProperties, "eligibilityType"), eligibilityType);
if (eligibilityName) if (eligibilityName)
{ {
XMLHelper::setTextContent( XMLHelper::setTextContent(
*oteProperties, "eligibilityName"), *eligibilityName); xmlWriter->appendChild(oteProperties, "eligibilityName"), *eligibilityName);
*oteProperties, "eligibilityID"); element = xmlWriter->appendChild(oteProperties, "eligibilityID");
XMLHelper::setTextContent(element, *eligibilityID); XMLHelper::setTextContent(element, *eligibilityID);
XMLHelper::setAttribute(element, "type", *eligibilityIDType); XMLHelper::setAttribute(element, "type", *eligibilityIDType);
} }
XMLHelper::setTextContent( XMLHelper::setTextContent(
*oteProperties, "policyReason"), xmlWriter->appendChild(oteProperties, "policyReason"),
policyReason); policyReason);
XMLHelper::setTextContent( XMLHelper::setTextContent(

View File

@ -1,5 +1,5 @@
#ifndef __AE_DOMAIN_TRANSFER_REGISTRANT_COMMAND_HPP #ifndef __OTE_DOMAIN_TRANSFER_REGISTRANT_COMMAND_HPP
#define __AE_DOMAIN_TRANSFER_REGISTRANT_COMMAND_HPP #define __OTE_DOMAIN_TRANSFER_REGISTRANT_COMMAND_HPP
#include "common/Deprecated.hpp" #include "common/Deprecated.hpp"
#include "se/ProtocolExtensionCommand.hpp" #include "se/ProtocolExtensionCommand.hpp"
@ -32,7 +32,7 @@ class Period;
* and * and
* {@link DomainRegistrantTransferCommand.addItem(std::string, std::string)} * {@link DomainRegistrantTransferCommand.addItem(std::string, std::string)}
*/ */
class AeDomainTransferRegistrantCommand : public ProtocolExtensionCommand class OteDomainTransferRegistrantCommand : public ProtocolExtensionCommand
{ {
public: public:
@ -70,7 +70,7 @@ public:
* @param explanation An explanation of how the transfer was effected. * @param explanation An explanation of how the transfer was effected.
*/ */
DEPRECATED( DEPRECATED(
AeDomainTransferRegistrantCommand (const std::string& name, OteDomainTransferRegistrantCommand (const std::string& name,
const XMLGregorianCalendar& curExpDate, const XMLGregorianCalendar& curExpDate,
const std::string& eligibilityType, const std::string& eligibilityType,
int policyReason, int policyReason,
@ -84,5 +84,5 @@ public:
const Period* period = NULL)); const Period* period = NULL));
}; };
#endif // __AE_DOMAIN_TRANSFER_REGISTRANT_COMMAND_HPP #endif // __OTE_DOMAIN_TRANSFER_REGISTRANT_COMMAND_HPP

View File

@ -1,23 +1,23 @@
#include "se/OteDomainTransferRegistrantResponse.hpp" #include "OTE/OteDomainTransferRegistrantResponse.hpp"
#include "se/OteDomainObjectType.hpp" #include "OTE/OteDomainObjectType.hpp"
#include "se/RegistrantTransferCommandType.hpp" #include "se/RegistrantTransferCommandType.hpp"
#include "se/EPPDateFormatter.hpp" #include "se/EPPDateFormatter.hpp"
namespace { namespace {
const RegistrantTransferCommandType rtrnType; const RegistrantTransferCommandType rtrnType;
*otedomType; OteDomainObjectType otedomType;
} // anonymous namespace } // anonymous namespace
using namespace std; using namespace std;
const string OteDomainTransferRegistrantResponse::OTEDOM_NAME_EXPR = const string OteDomainTransferRegistrantResponse::OTEDOM_NAME_EXPR =
*otedom:name/text()"; "/e:epp/e:response/e:resData/otedom:rtrnData/otedom:name/text()";
const string OteDomainTransferRegistrantResponse::OTEDOM_EX_DATE_EXPR = const string OteDomainTransferRegistrantResponse::OTEDOM_EX_DATE_EXPR =
*otedom:exDate/text()"; "/e:epp/e:response/e:resData/otedom:rtrnData/otedom:exDate/text()";
OteDomainTransferRegistrantResponse::OteDomainTransferRegistrantResponse() OteDomainTransferRegistrantResponse::OteDomainTransferRegistrantResponse()
*otedomType) : DataResponse(&rtrnType, &otedomType)
{ {
} }

View File

@ -1,5 +1,5 @@
#ifndef __AE_DOMAIN_TRANSFER_REGISTRANT_RESPONSE #ifndef __OTE_DOMAIN_TRANSFER_REGISTRANT_RESPONSE
#define __AE_DOMAIN_TRANSFER_REGISTRANT_RESPONSE #define __OTE_DOMAIN_TRANSFER_REGISTRANT_RESPONSE
#include "common/Deprecated.hpp" #include "common/Deprecated.hpp"
#include "se/DataResponse.hpp" #include "se/DataResponse.hpp"
@ -23,22 +23,22 @@
* and * and
* {@link DomainRegistrantTransferResponse}. * {@link DomainRegistrantTransferResponse}.
*/ */
class AeDomainTransferRegistrantResponse : public DataResponse class OteDomainTransferRegistrantResponse : public DataResponse
{ {
public: public:
DEPRECATED(AeDomainTransferRegistrantResponse()); DEPRECATED(OteDomainTransferRegistrantResponse());
const std::string& getName() { return name; } const std::string& getName() { return name; }
const XMLGregorianCalendar* getExpiryDate() { return exDate.get(); } const XMLGregorianCalendar* getExpiryDate() { return exDate.get(); }
void fromXML(XMLDocument* xmlDoc) throw (ParsingException); void fromXML(XMLDocument* xmlDoc) throw (ParsingException);
private: private:
static const std::string AEDOM_NAME_EXPR; static const std::string OTEDOM_NAME_EXPR;
static const std::string AEDOM_EX_DATE_EXPR; static const std::string OTEDOM_EX_DATE_EXPR;
std::string name; std::string name;
std::auto_ptr<XMLGregorianCalendar> exDate; std::auto_ptr<XMLGregorianCalendar> exDate;
}; };
#endif // __AE_DOMAIN_TRANSFER_REGISTRANT_RESPONSE #endif // __OTE_DOMAIN_TRANSFER_REGISTRANT_RESPONSE

View File

@ -1,14 +1,14 @@
#include "se/OteExtension.hpp" #include "OTE/OteExtension.hpp"
std::string& OteExtension::getURI() const std::string& OteExtension::getURI() const
{ {
*oteext-1.0"; static std::string uri = "urn:X-ote:params:xml:ns:oteext-1.0";
return uri; return uri;
} }
std::string& OteExtension::getSchemaLocation() const std::string& OteExtension::getSchemaLocation() const
{ {
*oteext-1.0.xsd"; static std::string loc = "urn:X-ote:params:xml:ns:oteext-1.0 oteext-1.0.xsd";
return loc; return loc;
} }

View File

@ -1,5 +1,5 @@
#ifndef __AEEXTENSION_HPP #ifndef __OTEEXTENSION_HPP
#define __AEEXTENSION_HPP #define __OTEEXTENSION_HPP
#include "se/Extension.hpp" #include "se/Extension.hpp"
@ -7,11 +7,11 @@
* A bundled set of constants representing the .ae EPP extension * A bundled set of constants representing the .ae EPP extension
* schema. The namespace URI uniquely identifies the extension. * schema. The namespace URI uniquely identifies the extension.
*/ */
class AeExtension : public Extension class OteExtension : public Extension
{ {
public: public:
virtual ~AeExtension(void) { } virtual ~OteExtension(void) { }
/** /**
* Get the globally unique namespace URI which identifies this extension. * Get the globally unique namespace URI which identifies this extension.
@ -25,5 +25,5 @@ public:
virtual std::string& getSchemaLocation() const; virtual std::string& getSchemaLocation() const;
}; };
#endif // __AEEXTENSION_HPP #endif // __OTEXTENSION_HPP

View File

@ -1,12 +1,12 @@
#include "se/OteLPECreateCommand.hpp" #include "OTE/OteLPECreateCommand.hpp"
#include "xml/XMLHelper.hpp" #include "xml/XMLHelper.hpp"
#include "se/OteExtension.hpp" #include "OTE/OteExtension.hpp"
#include "common/ErrorPkg.hpp" #include "common/ErrorPkg.hpp"
namespace { namespace {
*oteExtension() { Extension& oteExtension() {
*oteExtension = new OteExtension(); static Extension* oteExtension = new OteExtension();
*oteExtension; return *oteExtension;
} }
}; // anonymous namespace }; // anonymous namespace
@ -15,12 +15,12 @@ OteLPECreateCommand::OteLPECreateCommand (
const std::string& pw, const std::string& pw,
const std::string* registrantID, const std::string* registrantID,
const std::vector<std::string>* techContacts, const std::vector<std::string>* techContacts,
*oteEligibilityType, const std::string &oteEligibilityType,
*otePolicyReason, int otePolicyReason,
*oteRegistrantName) : LPECreateCommand ( const std::string &oteRegistrantName) : LPECreateCommand (
name, pw, registrantID, techContacts) name, pw, registrantID, techContacts)
{ {
*oteRegistrantName); setExtension (oteEligibilityType, otePolicyReason, oteRegistrantName);
} }
OteLPECreateCommand::OteLPECreateCommand ( OteLPECreateCommand::OteLPECreateCommand (
@ -32,20 +32,20 @@ OteLPECreateCommand::OteLPECreateCommand (
const std::vector<std::string>* billingContacts, const std::vector<std::string>* billingContacts,
const std::vector<std::string>* nameservers, const std::vector<std::string>* nameservers,
const Period* period, const Period* period,
*oteEligibilityType, const std::string &oteEligibilityType,
*otePolicyReason, int otePolicyReason,
*oteRegistrantName, const std::string &oteRegistrantName,
*oteRegistrantID, const std::string *oteRegistrantID,
*oteRegistrantIDType, const std::string *oteRegistrantIDType,
*oteEligibilityName, const std::string *oteEligibilityName,
*oteEligibilityID, const std::string *oteEligibilityID,
*oteEligibilityIDType) : LPECreateCommand ( const std::string *oteEligibilityIDType) : LPECreateCommand (
name, pw, registrantID, techContacts, nameservers, name, pw, registrantID, techContacts, nameservers,
adminContacts, billingContacts, period) adminContacts, billingContacts, period)
{ {
*otePolicyReason, setExtension (oteEligibilityType, otePolicyReason,
*oteRegistrantIDType, oteRegistrantName, oteRegistrantID, oteRegistrantIDType,
*oteEligibilityIDType); oteEligibilityName, oteEligibilityID, oteEligibilityIDType);
} }
void OteLPECreateCommand::setExtension (const std::string& eligibilityType, void OteLPECreateCommand::setExtension (const std::string& eligibilityType,
@ -83,50 +83,50 @@ void OteLPECreateCommand::setExtension (
|| (eligibilityID == NULL && eligibilityIDType)) || (eligibilityID == NULL && eligibilityIDType))
{ {
throw IllegalArgException(ErrorPkg::getMessage( throw IllegalArgException(ErrorPkg::getMessage(
*ote.missing_ar")); "se.domaincreate.ote.missing_ar"));
} }
*oteextCreate = xmlWriter->appendChild( DOMElement *oteextCreate = xmlWriter->appendChild(
xmlWriter->appendChild( xmlWriter->appendChild(
command, command,
"extension"), "extension"),
"create", "create",
*oteExtension().getURI()); oteExtension().getURI());
*oteextCreate, XMLHelper::setAttribute(oteextCreate,
"xsi:schemaLocation", "xsi:schemaLocation",
*oteExtension().getSchemaLocation()); oteExtension().getSchemaLocation());
*oteProperties = xmlWriter->appendChild( DOMElement* oteProperties = xmlWriter->appendChild(
*oteProperties"); oteextCreate, "oteProperties");
XMLHelper::setTextContent( XMLHelper::setTextContent(
*oteProperties, "registrantName"), xmlWriter->appendChild(oteProperties, "registrantName"),
registrantName); registrantName);
if (registrantID && registrantIDType) if (registrantID && registrantIDType)
*oteProperties, xmlWriter->appendChild (oteProperties,
"registrantID", *registrantID, "registrantID", *registrantID,
"type", *registrantIDType); "type", *registrantIDType);
XMLHelper::setTextContent( XMLHelper::setTextContent(
*oteProperties, "eligibilityType"), xmlWriter->appendChild(oteProperties, "eligibilityType"),
eligibilityType); eligibilityType);
if (eligibilityName) if (eligibilityName)
{ {
XMLHelper::setTextContent( XMLHelper::setTextContent(
*oteProperties, "eligibilityName"), xmlWriter->appendChild(oteProperties, "eligibilityName"),
*eligibilityName); *eligibilityName);
if (eligibilityID && eligibilityIDType) if (eligibilityID && eligibilityIDType)
*oteProperties, xmlWriter->appendChild(oteProperties,
"eligibilityID", *eligibilityID, "eligibilityID", *eligibilityID,
"type", *eligibilityIDType); "type", *eligibilityIDType);
} }
XMLHelper::setTextContent( XMLHelper::setTextContent(
*oteProperties, "policyReason"), xmlWriter->appendChild(oteProperties, "policyReason"),
policyReason); policyReason);
} }

View File

@ -1,14 +1,14 @@
#ifndef __AEDOMAINCREATECOMMAND_HPP #ifndef __OTEDOMAINCREATECOMMAND_HPP
#define __AEDOMAINCREATECOMMAND_HPP #define __OTEDOMAINCREATECOMMAND_HPP
#include "common/Deprecated.hpp" #include "common/Deprecated.hpp"
#include "se/DomainCreateCommand.hpp" #include "OTE/LPECreateCommand.hpp"
/** /**
* Extension of EPP urn:ietf:params:xml:ns:domain-1.0 create command specified * Extension of EPP urn:ietf:params:xml:ns:domain-1.0 create command specified
* in RFC3731 to urn:X-ae:params:xml:ns:aeext-1.0. .ae domains must be * in RFC3731 to urn:X-ote:params:xml:ns:oteext-1.0. .ote domains must be
* provisioned using this class rather than {@link DomainCreateCommand}, as the * provisioned using this class rather than {@link DomainCreateCommand}, as the
* ae extension data is mandatory. * ote extension data is mandatory.
* Use this class to generate a standards-compliant XML document, given simple * Use this class to generate a standards-compliant XML document, given simple
* input parameters. The toXML method in Command serialises this object to * input parameters. The toXML method in Command serialises this object to
* XML. * XML.
@ -27,27 +27,27 @@
* and * and
* {@link DomainKVCommandExtension}. * {@link DomainKVCommandExtension}.
*/ */
class AeDomainCreateCommand : public DomainCreateCommand class OteLPECreateCommand : public LPECreateCommand
{ {
public: public:
/** /**
* Minimal constructor for creating a domain:create + aeext:create * Minimal constructor for creating a domain:create + oteext:create
* EPP command. These parameters are the least required for a valid * EPP command. These parameters are the least required for a valid
* .ae domain create command. * .ote domain create command.
*/ */
DEPRECATED( DEPRECATED(
AeDomainCreateCommand (const std::string& name, OteLPECreateCommand (const std::string& name,
const std::string& pw, const std::string& pw,
const std::string* registrantID, const std::string* registrantID,
const std::vector<std::string>* techContacts, const std::vector<std::string>* techContacts,
const std::string &aeEligibilityType, const std::string &oteEligibilityType,
int aePolicyReason, int otePolicyReason,
const std::string& aeRegistrantName)); const std::string& oteRegistrantName));
/** /**
* Full data specification constructor for a domain:create + aeext:create * Full data specification constructor for a domain:create + oteext:create
* EPP command. Please refer to the urn:X-ae:params:xml:ns:aeext-1.0 schema * EPP command. Please refer to the urn:X-ote:params:xml:ns:oteext-1.0 schema
* for specification of the required fields. * for specification of the required fields.
* The mapping of parameter names to ae extension fields is given in the * The mapping of parameter names to ote extension fields is given in the
* parameter documentation. * parameter documentation.
* *
* @param name The name of the new domain. * @param name The name of the new domain.
@ -80,24 +80,24 @@ public:
* server may define a default initial registration period if not specified * server may define a default initial registration period if not specified
* by the client. * by the client.
* *
* @param aeEligibilityType aeext:eligType. * @param oteEligibilityType oteext:eligType.
* *
* @param aePolicyReason aeext:policyReason. * @param otePolicyReason oteext:policyReason.
* *
* @param aeRegistrantName aeext:registrantName. * @param oteRegistrantName oteext:registrantName.
* *
* @param aeRegistrantID aeext:registrantID. * @param oteRegistrantID oteext:registrantID.
* *
* @param aeRegistrantIDType aeext:registrantID type attribute. * @param oteRegistrantIDType oteext:registrantID type attribute.
* *
* @param aeEligibilityName aeext:eligibilityName. * @param oteEligibilityName oteext:eligibilityName.
* *
* @param aeEligibilityID aeext:eligibilityID. * @param oteEligibilityID oteext:eligibilityID.
* *
* @param aeEligibilityIDType aeext:eligibilityID type attribute. * @param oteEligibilityIDType oteext:eligibilityID type attribute.
*/ */
DEPRECATED( DEPRECATED(
AeDomainCreateCommand (const std::string& name, OteLPECreateCommand (const std::string& name,
const std::string& pw, const std::string& pw,
const std::string* registrantID, const std::string* registrantID,
const std::vector<std::string>* techContacts, const std::vector<std::string>* techContacts,
@ -105,14 +105,14 @@ public:
const std::vector<std::string>* billingContacts, const std::vector<std::string>* billingContacts,
const std::vector<std::string>* nameservers, const std::vector<std::string>* nameservers,
const Period *period, const Period *period,
const std::string &aeEligibilityType, const std::string &oteEligibilityType,
int aePolicyReason, int otePolicyReason,
const std::string& aeRegistrantName, const std::string& oteRegistrantName,
const std::string* aeRegistrantID, const std::string* oteRegistrantID,
const std::string* aeRegistrantIDType, const std::string* oteRegistrantIDType,
const std::string* aeEligibilityName, const std::string* oteEligibilityName,
const std::string* aeEligibilityID, const std::string* oteEligibilityID,
const std::string* aeEligibilityIDType)); const std::string* oteEligibilityIDType));
private: private:
void setExtension (const std::string& eligibilityType, void setExtension (const std::string& eligibilityType,
int PolicyReason, int PolicyReason,
@ -126,7 +126,7 @@ private:
/** /**
* &lt;extension&gt; * &lt;extension&gt;
* &nbsp;&lt;create xmlns="urn:X-ae:params:xml:ns:aeext-1.0"&gt; * &nbsp;&lt;create xmlns="urn:X-ote:params:xml:ns:oteext-1.0"&gt;
* &nbsp;&nbsp;&lt;registrantName&gt;registrantName&lt;/registrantName&gt; * &nbsp;&nbsp;&lt;registrantName&gt;registrantName&lt;/registrantName&gt;
* &nbsp;&nbsp;&lt;registrantID type="registrantIDType"&gt;registrantID&lt;/registrantID&gt; * &nbsp;&nbsp;&lt;registrantID type="registrantIDType"&gt;registrantID&lt;/registrantID&gt;
* &nbsp;&nbsp;&lt;eligibilityType&gt;eligibilityType&lt;/eligibilityType&gt; * &nbsp;&nbsp;&lt;eligibilityType&gt;eligibilityType&lt;/eligibilityType&gt;
@ -147,4 +147,4 @@ private:
}; };
#endif // __AEDOMAINCREATECOMMAND_HPP #endif // __OTEDOMAINCREATECOMMAND_HPP

View File

@ -1,5 +1,5 @@
#include "se/ContactCheckCommand.hpp" #include "se/ContactCheckCommand.hpp"
#include "se/OteLPECreateCommand.hpp" #include "OTE/OteLPECreateCommand.hpp"
#include "se/CLTRID.hpp" #include "se/CLTRID.hpp"
#include "session/Timer.hpp" #include "session/Timer.hpp"
#include "common/init.hpp" #include "common/init.hpp"