diff --git a/.cproject b/.cproject index 3e2d645..19a8888 100644 --- a/.cproject +++ b/.cproject @@ -55,31 +55,8 @@ - - make - clean - true - true - true - - - make - all - true - true - true - - - make - - tests - true - true - true - make - libACTK1_0.so true true @@ -87,6 +64,7 @@ make + clean true true @@ -94,7 +72,6 @@ make - tests true true @@ -102,7 +79,6 @@ make - dirs true true @@ -110,7 +86,6 @@ make - dclean true true @@ -118,6 +93,7 @@ make + all false true @@ -126,13 +102,37 @@ make - build/LPCommands.o + build/LPCheck.o true true false + + make + + clean + true + true + true + + + make + + all + true + true + true + + + make + tests + true + true + true + make + clean true true @@ -140,7 +140,6 @@ make - dirs true true @@ -148,7 +147,6 @@ make - apig-cli true true @@ -156,6 +154,7 @@ make + build/commander.o true true @@ -163,6 +162,7 @@ make + build/ausreg-cd true true @@ -170,6 +170,7 @@ make + cliever true true @@ -177,45 +178,14 @@ make + all true true true - - make - cliever - true - true - true - - - make - - clean - false - true - true - - - make - - distclean - true - true - true - - - make - - build/ausreg-md - true - true - true - make - all true true @@ -223,7 +193,6 @@ make - tests true true @@ -231,12 +200,40 @@ make - clean true true true + + make + + cliever + true + true + true + + + make + clean + false + true + true + + + make + distclean + true + true + true + + + make + build/ausreg-md + true + true + true + diff --git a/ACTK1_0/Makefile b/ACTK1_0/Makefile index 6e736f6..0a6f6a3 100644 --- a/ACTK1_0/Makefile +++ b/ACTK1_0/Makefile @@ -115,7 +115,8 @@ $(BUILD_OBJ_DIR)/%: $(BUILD_OBJ_DIR)/%.o # # The toolkit raises the c++ "static initialization fiasco" situation. Use this as needed # -ARTKOBJS= build/XMLGregorianCalendar.o build/XMLParser.o build/XMLWriter.o build/ACSession.o build/DomainAddRem.o build/EnumDomainInfoResponse.o build/log.o build/PostalInfoType.o build/SessionManagerPropertiesImpl.o \ +ARTKOBJS=build/XMLGregorianCalendar.o build/XMLParser.o build/XMLWriter.o build/ACSession.o build/DomainAddRem.o \ +build/EnumDomainInfoResponse.o build/log.o build/PostalInfoType.o build/SessionManagerPropertiesImpl.o \ build/RegistrantObjectType.o \ build/AddRemType.o build/DomainCheckResponse.o build/EnumDomainUpdateCommand.o build/Properties.o build/SessionPoolImpl.o \ build/boolean.o build/DomainCreateCommand.o build/EnumType.o build/ProtocolExtensionCommand.o build/SSLException.o \ @@ -124,10 +125,10 @@ build/CheckResponse.o build/DomainInfoKVResponseExtension.o build/CLTRID.o build/DomainInfoResponse.o build/ErrorPkg.o build/NAPTR.o build/RegistrantTransferCommandType.o build/StringUtils.o \ build/CommandCounter.o build/DomainKVCommandExtension.o build/Greeting.o build/NotificationResponse.o build/ResponseExtension.o build/SyncExtension.o \ build/Command.o build/DomainNotificationResponse.o build/HostAddRem.o build/ObjectCommand.o build/Response.o build/SystemProperties.o \ -build/config.o build/DomainRegistrantTransferCommand.o build/HostCheckResponse.o build/LPRespExtender.o build/ResultCounter.o build/Timer.o \ -build/Constants.o build/DomainRegistrantTransferResponse.o build/HostCreateCommand.o build/LPCmdExtender.o build/Result.o build/TLSContext.o \ +build/config.o build/DomainRegistrantTransferCommand.o build/HostCheckResponse.o build/ResultCounter.o build/Timer.o \ +build/Constants.o build/DomainRegistrantTransferResponse.o build/HostCreateCommand.o build/LPCheck.o build/Result.o build/TLSContext.o \ build/ContactCheckResponse.o build/DomainRenewCommand.o build/HostCreateResponse.o build/LPLaunch.o build/SecDNSChgType.o build/TLSSession.o \ -build/ContactCreateCommand.o build/DomainRenewResponse.o build/HostInfoResponse.o build/LPExtension.o build/SecDNSDSData.o build/TLSSocket.o \ +build/ContactCreateCommand.o build/DomainRenewResponse.o build/HostInfoResponse.o build/LPCreate.o build/SecDNSDSData.o build/TLSSocket.o \ build/ContactCreateResponse.o build/DomainSecDNSCreateCommandExtension.o build/HostUpdateCommand.o build/SecDNSDSOrKeyType.o build/TransferCommand.o \ build/ContactInfoResponse.o build/DomainSecDNSInfoResponseExtension.o build/InetAddress.o build/SecDNSExtension.o build/TransferOp.o \ build/ContactNotificationResponse.o build/DomainSecDNSUpdateCommandExtension.o build/InfoResponse.o build/SecDNSKeyData.o build/TransferResponse.o \ diff --git a/ACTK1_0/se/LPE/LPCheck.cpp b/ACTK1_0/se/LPE/LPCheck.cpp new file mode 100644 index 0000000..8ba2fc1 --- /dev/null +++ b/ACTK1_0/se/LPE/LPCheck.cpp @@ -0,0 +1,20 @@ +#include "LPCheck.hpp" +#include "xml/XMLHelper.hpp" + + + namespace { + Extension& launchPhaseExtension() { + static Extension* lpExtension = new LPLaunch(); + return *lpExtension; + } + }; // anonymous namespace + +void LPCheck::setExtension () +{ + + DOMElement *lpeCreate = + xmlWriter->appendChild( xmlWriter->appendChild( command, "extension"), + "check", launchPhaseExtension().getURI()); + + +} diff --git a/ACTK1_0/se/LPE/LPCheck.hpp b/ACTK1_0/se/LPE/LPCheck.hpp new file mode 100644 index 0000000..56ee599 --- /dev/null +++ b/ACTK1_0/se/LPE/LPCheck.hpp @@ -0,0 +1,33 @@ +#ifndef _LPE_CHK_EXTENSION_HPP_ +#define _LPE_CHK_EXTENSION_HPP_ + +#include "se/DomainCheckCommand.hpp" +#include "LPLaunch.hpp" + + class LPCheck : public DomainCheckCommand +{ + private: + + LPLaunch *draft_tan_epp_launchphase_12; + void setExtension (); + + public: + /** + * Check the availability of the single identified domain. + * + * @param name The name of the domain to check the availability of. + */ + LPCheck (const std::string &name ) + : DomainCheckCommand (name) { setExtension(); } + + /** + * Check the availability of at least one domain. + * + * @param names The names of the domains to check the availability of. + */ + LPCheck (std::vector &names ) + : DomainCheckCommand ( names ) {} + + }; + +#endif /* _LPE_COMMAND_EXTENSION_HPP_ */ diff --git a/ACTK1_0/se/LPE/LPCmdExtender.cpp b/ACTK1_0/se/LPE/LPCmdExtender.cpp deleted file mode 100644 index 7d5f36f..0000000 --- a/ACTK1_0/se/LPE/LPCmdExtender.cpp +++ /dev/null @@ -1,28 +0,0 @@ -#include "se/Command.hpp" -#include "se/CommandType.hpp" -#include "LPExtension.hpp" -#include "xml/XMLHelper.hpp" -#include "LPCmdExtender.hpp" - - namespace { - LPExtension& launchPhaseExtension() { - static LPExtension* lpExtension = new LPExtension(); - return *lpExtension; - } - }; // anonymous namespace - - -void LPCmdExtender::addToCommand(const Command &command) const -{ - XMLWriter* xmlWriter = command.getXmlWriter(); - DOMElement* extensionElement = command.getExtensionElement(); - DOMElement* createElement; - - createElement = xmlWriter->appendChild(extensionElement, - t->getCommandName().c_str(), launchPhaseExtension().getURI()); - - if (createData.get() != NULL) - { - createData->createXMLElement(xmlWriter, createElement); - } -} diff --git a/ACTK1_0/se/LPE/LPCmdExtender.hpp b/ACTK1_0/se/LPE/LPCmdExtender.hpp deleted file mode 100644 index 9477f1c..0000000 --- a/ACTK1_0/se/LPE/LPCmdExtender.hpp +++ /dev/null @@ -1,30 +0,0 @@ -#ifndef _LPE_COMMAND_EXTENSION_HPP_ -#define _LPE_COMMAND_EXTENSION_HPP_ - -#include "se/Command.hpp" -#include "se/CommandExtension.hpp" -#include "LPLaunch.hpp" - - -class LPCmdExtender : public CommandExtension -{ - public: - virtual void addToCommand(const Command &command) const; - - void setCreateData(LPLaunch* createData); - void createXMLElement(XMLWriter* xmlWriter, DOMElement* addElement); - - LPCmdExtender(Command x) : t(x.getCommandType()) {} - - private: - - const CommandType *t; - std::auto_ptr createData; -}; - -inline void LPCmdExtender::setCreateData(LPLaunch* createData) -{ - this->createData.reset(createData); -} - -#endif /* _LPE_COMMAND_EXTENSION_HPP_ */ diff --git a/ACTK1_0/se/LPE/LPExtension.cpp b/ACTK1_0/se/LPE/LPExtension.cpp deleted file mode 100644 index 5adcde7..0000000 --- a/ACTK1_0/se/LPE/LPExtension.cpp +++ /dev/null @@ -1,14 +0,0 @@ -#include "se/LPE/LPExtension.hpp" - -std::string& LPExtension::getURI() const -{ - static std::string uri = "urn:ietf:params:xml:ns:launch-1.0"; - return uri; -} - -std::string& LPExtension::getSchemaLocation() const -{ - static std::string loc = "urn:ietf:params:xml:ns:launch-1.0 launch-1.0.xsd"; - return loc; -} - diff --git a/ACTK1_0/se/LPE/LPExtension.hpp b/ACTK1_0/se/LPE/LPExtension.hpp deleted file mode 100644 index bb6a443..0000000 --- a/ACTK1_0/se/LPE/LPExtension.hpp +++ /dev/null @@ -1,29 +0,0 @@ -#ifndef __LPEXTENSION_HPP -#define __LPEXTENSION_HPP - -#include "se/Extension.hpp" - -/** - * A bundled set of constants representing the .ae EPP extension - * schema. The namespace URI uniquely identifies the extension. - */ -class LPExtension : public Extension -{ -public: - - virtual ~LPExtension(void) { } - - /** - * Get the globally unique namespace URI which identifies this extension. - */ - virtual std::string& getURI() const; - - /** - * Get the location hint for the XML schema used to validate EPP service - * element instances using this extension. - */ - virtual std::string& getSchemaLocation() const; -}; - -#endif // __LPEXTENSION_HPP - diff --git a/ACTK1_0/se/LPE/LPLaunch.cpp b/ACTK1_0/se/LPE/LPLaunch.cpp index f37fe8a..d171a19 100644 --- a/ACTK1_0/se/LPE/LPLaunch.cpp +++ b/ACTK1_0/se/LPE/LPLaunch.cpp @@ -14,3 +14,14 @@ void LPLaunch::createXMLElement(XMLWriter* xmlWriter, DOMElement* addElement) } +std::string& LPLaunch::getURI() const +{ + static std::string uri = "urn:ietf:params:xml:ns:launch-1.0"; + return uri; +} + +std::string& LPLaunch::getSchemaLocation() const +{ + static std::string loc = "urn:ietf:params:xml:ns:launch-1.0 launch-1.0.xsd"; + return loc; +} diff --git a/ACTK1_0/se/LPE/LPLaunch.hpp b/ACTK1_0/se/LPE/LPLaunch.hpp index b2bb087..8ab121c 100644 --- a/ACTK1_0/se/LPE/LPLaunch.hpp +++ b/ACTK1_0/se/LPE/LPLaunch.hpp @@ -5,10 +5,11 @@ #include "xercesc/dom/DOMElement.hpp" #include "xml/XMLWriter.hpp" +#include "se/Extension.hpp" using namespace std; -class LPLaunch +class LPLaunch : public Extension { public: LPLaunch() : @@ -23,6 +24,10 @@ class LPLaunch void appendData(XMLWriter* xmlWriter, DOMElement* addElement); void createXMLElement(XMLWriter* xmlWriter, DOMElement* addElement); + + std::string& getURI() const; + std::string& getSchemaLocation() const; + private: string phase; string status; diff --git a/ACTK1_0/se/SendSE.cpp b/ACTK1_0/se/SendSE.cpp index adeafc4..e8817fc 100644 --- a/ACTK1_0/se/SendSE.cpp +++ b/ACTK1_0/se/SendSE.cpp @@ -49,5 +49,5 @@ SendSE::~SendSE() void SendSE::init () { - userLogger = Logger::getLogger("com.ausregistry.cpptoolkit.se.user"); + userLogger = Logger::getLogger("biz.meansofproduction.dnseppus.se.user"); } diff --git a/AusRegCliever/server/mdAusReg.cpp b/AusRegCliever/server/mdAusReg.cpp index 0152b99..8240006 100644 --- a/AusRegCliever/server/mdAusReg.cpp +++ b/AusRegCliever/server/mdAusReg.cpp @@ -8,7 +8,8 @@ #include "session/StatsManager.hpp" #include "se/DomainCheckCommand.hpp" #include "se/DomainCheckResponse.hpp" -#include "se/LPE/LPCmdExtender.hpp" +#include "se/LPE/LPCheck.hpp" +#include "se/LPE/LPCreate.hpp" #include "se/TransferOp.hpp" #include "se/IntPostalInfo.hpp" #include "se/ContactCreateCommand.hpp" @@ -109,6 +110,7 @@ void ausRegEPPTK::doOTEB() string op("newInstance"); Transaction thisTest; + LPLaunch *lpExts; scenario(thisConfig->tkScenario,thisConfig->cfg_path); @@ -183,10 +185,7 @@ void ausRegEPPTK::doOTEB() theseLogs->logN(1,"(%d) LPE Check of unicycles.bike",cmd++); - DomainCheckCommand oteCommand_2("unicycles.bike"); - LPCmdExtender oteCX(oteCommand_2); - oteCommand_2.appendExtension(oteCX); - + LPCheck oteCommand_2("unicycles.bike"); DomainCheckResponse oteResponse_2; try { @@ -288,9 +287,7 @@ void ausRegEPPTK::doOTEB() theseLogs->logN(1,"(%d) Sunrise create %s with ICANN SMD test files.",cmd++,name5); - DomainCreateCommand oteCommand_5(name5,pw,&RID, &tech, &ns, &admin, &billing); - LPCmdExtender oteC5X(oteCommand_5); - oteC5X.addToCommand(oteCommand_5); + LPCreate oteCommand_5(name5,pw,&RID, &tech, &ns, &admin, &billing); DomainCreateResponse oteResponse_5; thisTest = Transaction(&oteCommand_5, &oteResponse_5); @@ -298,9 +295,7 @@ void ausRegEPPTK::doOTEB() theseLogs->logN(1,"(%d) Create test-validate.claimsgasix (TCN).",cmd++); - DomainCreateCommand oteCommand_6("test-validate.claimsgasix",pw,&RID, &tech, &ns, &admin, &billing); - LPCmdExtender oteC6X(oteCommand_6); - oteC6X.addToCommand(oteCommand_6); + LPCreate oteCommand_6("test-validate.claimsgasix",pw,&RID, &tech, &ns, &admin, &billing); DomainCreateResponse oteResponse_6; thisTest = Transaction(&oteCommand_6, &oteResponse_6);