2014-01-06 19:19:17 +00:00
|
|
|
#include "se/ArDomainPolicyDeleteCommand.hpp"
|
|
|
|
#include "se/ArExtension.hpp"
|
|
|
|
#include "se/ArDomainObjectType.hpp"
|
|
|
|
#include "se/CommandType.hpp"
|
|
|
|
#include "se/Extension.hpp"
|
|
|
|
#include "xml/XMLHelper.hpp"
|
|
|
|
|
|
|
|
#include <string>
|
|
|
|
|
|
|
|
namespace {
|
|
|
|
class ArDomainPolicyDeleteCommandType : public CommandType
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
ArDomainPolicyDeleteCommandType() : CommandType(getCommandName()) { }
|
|
|
|
std::string getCommandName() const { return "policyDelete"; }
|
|
|
|
std::string toString() const { return "policyDelete"; }
|
|
|
|
};
|
|
|
|
|
|
|
|
Extension& arExtension() {
|
|
|
|
static Extension* arExt = new ArExtension();
|
|
|
|
return *arExt;
|
|
|
|
}
|
|
|
|
|
|
|
|
const ArDomainPolicyDeleteCommandType polDeleteCmdType;
|
2014-01-14 21:43:59 +00:00
|
|
|
ArDomainObjectType ardomType;
|
2014-01-06 19:19:17 +00:00
|
|
|
}; // anonymous namespace
|
|
|
|
|
|
|
|
ArDomainPolicyDeleteCommand::ArDomainPolicyDeleteCommand (
|
|
|
|
const std::string &name, const std::string &reason) : ProtocolExtensionCommand(
|
|
|
|
&polDeleteCmdType, &ardomType, name, arExtension())
|
|
|
|
{
|
|
|
|
XMLHelper::setTextContent(
|
|
|
|
xmlWriter->appendChild(objElement, "reason"), reason);
|
|
|
|
}
|
|
|
|
|