IFileResourcesManager.h
Go to the documentation of this file.
1 #pragma once
2 
3 
4 // Qt includes
5 #include <QtCore/QByteArray>
6 #include <QtCore/QList>
7 
8 // ACF includes
9 #include <istd/TSmartPtr.h>
10 #include <ilog/IMessageConsumer.h>
11 #include <iprm/IOptionsList.h>
12 #include <idoc/IDocumentMetaInfo.h>
14 
15 
16 namespace ifile
17 {
18 
19 
20 class IFileResourceTypeConstraints;
21 
22 
27 {
28 public:
30  typedef QList<QByteArray> Ids;
32 
37  {
42 
47 
52  };
53 
54 
58  virtual Ids GetFileIds() const = 0;
59 
65 
71  virtual QByteArray GetResourceTypeId(const QByteArray& resourceId) const = 0;
72 
81  virtual QByteArray CreateNewFile(
82  const QByteArray& fileTypeId,
83  const istd::IChangeable* dataObjectPtr,
84  const QString& filePath = QString(),
85  const QString& resourceName = QString()) = 0;
86 
91  virtual bool RemoveFile(const QByteArray& fileId) = 0;
92 
96  virtual DataObjectPtr GetDataObject(const QByteArray& fileId) const = 0;
97 
103  virtual ifile::IFileMetaInfoProvider::MetaInfoPtr GetFileMetaInfo(const QByteArray& resourceId) const = 0;
104 
109  virtual QString GetResourceName(const QByteArray& resourceId) const = 0;
110 
116  virtual bool SetResourceName(const QByteArray& resourceId, const QString& name) = 0;
117 
122  virtual QString GetResourceDescription(const QByteArray& resourceId) const = 0;
123 
129  virtual bool SetResourceDescription(const QByteArray& resourceId, const QString& description) = 0;
130 
136  const QByteArray& resourceId,
137  const QByteArray& resourceTypeId = QByteArray(),
138  ilog::IMessageConsumer* messageConsumerPtr = NULL) const = 0;
139 };
140 
141 
142 } // namespace ifile
143 
144 
virtual DataObjectPtr GetDataObject(const QByteArray &fileId) const =0
Get data object for the given resource.
virtual ifile::IFileMetaInfoProvider::MetaInfoPtr GetFileMetaInfo(const QByteArray &resourceId) const =0
Get meta info of an existing file resource.
virtual QByteArray CreateNewFile(const QByteArray &fileTypeId, const istd::IChangeable *dataObjectPtr, const QString &filePath=QString(), const QString &resourceName=QString())=0
Create new file resource.
LicenseStatus
Status of the resource license.
virtual bool SetResourceName(const QByteArray &resourceId, const QString &name)=0
Set the name of the file resource in the storage.
IFileMetaInfoProvider::MetaInfoPtr MetaInfoPtr
virtual QString GetResourceDescription(const QByteArray &resourceId) const =0
Get the description of the file resource in the storage.
virtual QString GetResourceName(const QByteArray &resourceId) const =0
Get the name of the file resource in the storage.
istd::TSmartPtr< istd::IChangeable > DataObjectPtr
virtual const IFileResourceTypeConstraints * GetResourceTypeConstraints() const =0
Get type contraints describing each supported type of resource.
Interface for describing constraints of file types supported by the file repository implementation...
Common interface for data model objects, which can be changed.
Definition: IChangeable.h:24
The resource is licensed, but the user of the repository has no valid licenes for using it...
virtual Ids GetFileIds() const =0
Get list of file/resource IDs in the repository.
virtual QByteArray GetResourceTypeId(const QByteArray &resourceId) const =0
Get type ID if the resource.
The resource is licensed and the user of the repository has all neccessary rights for using it...
#define NULL
Definition: istd.h:64
Manager of file-based resources.
virtual bool RemoveFile(const QByteArray &fileId)=0
Remove file from the resources storage.
virtual LicenseStatus GetLicenseStatus(const QByteArray &resourceId, const QByteArray &resourceTypeId=QByteArray(), ilog::IMessageConsumer *messageConsumerPtr=NULL) const =0
Get the license status of the given resource.
Common interface for a message container consuming information objects (messages).
The resource is not licensed.
virtual bool SetResourceDescription(const QByteArray &resourceId, const QString &description)=0
Set the description of the file resource in the storage.

© 2007-2017 Witold Gantzke and Kirill Lepskiy