Public Types | Public Member Functions | List of all members
ifile::IFileResourcesManager Class Referenceabstract

Manager of file-based resources. More...

#include <IFileResourcesManager.h>

Inheritance diagram for ifile::IFileResourcesManager:
istd::IChangeable istd::IPolymorphic

Public Types

enum  LicenseStatus { LS_NONE, LS_OK, LS_NOT_VALID }
 Status of the resource license. More...
 
typedef istd::TSmartPtr
< istd::IChangeable
DataObjectPtr
 
typedef QList< QByteArray > Ids
 
typedef
IFileMetaInfoProvider::MetaInfoPtr 
MetaInfoPtr
 
- Public Types inherited from istd::IChangeable
enum  ChangeFlags {
  CF_ACF_INTERNAL = 0, CF_ALL_DATA, CF_ANY, CF_DESTROYING,
  CF_DELEGATED, CF_NO_UNDO
}
 Data model change notification flags. More...
 
enum  SupportedOperations {
  SO_NONE = 0, SO_OBSERVE = 1 << 0, SO_COPY = 1 << 1, SO_CLONE = 1 << 2,
  SO_COMPARE = 1 << 3, SO_RESET = 1 << 4
}
 Flags for supported operations. More...
 
enum  CompatibilityMode { CM_STRICT, CM_WITHOUT_REFS, CM_WITH_REFS, CM_CONVERT }
 Control how relationship betweeen objects are interpreted. More...
 

Public Member Functions

virtual Ids GetFileIds () const =0
 Get list of file/resource IDs in the repository. More...
 
virtual const
IFileResourceTypeConstraints
GetResourceTypeConstraints () const =0
 Get type contraints describing each supported type of resource. More...
 
virtual QByteArray GetResourceTypeId (const QByteArray &resourceId) const =0
 Get type ID if the resource. More...
 
virtual QByteArray CreateNewFile (const QByteArray &fileTypeId, const istd::IChangeable *dataObjectPtr, const QString &filePath=QString(), const QString &resourceName=QString())=0
 Create new file resource. More...
 
virtual bool RemoveFile (const QByteArray &fileId)=0
 Remove file from the resources storage. More...
 
virtual DataObjectPtr GetDataObject (const QByteArray &fileId) const =0
 Get data object for the given resource. More...
 
virtual
ifile::IFileMetaInfoProvider::MetaInfoPtr 
GetFileMetaInfo (const QByteArray &resourceId) const =0
 Get meta info of an existing file resource. More...
 
virtual QString GetResourceName (const QByteArray &resourceId) const =0
 Get the name of the file resource in the storage. More...
 
virtual bool SetResourceName (const QByteArray &resourceId, const QString &name)=0
 Set the name of the file resource in the storage. More...
 
virtual QString GetResourceDescription (const QByteArray &resourceId) const =0
 Get the description of the file resource in the storage. More...
 
virtual bool SetResourceDescription (const QByteArray &resourceId, const QString &description)=0
 Set the description of the file resource in the storage. More...
 
virtual LicenseStatus GetLicenseStatus (const QByteArray &resourceId, const QByteArray &resourceTypeId=QByteArray(), ilog::IMessageConsumer *messageConsumerPtr=NULL) const =0
 Get the license status of the given resource. More...
 
- Public Member Functions inherited from istd::IChangeable
virtual int GetSupportedOperations () const
 Get set of flags for supported operations. More...
 
virtual bool CopyFrom (const IChangeable &object, CompatibilityMode mode=CM_WITHOUT_REFS)
 Copy this object from another one. More...
 
virtual bool IsEqual (const IChangeable &object) const
 Compare this object with another object. More...
 
virtual IChangeableCloneMe (CompatibilityMode mode=CM_WITHOUT_REFS) const
 Make a copy of this object. More...
 
virtual bool ResetData (CompatibilityMode mode=CM_WITHOUT_REFS)
 Reset data to its default state. More...
 
virtual void BeginChanges (const ChangeSet &changeSet)
 Starts the change transaction. More...
 
virtual void EndChanges (const ChangeSet &changeSet)
 Ends the change transaction. More...
 
virtual void BeginChangeGroup (const ChangeSet &changeSet)
 Starts group of changes. More...
 
virtual void EndChangeGroup (const ChangeSet &changeSet)
 Ends group of changes. More...
 
- Public Member Functions inherited from istd::IPolymorphic
virtual ~IPolymorphic ()
 

Additional Inherited Members

- Static Public Member Functions inherited from istd::IChangeable
static const ChangeSetGetNoChanges ()
 Get empty set of changes. More...
 
