ServerManager.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2008 National Institute For Space Research (INPE) - Brazil.
3 
4  This file is part of the TerraLib - a Framework for building GIS enabled
5  applications.
6 
7  TerraLib is free software: you can redistribute it and/or modify
8  it under the terms of the GNU Lesser General Public License as published by
9  the Free Software Foundation, either version 3 of the License,
10  or (at your option) any later version.
11 
12  TerraLib is distributed in the hope that it will be useful,
13  but WITHOUT ANY WARRANTY; without even the implied warranty of
14  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  GNU Lesser General Public License for more details.
16 
17  You should have received a copy of the GNU Lesser General Public License
18  along with TerraLib. See COPYING. If not, write to
19  TerraLib Team at <terralib-team@terralib.org>.
20 */
21 
22 /*!
23  \file terralib/qt/plugins/wtss/ServerManager.h
24 
25  \brief Manage the JSON file for services configuration of the Web Time Series
26  Services plugin.
27 
28  \author Matheus Cavassan Zaglia
29  */
30 
31 #ifndef __TERRALIB_QT_PLUGINS_WTSS_SERVERMANAGER_H
32 #define __TERRALIB_QT_PLUGINS_WTSS_SERVERMANAGER_H
33 
34 // QT
35 #include <QJsonDocument>
36 
37 // STL
38 #include <string>
39 
40 namespace te
41 {
42  namespace qt
43  {
44  namespace plugins
45  {
46  namespace wtss
47  {
49  {
50  public:
51 
53  {
54  static ServerManager instance;
55  return instance;
56  }
57 
58  public:
59 
60  QJsonDocument loadSettings();
61 
62  void addServer(const QString &server_uri);
63  void removeServer(const QString &server_uri);
64  void refreshServer(const QString &server_uri);
65 
66  void addDateFilter(const QString startDate, const QString endDate);
67 
68  QJsonObject getDateFilter();
69 
70  QJsonObject getAttribute(const QString &server_uri,
71  const QString &cv_name,
72  const QString &attribute);
73 
74  void changeStatusServer(const QString &server_uri);
75 
76  void changeStatusCoverage(const QString &server_uri,
77  const QString &cv_name);
78 
79  void changeStatusAttribute(const QString &server_uri,
80  const QString &cv_name,
81  const QString &attribute);
82 
83  private:
84 
86  {
87  }
89  {
90  }
91  // no copy allowed
92  ServerManager(ServerManager const &) = delete;
93  ServerManager &operator=(ServerManager const &) = delete;
94 
95  void saveSettings(QJsonDocument j_doc);
96 
97  };
98  }
99  }
100  } // end namespace tl
101 } // end namespace wtss
102 #endif // __TERRALIB_QT_PLUGINS_WTSS_SERVERMANAGER_H
void addServer(const QString &server_uri)
QJsonObject getAttribute(const QString &server_uri, const QString &cv_name, const QString &attribute)
void saveSettings(QJsonDocument j_doc)
void changeStatusAttribute(const QString &server_uri, const QString &cv_name, const QString &attribute)
ServerManager & operator=(ServerManager const &)=delete
void removeServer(const QString &server_uri)
URI C++ Library.
void changeStatusServer(const QString &server_uri)
void refreshServer(const QString &server_uri)
void addDateFilter(const QString startDate, const QString endDate)
void changeStatusCoverage(const QString &server_uri, const QString &cv_name)
static ServerManager & getInstance()
Definition: ServerManager.h:52