00001
00002
00003
00004
00005
00006
00007
00008
00009
00010 #ifndef SEMAINE_CMS_SENDER_XMLSENDER_H
00011 #define SEMAINE_CMS_SENDER_XMLSENDER_H
00012
00013 #include <semaine/config.h>
00014
00015 #include <cms/CMSException.h>
00016
00017 #include <semaine/cms/event.h>
00018
00019 #include <semaine/cms/sender/Sender.h>
00020 #include <semaine/cms/exceptions/SystemConfigurationException.h>
00021
00022 #include <semaine/util/XMLTool.h>
00023
00024
00025 using namespace cms;
00026 using namespace semaine::cms::sender;
00027 using namespace semaine::cms::exceptions;
00028
00029 namespace semaine {
00030 namespace cms {
00031 namespace sender {
00032
00033 class XMLSender : public Sender
00034 {
00035 public:
00050 XMLSender(const std::string & topicName, const std::string & datatype, const std::string & source)
00051 throw(CMSException, SystemConfigurationException);
00052
00063 XMLSender(const std::string & cmsUrl, const std::string & cmsUser, const std::string & cmsPassword, const std::string & topicName, const std::string & datatype, const std::string & source)
00064 throw (CMSException, SystemConfigurationException);
00065
00066 virtual ~XMLSender();
00067
00096 void sendXML(const XERCES_CPP_NAMESPACE::DOMDocument * document, long long usertime, const std::string & event = SEMAINE_CMS_EVENT_SINGLE, const std::string & contentID = "",
00097 long long contentCreationTime = -1, const std::string & contentType = "")
00098 throw(CMSException, SystemConfigurationException);
00099
00100
00101
00102
00103 protected:
00104 virtual void fillMessageProperties(Message * message, long long usertime)
00105 throw(CMSException);
00106
00107 };
00108
00109 }
00110 }
00111 }
00112
00113
00114
00115 #endif
00116