This commit is contained in:
Ren RenJuan 2014-01-23 04:05:35 +00:00
parent 1010fce447
commit 72963b74a6
3 changed files with 16 additions and 5 deletions

View File

@ -1,4 +1,5 @@
#include "se/Command.hpp" #include "se/Command.hpp"
#include "se/CommandType.hpp"
#include "LPExtension.hpp" #include "LPExtension.hpp"
#include "xml/XMLHelper.hpp" #include "xml/XMLHelper.hpp"
#include "LPCmdExtender.hpp" #include "LPCmdExtender.hpp"
@ -15,7 +16,11 @@ void LPCmdExtender::addToCommand(const Command &command) const
{ {
XMLWriter* xmlWriter = command.getXmlWriter(); XMLWriter* xmlWriter = command.getXmlWriter();
DOMElement* extensionElement = command.getExtensionElement(); DOMElement* extensionElement = command.getExtensionElement();
DOMElement* createElement = xmlWriter->appendChild(extensionElement, DOMElement* createElement;
thisCommand = command.getCommandType()->getCommandName();
createElement = xmlWriter->appendChild(extensionElement,
"create", launchPhaseExtension().getURI()); "create", launchPhaseExtension().getURI());
if (createData.get() != NULL) if (createData.get() != NULL)

View File

@ -1,18 +1,22 @@
#ifndef _LPE_COMMAND_EXTENSION_HPP_ #ifndef _LPE_COMMAND_EXTENSION_HPP_
#define _LPE_COMMAND_EXTENSION_HPP_ #define _LPE_COMMAND_EXTENSION_HPP_
#include "se/Command.hpp"
#include "se/CommandExtension.hpp" #include "se/CommandExtension.hpp"
#include "LPLaunch.hpp" #include "LPLaunch.hpp"
class LPCmdExtender : public CommandExtension class LPCmdExtender : public CommandExtension
{ {
public: public:
virtual void addToCommand(const Command &command) const; virtual void addToCommand(const Command &command) const;
void setCreateData(LPLaunch* createData); void setCreateData(LPLaunch* createData);
void createXMLElement(XMLWriter* xmlWriter, DOMElement* addElement); void createXMLElement(XMLWriter* xmlWriter, DOMElement* addElement);
private: private:
std::string &thisCommand;
std::auto_ptr<LPLaunch> createData; std::auto_ptr<LPLaunch> createData;
}; };

View File

@ -167,7 +167,7 @@ void ausRegEPPTK::doOTEB()
theseLogs->logN(1,"Continue OTE Transactions."); theseLogs->logN(1,"Continue OTE Transactions.");
sleep(2); sleep(2);
theseLogs->logN(1,"(%d) Conventional check of yoda.guru",cmd++); theseLogs->logN(1,"(%d) Non-LPE check of yoda.guru",cmd++);
DomainCheckCommand oteCommand_1(name2); DomainCheckCommand oteCommand_1(name2);
DomainCheckResponse oteResponse_1; DomainCheckResponse oteResponse_1;
@ -184,7 +184,8 @@ void ausRegEPPTK::doOTEB()
theseLogs->logN(1,"(%d) LPE Check of unicycles.bike",cmd++); theseLogs->logN(1,"(%d) LPE Check of unicycles.bike",cmd++);
DomainCheckCommand oteCommand_2("unicycles.bike"); DomainCheckCommand oteCommand_2("unicycles.bike");
LPCmdExtender oteCX; oteCX.addToCommand(oteCommand_2); LPCmdExtender oteCX;
oteCommand_2.appendExtension(oteCX);
DomainCheckResponse oteResponse_2; DomainCheckResponse oteResponse_2;
@ -297,7 +298,8 @@ void ausRegEPPTK::doOTEB()
theseLogs->logN(1,"(%d) Create test-validate.claimsgasix (TCN).",cmd++); theseLogs->logN(1,"(%d) Create test-validate.claimsgasix (TCN).",cmd++);
DomainCreateCommand oteCommand_6("test-validate.claimsgasix",pw,&RID, &tech, &ns, &admin, &billing); DomainCreateCommand oteCommand_6("test-validate.claimsgasix",pw,&RID, &tech, &ns, &admin, &billing);
LPCmdExtender oteC6X; oteC6X.addToCommand(oteCommand_6); LPCmdExtender oteC6X;
oteCommand_6.appendExtension(oteC6X);
DomainCreateResponse oteResponse_6; DomainCreateResponse oteResponse_6;
thisTest = Transaction(&oteCommand_6, &oteResponse_6); thisTest = Transaction(&oteCommand_6, &oteResponse_6);