This commit is contained in:
Ren RenJuan 2014-01-24 16:38:51 +00:00
parent 231ae962bd
commit f39150ac7e
7 changed files with 29 additions and 26 deletions

View File

@ -117,7 +117,7 @@ $(BUILD_OBJ_DIR)/%: $(BUILD_OBJ_DIR)/%.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/RegistrantObjectType.o build/LPExtension.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 \
build/CertificateUserMismatchException.o build/DomainCreateResponse.o build/EPPDateFormatter.o build/ReceiveSE.o build/StandardCommandType.o \

View File

@ -4,17 +4,28 @@
namespace {
Extension& launchPhaseExtension() {
static Extension* lpExtension = new LPLaunch();
static Extension* lpExtension = new LPExtension();
return *lpExtension;
}
}; // anonymous namespace
void LPCheck::setExtension ()
{
DOMElement *lpeCreate =
xmlWriter->appendChild( xmlWriter->appendChild( command, "extension"),
"check", launchPhaseExtension().getURI());
"launch:check", launchPhaseExtension().getURI());
}
void LPCheck::addToCommand(const Command &command) const
{
XMLWriter* xmlWriter = command.getXmlWriter();
DOMElement* extensionElement = command.getExtensionElement();
DOMElement* createElement = xmlWriter->appendChild(extensionElement,
"lauch:claims", launchPhaseExtension().getURI());
if (createData.get() != NULL)
{
createData->createXMLElement(xmlWriter, createElement);
}
}

View File

@ -11,6 +11,8 @@
LPLaunch *draft_tan_epp_launchphase_12;
void setExtension ();
std::auto_ptr<LPLaunch> createData;
public:
/**
* Check the availability of the single identified domain.
@ -26,7 +28,9 @@
* @param names The names of the domains to check the availability of.
*/
LPCheck (std::vector<std::string> &names )
: DomainCheckCommand ( names ) {}
: DomainCheckCommand ( names ) { setExtension();}
virtual void addToCommand(const Command &command) const;
};

View File

@ -3,9 +3,8 @@
void LPLaunch::appendData(XMLWriter* xmlWriter, DOMElement* addElement)
{
DOMElement* lpDataElement = xmlWriter->appendChild(addElement, "launch");
XMLHelper::setTextContent(xmlWriter->appendChild(lpDataElement, "phase"), phase);
XMLHelper::setTextContent(xmlWriter->appendChild(lpDataElement, "status"), status);
DOMElement* lpDataElement = xmlWriter->appendChild(addElement, "claims");
XMLHelper::setTextContent(xmlWriter->appendChild(lpDataElement, "claims"), claims);
}
@ -14,14 +13,3 @@ 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;
}

View File

@ -5,7 +5,7 @@
#include "xercesc/dom/DOMElement.hpp"
#include "xml/XMLWriter.hpp"
#include "se/Extension.hpp"
#include "se/LPE/LPExtension.hpp"
using namespace std;
@ -13,8 +13,9 @@ class LPLaunch : public Extension
{
public:
LPLaunch() :
phase(""),
status(")")
claims("claims"),
phase("sunrise"),
status("available")
{}
virtual ~LPLaunch() {}
@ -25,10 +26,9 @@ class LPLaunch : public Extension
void appendData(XMLWriter* xmlWriter, DOMElement* addElement);
void createXMLElement(XMLWriter* xmlWriter, DOMElement* addElement);
std::string& getURI() const;
std::string& getSchemaLocation() const;
private:
string claims;
string phase;
string status;
};

View File

@ -7,7 +7,7 @@ using namespace std;
void LPRespExtender::fromXML(XMLDocument *xmlDoc)
{
infData.reset(new LPLaunch);
// infData.reset(new LPExtension);
// if (xmlDoc->getNodeCount("count(" + MAXSIGLIFE_EXPR() + ")") > 0)
// {