static const ChangeSetGetAnyChange ()
 Get anonymous change set. More...
 
static const ChangeSetGetAllChanges ()
 Get anonymous change set. More...
 
static const ChangeSetGetDelegatedChanges ()
 Get delegated change set. More...
 
- Protected Member Functions inherited from istd::IChangeable
virtual void OnBeginChanges ()
 Callback function for begin change event. More...
 
virtual void OnEndChanges (const ChangeSet &changeSet)
 Callback function for end change event. More...
 

Detailed Description

Manager of file-based resources.

Definition at line 26 of file IFileResourcesManager.h.

Member Typedef Documentation

Definition at line 29 of file IFileResourcesManager.h.

typedef QList<QByteArray> ifile::IFileResourcesManager::Ids

Definition at line 30 of file IFileResourcesManager.h.

Definition at line 31 of file IFileResourcesManager.h.

Member Enumeration Documentation

Status of the resource license.

Enumerator
LS_NONE 

The resource is not licensed.

It means, the resource can be used and edited without any restrictions.

LS_OK 

The resource is licensed and the user of the repository has all neccessary rights for using it.

LS_NOT_VALID 

The resource is licensed, but the user of the repository has no valid licenes for using it.

Definition at line 36 of file IFileResourcesManager.h.

Member Function Documentation

virtual QByteArray ifile::IFileResourcesManager::CreateNewFile ( const QByteArray &  fileTypeId,
const istd::IChangeable dataObjectPtr,
const QString &  filePath = QString(),
const QString &  resourceName = QString() 
)
pure virtual

Create new file resource.

Parameters
IDof the resource (file) type.
Initialstate of the data object. Can be NULL.
Filepath of the new resource.
Name(alais) of the resource.
Returns
ID of the created resource or an empty string if the operation failed.
virtual DataObjectPtr ifile::IFileResourcesManager::GetDataObject ( const QByteArray &  fileId) const
pure virtual

Get data object for the given resource.

virtual Ids ifile::IFileResourcesManager::GetFileIds ( ) const
pure virtual

Get list of file/resource IDs in the repository.

virtual ifile::IFileMetaInfoProvider::MetaInfoPtr ifile::IFileResourcesManager::GetFileMetaInfo ( const QByteArray &  resourceId) const
pure virtual

Get meta info of an existing file resource.

Parameters
resourceIdID of the file resource.
Returns
Pointer to the meta-info instance or NULL, if no information could be provided.
virtual LicenseStatus ifile::IFileResourcesManager::GetLicenseStatus ( const QByteArray &  resourceId,
const QByteArray &  resourceTypeId = QByteArray(),
ilog::IMessageConsumer messageConsumerPtr = NULL 
) const
pure virtual

Get the license status of the given resource.

See Also
LicenseStatus
virtual QString ifile::IFileResourcesManager::GetResourceDescription ( const QByteArray &  resourceId) const
pure virtual

Get the description of the file resource in the storage.

Parameters
resourceIdID of the file in the storage.
virtual QString ifile::IFileResourcesManager::GetResourceName ( const QByteArray &  resourceId) const
pure virtual

Get the name of the file resource in the storage.

Parameters
resourceIdID of the file in the storage.
virtual const IFileResourceTypeConstraints* ifile::IFileResourcesManager::GetResourceTypeConstraints ( ) const
pure virtual

Get type contraints describing each supported type of resource.

Returns
NULL, if no type constraints are known.
virtual QByteArray ifile::IFileResourcesManager::GetResourceTypeId ( const QByteArray &  resourceId) const
pure virtual

Get type ID if the resource.

ID of the file resource in the storage.

Returns
Type ID of the resource or an empty string, if the resource was not found or the type is unknown.
virtual bool ifile::IFileResourcesManager::RemoveFile ( const QByteArray &  fileId)
pure virtual

Remove file from the resources storage.

Parameters
resourceIdID of the file.
virtual bool ifile::IFileResourcesManager::SetResourceDescription ( const QByteArray &  resourceId,
const QString &  description 
)
pure virtual

Set the description of the file resource in the storage.

Parameters
resourceIdID of the file in the storage.
descriptionDescription of the file resource.
virtual bool ifile::IFileResourcesManager::SetResourceName ( const QByteArray &  resourceId,
const QString &  name 
)
pure virtual

Set the name of the file resource in the storage.

Parameters
resourceIdID of the file in the storage.
nameName of the file resource.

The documentation for this class was generated from the following file:

© 2007-2017 Witold Gantzke and Kirill Lepskiy