Skip to content

Commit 42896cd

Browse files
committed
Add widgets endpoint (WIP)
Add Bruno collection to test end-points
1 parent beefd2c commit 42896cd

99 files changed

Lines changed: 32026 additions & 1464 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

sources/server/web/rest/service/Keyword.h

Lines changed: 48 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -4,52 +4,54 @@
44
#include "communication/ISendMessageAsync.h"
55
#include "pluginSystem/Manager.h"
66

7-
namespace web
7+
namespace web::rest::service
88
{
9-
namespace rest
9+
class CKeyword final : public IRestService
1010
{
11-
namespace service
11+
public:
12+
explicit CKeyword(boost::shared_ptr<database::IDataProvider> dataProvider,
13+
boost::shared_ptr<dataAccessLayer::IKeywordManager> keywordManager,
14+
communication::ISendMessageAsync& messageSender);
15+
16+
CKeyword(const CKeyword&) = delete;
17+
CKeyword(CKeyword&&) = delete;
18+
CKeyword& operator=(const CKeyword&) = delete;
19+
CKeyword& operator=(CKeyword&&) = delete;
20+
~CKeyword() override = default;
21+
22+
// IRestService implementation
23+
void configurePocoDispatcher(poco::CRestDispatcher& dispatcher) override
1224
{
13-
class CKeyword final : public IRestService
14-
{
15-
public:
16-
CKeyword(boost::shared_ptr<database::IDataProvider> dataProvider,
17-
boost::shared_ptr<dataAccessLayer::IKeywordManager> keywordManager,
18-
communication::ISendMessageAsync& messageSender);
19-
~CKeyword() override = default;
20-
21-
// IRestService implementation
22-
void configurePocoDispatcher(poco::CRestDispatcher& dispatcher) override{}
23-
boost::shared_ptr<std::vector<boost::shared_ptr<IRestEndPoint>>> endPoints() override;
24-
// [END] IRestService implementation
25-
26-
private:
27-
boost::shared_ptr<IAnswer> getKeywordsV2(const boost::shared_ptr<IRequest>& request) const;
28-
boost::shared_ptr<IAnswer> getKeywordsAcquisitionsV2(const boost::shared_ptr<IRequest>& request) const;
29-
boost::shared_ptr<IAnswer> updateKeywordV2(const boost::shared_ptr<IRequest>& request) const;
30-
boost::shared_ptr<IAnswer> sendCommandV2(const boost::shared_ptr<IRequest>& request) const;
31-
32-
//-----------------------------------------
33-
///\brief Data provider
34-
//-----------------------------------------
35-
boost::shared_ptr<database::IDataProvider> m_dataProvider;
36-
37-
//-----------------------------------------
38-
///\brief Keyword manager
39-
//-----------------------------------------
40-
boost::shared_ptr<dataAccessLayer::IKeywordManager> m_keywordManager;
41-
boost::shared_ptr<std::vector<boost::shared_ptr<IRestEndPoint>>> m_endPoints;
42-
43-
//-----------------------------------------
44-
///\brief The rest keyword which identifies this rule
45-
//-----------------------------------------
46-
static std::string m_restKeyword;
47-
48-
//-----------------------------------------
49-
///\brief The send message interface
50-
//-----------------------------------------
51-
communication::ISendMessageAsync& m_messageSender;
52-
};
53-
} //namespace service
54-
} //namespace rest
55-
} //namespace web
25+
}
26+
27+
boost::shared_ptr<std::vector<boost::shared_ptr<IRestEndPoint>>> endPoints() override;
28+
// [END] IRestService implementation
29+
30+
private:
31+
boost::shared_ptr<IAnswer> getKeywordsV2(const boost::shared_ptr<IRequest>& request) const;
32+
boost::shared_ptr<IAnswer> getKeywordsAcquisitionsV2(const boost::shared_ptr<IRequest>& request) const;
33+
boost::shared_ptr<IAnswer> updateKeywordV2(const boost::shared_ptr<IRequest>& request) const;
34+
boost::shared_ptr<IAnswer> sendCommandV2(const boost::shared_ptr<IRequest>& request) const;
35+
36+
//-----------------------------------------
37+
///\brief Data provider
38+
//-----------------------------------------
39+
boost::shared_ptr<database::IDataProvider> m_dataProvider;
40+
41+
//-----------------------------------------
42+
///\brief Keyword manager
43+
//-----------------------------------------
44+
boost::shared_ptr<dataAccessLayer::IKeywordManager> m_keywordManager;
45+
boost::shared_ptr<std::vector<boost::shared_ptr<IRestEndPoint>>> m_endPoints;
46+
47+
//-----------------------------------------
48+
///\brief The rest keyword which identifies this rule
49+
//-----------------------------------------
50+
static std::string m_restKeyword;
51+
52+
//-----------------------------------------
53+
///\brief The send message interface
54+
//-----------------------------------------
55+
communication::ISendMessageAsync& m_messageSender;
56+
};
57+
}

0 commit comments

Comments
 (0)