#include <CFileCollectionCompBase.h>
|
| virtual istd::IChangeableUniquePtr | CreateDataObject (const QByteArray &typeId) const |
| |
| virtual istd::IChangeableUniquePtr | CreateObjectFromFile (const QString &filePath, const QByteArray &typeId) const |
| |
| QString | SaveCollectionItem (const CFileCollectionItem &repositoryItem, const QString &dataFilePath=QString()) const |
| |
| virtual bool | SaveMetaInfo (const idoc::IDocumentMetaInfo &metaInfo, const QString &metaInfoFilePath) const |
| |
| virtual bool | LoadMetaInfo (idoc::IDocumentMetaInfo &metaInfo, const QString &metaInfoFilePath) const |
| |
| bool | IsPathInsideRepository (const QString &filePath) const |
| |
| int | GetFileIndexById (const QByteArray &fileId) const |
| |
| int | GetFileIndexByName (const QString &fileName) const |
| |
| virtual idoc::MetaInfoPtr | CreateItemMetaInfo (const QString &dataObjectFilePath, const QByteArray &typeId) const |
| |
| bool | CreateItemMetaInfoFile (const QString &dataObjectFilePath, const QByteArray &typeId, const QString &metaInfoFilePath) const |
| |
| void | UpdateItemMetaInfo (CFileCollectionItem &item) const |
| |
| virtual QString | CalculateFolderPathInRepository (const QString &localFilePath, const QString &resourceName, const QByteArray &typeId, ilog::IMessageConsumer *messageConsumerPtr) const =0 |
| |
|
| enum | OperationalFlags {
OF_SUPPORT_RENAME = 1
, OF_SUPPORT_INSERT = 2
, OF_SUPPORT_DELETE = 4
, OF_SUPPORT_EDIT = 8
,
OF_SUPPORT_USING = 16
, OF_SUPPORT_PAGINATION = 32
, OF_ALL = OF_SUPPORT_RENAME | OF_SUPPORT_INSERT | OF_SUPPORT_DELETE | OF_SUPPORT_EDIT | OF_SUPPORT_USING | OF_SUPPORT_PAGINATION
} |
| |
| enum | ChangeFlags {
CF_ADDED = 10000
, CF_ELEMENT_RENAMED
, CF_ELEMENT_DESCRIPTION_CHANGED
, CF_ELEMENT_STATE
,
CF_REMOVED
, CF_RESTORED
, CF_LAST
} |
| |
| enum | ElementInfoType { EIT_NAME
, EIT_DESCRIPTION
, EIT_ENABLED
, EIT_USER = 1000
} |
| |
| enum | MetaInfoType {
MIT_INSERTION_USER = idoc::IDocumentMetaInfo::MIT_USER + 10000
, MIT_INSERTION_TIME
, MIT_LAST_OPERATION_USER
, MIT_LAST_OPERATION_TIME
,
MIT_PREVIEW_THUMBNAIL
, MIT_REVISION = idoc::IDocumentMetaInfo::MIT_USER + 20000
} |
| |
| enum | FileCollectionLayout { FCL_FLAT
, FCL_FOLDER
} |
| |
| template<typename Interface > |
| const Interface * | GetObjectPtr (const Id &objectId) const |
| |
| virtual void | ResetObjectIds () |
| |
| virtual FileCollectionLayout | GetCollectionFileLayout () const =0 |
| |
Base class of the file collection. General implementation
Definition at line 80 of file CFileCollectionCompBase.h.
◆ CalculateFolderPathInRepository()
| virtual QString imtrepo::CFileCollectionCompBase::CalculateFolderPathInRepository |
( |
const QString & |
localFilePath, |
|
|
const QString & |
resourceName, |
|
|
const QByteArray & |
typeId, |
|
|
ilog::IMessageConsumer * |
messageConsumerPtr |
|
) |
| const |
|
protectedpure virtual |
Calculate path in file collection for the local file path
◆ CreateDataObject()
| virtual istd::IChangeableUniquePtr imtrepo::CFileCollectionCompBase::CreateDataObject |
( |
const QByteArray & |
typeId | ) |
const |
|
protectedvirtual |
Create data object for the given type.
◆ CreateItemMetaInfo()
| virtual idoc::MetaInfoPtr imtrepo::CFileCollectionCompBase::CreateItemMetaInfo |
( |
const QString & |
dataObjectFilePath, |
|
|
const QByteArray & |
typeId |
|
) |
| const |
|
protectedvirtual |
Create meta-info object for a given file in the file collection.
- Returns
- The instance of the meta-information object, or
NULL of no meta-info was created for the given file.
◆ CreateItemMetaInfoFile()
| bool imtrepo::CFileCollectionCompBase::CreateItemMetaInfoFile |
( |
const QString & |
dataObjectFilePath, |
|
|
const QByteArray & |
typeId, |
|
|
const QString & |
metaInfoFilePath |
|
) |
| const |
|
protected |
Create the meta information file.
◆ CreateObjectFromFile()
| virtual istd::IChangeableUniquePtr imtrepo::CFileCollectionCompBase::CreateObjectFromFile |
( |
const QString & |
filePath, |
|
|
const QByteArray & |
typeId |
|
) |
| const |
|
protectedvirtual |
Create object data from the file.
◆ GetFileIndexById()
| int imtrepo::CFileCollectionCompBase::GetFileIndexById |
( |
const QByteArray & |
fileId | ) |
const |
|
protected |
Get the index of the file by file ID. If the file was not found, the method will return a negative number.
◆ GetFileIndexByName()
| int imtrepo::CFileCollectionCompBase::GetFileIndexByName |
( |
const QString & |
fileName | ) |
const |
|
protected |
Get the index of the file by file (resource) name. If the file was not found, the method will return a negative number.
◆ IsPathInsideRepository()
| bool imtrepo::CFileCollectionCompBase::IsPathInsideRepository |
( |
const QString & |
filePath | ) |
const |
|
protected |
Check if the path to the file is inside of repository folder.
◆ LoadMetaInfo()
| virtual bool imtrepo::CFileCollectionCompBase::LoadMetaInfo |
( |
idoc::IDocumentMetaInfo & |
metaInfo, |
|
|
const QString & |
metaInfoFilePath |
|
) |
| const |
|
protectedvirtual |
Load file's meta info.
- Parameters
-
| metaInfo | Meta info of the resource file. |
| filePath | Path to the meta info file. |
- Returns
true of the operation was sucessfull, or false otherwise.
◆ SaveCollectionItem()
| QString imtrepo::CFileCollectionCompBase::SaveCollectionItem |
( |
const CFileCollectionItem & |
repositoryItem, |
|
|
const QString & |
dataFilePath = QString() |
|
) |
| const |
|
protected |
Write a file collection item to file system.
- Parameters
-
| repositoryItem | collection item |
| dataFilePath | target file path for the data item. If this parameter is empty file path defined in repositoryItem will be used. |
- Todo:
- Refactor this method --> liquid shit in the brain of the programmer!
◆ SaveMetaInfo()
| virtual bool imtrepo::CFileCollectionCompBase::SaveMetaInfo |
( |
const idoc::IDocumentMetaInfo & |
metaInfo, |
|
|
const QString & |
metaInfoFilePath |
|
) |
| const |
|
protectedvirtual |
Save file's meta info.
- Parameters
-
| metaInfo | Meta info of the resource file. |
| filePath | Optionally defined name of the meta info file. If not specified, the file path will be calculated automatically. |
- Returns
true of the operation was sucessfull, or false otherwise.
◆ UpdateItemMetaInfo()
Update the meta informations for the existing item.
◆ m_files
| Files imtrepo::CFileCollectionCompBase::m_files |
|
mutableprotected |
◆ m_resourceTypeConstraints
| ResourceTypeConstraintsModel imtrepo::CFileCollectionCompBase::m_resourceTypeConstraints |
|
protected |