ImagingTools Core SDK
CLicenseCollectionControllerComp.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// ImtCore includes
6#include <imtlic/ILicenseDefinition.h>
7#include <GeneratedFiles/imtlicsdl/SDL/1.0/CPP/Licenses.h>
8
9
10namespace imtlicgql
11{
12
13
14class CLicenseCollectionControllerComp: public sdl::imtlic::Licenses::CLicenseCollectionControllerCompBase
15{
16public:
17 typedef sdl::imtlic::Licenses::CLicenseCollectionControllerCompBase BaseClass;
18
19 I_BEGIN_COMPONENT(CLicenseCollectionControllerComp);
20 I_ASSIGN(m_licenseInfoFactCompPtr, "LicenseFactory", "Factory used for creation of the new license instance", true, "LicenseFactory");
21 I_ASSIGN(m_productCollectionCompPtr, "ProductCollection", "Product collection", false, "ProductCollection");
22 I_END_COMPONENT;
23
24protected:
25 // reimplemented (sdl::imtlic::Licenses::CLicenseCollectionControllerCompBase)
26 virtual bool CreateRepresentationFromObject(
27 const imtbase::IObjectCollectionIterator& objectCollectionIterator,
28 const sdl::imtlic::Licenses::CLicensesListGqlRequest& licensesListRequest,
29 sdl::imtlic::Licenses::CLicenseItem::V1_0& representationObject,
30 QString& errorMessage) const override;
31 virtual istd::IChangeableUniquePtr CreateObjectFromRepresentation(
32 const sdl::imtlic::Licenses::CLicenseDefinitionData::V1_0& licenseDataRepresentation,
33 QByteArray& newObjectId,
34 QString& errorMessage) const override;
35 virtual bool CreateRepresentationFromObject(
36 const istd::IChangeable& data,
37 const sdl::imtlic::Licenses::CLicenseItemGqlRequest& licenseItemRequest,
38 sdl::imtlic::Licenses::CLicenseDefinitionData::V1_0& representationPayload,
39 QString& errorMessage) const override;
40 virtual bool UpdateObjectFromRepresentationRequest(
41 const ::imtgql::CGqlRequest& rawGqlRequest,
42 const sdl::imtlic::Licenses::CLicenseUpdateGqlRequest& licenseUpdateRequest,
43 istd::IChangeable& object,
44 QString& errorMessage) const override;
45private:
46 bool FillObjectFromRepresentation(
47 const sdl::imtlic::Licenses::CLicenseDefinitionData::V1_0& representation,
48 istd::IChangeable& object,
49 QByteArray& objectId,
50 QString& errorMessage) const;
51
52protected:
53 I_FACT(imtlic::ILicenseDefinition, m_licenseInfoFactCompPtr);
54 I_REF(imtbase::IObjectCollection, m_productCollectionCompPtr);
55};
56
57
58} // namespace imtlicgql
59
60
Interface for license definition information.
GraphQL API interface layer for the licensing domain model.