ImagingTools Core SDK
CUserSettingsControllerComp.h
1// SPDX-License-Identifier: LGPL-2.1-or-later OR GPL-2.0-or-later OR GPL-3.0-or-later OR LicenseRef-ImtCore-Commercial
2#pragma once
3
4
5// Qt includes
6#include <QtCore/QJsonObject>
7
8// ImtCore includes
9#include <imtbase/IObjectCollection.h>
10#include <imtserverapp/IRepresentationController.h>
11#include <imtauth/IUserSettings.h>
12#include <imtservergql/CGqlRepresentationDataControllerCompBase.h>
13
14
15namespace imtservergql
16{
17
18
19class CUserSettingsControllerComp: public CGqlRepresentationControllerCompBase
20{
21public:
22 typedef CGqlRepresentationControllerCompBase BaseClass;
23
24 I_BEGIN_COMPONENT(CUserSettingsControllerComp);
25 I_ASSIGN(m_userSettingsRepresentationControllerCompPtr, "UserSettingsRepresentationController", "Controller for user related data model representation", true, "RepresentationController");
26 I_ASSIGN(m_userSettingsCollectionCompPtr, "UserSettingsCollection", "User settings collection", true, "UserSettingsCollection");
27 I_ASSIGN(m_userSettingsInfoFactCompPtr, "UserSettingsFactory", "Factory used for creation of the new user settings instance", true, "UserSettingsFactory");
28 I_END_COMPONENT;
29
30protected:
31 // reimplemented (imtservergql::CGqlRepresentationControllerCompBase)
32 virtual QJsonObject CreateRepresentationFromRequest(const imtgql::CGqlRequest& gqlRequest, QString& errorMessage) const override;
33 virtual bool UpdateModelFromRepresentation(const imtgql::CGqlRequest& request, const QJsonObject& representation) const override;
34
35protected:
36 I_REF(imtserverapp::IRepresentationController, m_userSettingsRepresentationControllerCompPtr);
37 I_REF(imtbase::IObjectCollection, m_userSettingsCollectionCompPtr);
38 I_FACT(imtauth::IUserSettings, m_userSettingsInfoFactCompPtr);
39};
40
41
42} // namespace imtservergql
43
44