6#include <ilog/TLoggerCompWrap.h>
7#include <iqt/ITranslationManager.h>
10#include <imtserverapp/IRepresentationController.h>
11#include <imtserverapp/ICommandPermissionsProvider.h>
12#include <imtauth/IPermissionChecker.h>
19class CObjectRepresentationControllerCompBase:
20 public ilog::CLoggerComponentBase,
21 virtual public IRepresentationController
24 typedef ilog::CLoggerComponentBase BaseClass;
26 I_BEGIN_BASE_COMPONENT(CObjectRepresentationControllerCompBase)
27 I_REGISTER_INTERFACE(imtserverapp::IRepresentationController);
28 I_ASSIGN(m_objectIdAttrPtr,
"ObjectId",
"Object-ID",
false,
"");
29 I_ASSIGN(m_objectNameAttrPtr,
"ObjectName",
"Object Name",
false,
"");
30 I_ASSIGN(m_qmlPathAttrPtr,
"PathToQml",
"Path to qml component for representation data",
false,
"");
31 I_ASSIGN(m_commandPermissionsProviderCompPtr,
"CommandPermissionsProvider",
"Command permissions provider",
false,
"CommandPermissionsProvider");
32 I_ASSIGN(m_checkPermissionCompPtr,
"PermissionChecker",
"Checker of the permissions",
false,
"PermissionChecker");
33 I_ASSIGN(m_translationManagerCompPtr,
"TranslationManager",
"Translation manager",
false,
"TranslationManager");
37 virtual bool GetRepresentationFromValue(
38 const istd::IChangeable& dataModel,
39 QJsonObject& representation,
40 const iprm::IParamsSet* paramsPtr =
nullptr)
const = 0;
41 virtual bool CheckPermissions(
const imtauth::IUserInfo::FeatureIds& userPermissions,
const QByteArray& paramId)
const;
44 virtual QByteArray GetModelId()
const override;
45 virtual bool GetRepresentationFromDataModel(
46 const istd::IChangeable& dataModel,
47 QJsonObject& representation,
48 const iprm::IParamsSet* paramsPtr =
nullptr)
const override;
51 I_ATTR(QByteArray, m_objectIdAttrPtr);
52 I_TEXTATTR(m_objectNameAttrPtr);
53 I_ATTR(QByteArray, m_qmlPathAttrPtr);
57 I_REF(iqt::ITranslationManager, m_translationManagerCompPtr);