ImagingTools Core SDK
Public Types | Public Member Functions | List of all members
imtbase::IObjectCollectionabstract

#include <IObjectCollection.h>

Inheritance diagram for imtbase::IObjectCollection:
imtbase::IObjectCollectionInfo imtbase::ICollectionInfo imtbase::TAggergatedObjectCollectionWrap< IAddressManager, CAddress > imtbase::TAggergatedObjectCollectionWrap< IPluginStatusMonitor, CSimpleStatus > imtbase::TAggergatedObjectCollectionWrap< IFeatureInfoProvider, CFeatureInfo > imtbase::TAggergatedObjectCollectionWrap< imtlic::ILicenseInfoProvider, CLicenseDefinition > imtbase::TAggergatedObjectCollectionWrap< imtlic::IProductLicensingInfoProvider, CProductLicensingInfo > imtbase::TAggergatedObjectCollectionWrap< imtlic::IProductInstanceInfoProvider, CProductInstanceInfo > imtbase::CCachedObjectCollectionComp imtbase::CObjectCollectionBase imtbase::IOrderedObjectCollection imtbase::TAggergatedObjectCollectionWrap< BaseInterface, ObjectImpl > imtdb::ISqlDatabaseObjectCollection imthype::ITaskCollection imthype::ITaskResultCollection imtmongo::CMongoDatabaseObjectCollectionComp imtrepo::IFileObjectCollection

Public Types

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
}
 
- Public Types inherited from imtbase::ICollectionInfo
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
}
 

Public Member Functions

virtual const IRevisionControllerGetRevisionController () const =0
 
virtual const ICollectionDataControllerGetDataController () const =0
 
virtual int GetOperationFlags (const Id &elementId=Id()) const =0
 
virtual Id InsertNewObject (const QByteArray &typeId, const QString &name, const QString &description, const istd::IChangeable *defaultValuePtr=nullptr, const Id &proposedElementId=Id(), const idoc::IDocumentMetaInfo *dataMetaInfoPtr=nullptr, const idoc::IDocumentMetaInfo *elementMetaInfoPtr=nullptr, const IOperationContext *operationContextPtr=nullptr)=0
 
virtual bool RemoveElements (const Ids &elementIds, const IOperationContext *operationContextPtr=nullptr)=0
 
virtual bool RemoveElementSet (const iprm::IParamsSet *selectionParamsPtr=nullptr, const IOperationContext *operationContextPtr=nullptr)=0
 
virtual bool RestoreObjects (const Ids &objectIds, const IOperationContext *operationContextPtr=nullptr)=0
 
virtual bool RestoreObjectSet (const iprm::IParamsSet *selectionParamsPtr=nullptr, const IOperationContext *operationContextPtr=nullptr)=0
 
virtual const istd::IChangeable * GetObjectPtr (const Id &objectId) const =0
 
template<typename Interface >
const Interface * GetObjectPtr (const Id &objectId) const
 
virtual bool GetObjectData (const Id &objectId, DataPtr &dataPtr, const iprm::IParamsSet *dataConfigurationPtr=nullptr) const =0
 
virtual bool SetObjectData (const Id &objectId, const istd::IChangeable &object, CompatibilityMode mode=CM_WITHOUT_REFS, const IOperationContext *operationContextPtr=nullptr)=0
 
virtual istd::TUniqueInterfacePtr< IObjectCollectionCreateSubCollection (int offset=0, int count=-1, const iprm::IParamsSet *selectionParamsPtr=nullptr) const =0
 
virtual imtbase::IObjectCollectionIteratorCreateObjectCollectionIterator (const QByteArray &objectId=QByteArray(), int offset=0, int count=-1, const iprm::IParamsSet *selectionParamsPtr=nullptr) const =0
 
virtual void ResetObjectIds ()
 
- Public Member Functions inherited from imtbase::IObjectCollectionInfo
virtual const iprm::IOptionsList * GetObjectTypesInfo () const =0
 
virtual Id GetObjectTypeId (const Id &objectId) const =0
 
virtual idoc::MetaInfoPtr GetDataMetaInfo (const Id &objectId) const =0
 
- Public Member Functions inherited from imtbase::ICollectionInfo
virtual int GetElementsCount (const iprm::IParamsSet *selectionParamsPtr=nullptr, ilog::IMessageConsumer *logPtr=nullptr) const =0
 
virtual Ids GetElementIds (int offset=0, int count=-1, const iprm::IParamsSet *selectionParamsPtr=nullptr, ilog::IMessageConsumer *logPtr=nullptr) const =0
 
virtual bool GetSubsetInfo (ICollectionInfo &subsetInfo, int offset=0, int count=-1, const iprm::IParamsSet *selectionParamsPtr=nullptr, ilog::IMessageConsumer *logPtr=nullptr) const =0
 
virtual QVariant GetElementInfo (const Id &elementId, int infoType, ilog::IMessageConsumer *logPtr=nullptr) const =0
 
virtual idoc::MetaInfoPtr GetElementMetaInfo (const Id &elementId, ilog::IMessageConsumer *logPtr=nullptr) const =0
 
virtual bool SetElementName (const Id &elementId, const QString &name, ilog::IMessageConsumer *logPtr=nullptr)=0
 
virtual bool SetElementDescription (const Id &elementId, const QString &description, ilog::IMessageConsumer *logPtr=nullptr)=0
 
virtual bool SetElementEnabled (const Id &elementId, bool isEnabled=true, ilog::IMessageConsumer *logPtr=nullptr)=0
 

Detailed Description

Common interface for a data object collection.

Definition at line 29 of file IObjectCollection.h.

Member Enumeration Documentation

◆ OperationalFlags

Flags for describing operational constraints on the collection items or the collection itself.

Enumerator
OF_SUPPORT_RENAME 

If active, the obejects can be renamed inside of the collection.

OF_SUPPORT_INSERT 

If active, the objects can be inserted into the collection.

OF_SUPPORT_DELETE 

If active, deleting of objects in the collection is possible.

OF_SUPPORT_EDIT 

If active, editing of objects in the collection is possible.

OF_SUPPORT_USING 

If active, using of objects in the collection is possible.

OF_SUPPORT_PAGINATION 

If active, the collection supports access to the ordered sub-set of the collection elements.

OF_ALL 

All options are enabled.

Definition at line 45 of file IObjectCollection.h.

Member Function Documentation

◆ CreateObjectCollectionIterator()

virtual imtbase::IObjectCollectionIterator * imtbase::IObjectCollection::CreateObjectCollectionIterator ( const QByteArray &  objectId = QByteArray(),
int  offset = 0,
int  count = -1,
const iprm::IParamsSet *  selectionParamsPtr = nullptr 
) const
pure virtual

Create a collection iterator according to the given filtering/sorting parameters.

Parameters
offset[optional] Index offset of the first element
count[optional] If positive, the number of elements should be returned.
selectionParamsPtr[optional] Additional parameters for filtering/ordering elements.

◆ CreateSubCollection()

virtual istd::TUniqueInterfacePtr< IObjectCollection > imtbase::IObjectCollection::CreateSubCollection ( int  offset = 0,
int  count = -1,
const iprm::IParamsSet *  selectionParamsPtr = nullptr 
) const
pure virtual

Create a sub-collection (a subset) of the whole collection according to the given filtering/sorting parameters.

Parameters
offset[optional] Index offset of the first element
count[optional] If positive, the number of elements should be returned.
selectionParamsPtr[optional] Additional parameters for filtering/ordering elements.

◆ GetDataController()

virtual const ICollectionDataController * imtbase::IObjectCollection::GetDataController ( ) const
pure virtual

Get access to the data controller of the collection, if available.

◆ GetObjectData()

virtual bool imtbase::IObjectCollection::GetObjectData ( const Id &  objectId,
DataPtr &  dataPtr,
const iprm::IParamsSet *  dataConfigurationPtr = nullptr 
) const
pure virtual

Get object data instance for the entry with the given ID.

◆ GetObjectPtr() [1/2]

template<typename Interface >
const Interface * imtbase::IObjectCollection::GetObjectPtr ( const Id &  objectId) const
inline

Get access to the object instance inside of collecton.

Note
This method should return a valid instance for an object only for objects that are permanent in the collection and have the given interface.

Definition at line 173 of file IObjectCollection.h.

References GetObjectPtr().

◆ GetObjectPtr() [2/2]

virtual const istd::IChangeable * imtbase::IObjectCollection::GetObjectPtr ( const Id &  objectId) const
pure virtual

Get access to the object instance inside of collecton.

Note
This method should return a valid instance for an object only for objects that are permanent in the collection (fixed).

Referenced by GetObjectPtr().

◆ GetOperationFlags()

virtual int imtbase::IObjectCollection::GetOperationFlags ( const Id &  elementId = Id()) const
pure virtual

Get binary flags describing the possible operations on the single object or on the whole collection.

Parameters
objectIdID of the object for quering flags. If this parameter is empty, the flags for entire collection will be returned.

◆ GetRevisionController()

virtual const IRevisionController * imtbase::IObjectCollection::GetRevisionController ( ) const
pure virtual

Get access to the revision controller of the collection, if available.

◆ InsertNewObject()

virtual Id imtbase::IObjectCollection::InsertNewObject ( const QByteArray &  typeId,
const QString &  name,
const QString &  description,
const istd::IChangeable *  defaultValuePtr = nullptr,
const Id &  proposedElementId = Id(),
const idoc::IDocumentMetaInfo *  dataMetaInfoPtr = nullptr,
const idoc::IDocumentMetaInfo *  elementMetaInfoPtr = nullptr,
const IOperationContext operationContextPtr = nullptr 
)
pure virtual

Create a new object in the container.

Parameters
typeIdType-ID of the object to be created.
nameName of the object in the collection.
descriptionDescrpition of the object.
defaultValuePtrOptional instance used for the object data initialization.
proposedElementIdOptional-defined ID of the object in the collection. If the value is non-empty inserted object become specified ID if possible.
dataMetaInfoPtrOptional-defined meta-information for the data content.
elementMetaInfoPtrOptional-defined meta-information for the collection element.
Returns
If the operation was successful the method will return ID of the created data object in the collection or an empty ID otherwise.

◆ RemoveElements()

virtual bool imtbase::IObjectCollection::RemoveElements ( const Ids &  elementIds,
const IOperationContext operationContextPtr = nullptr 
)
pure virtual

Remove element with the given ID.

◆ RemoveElementSet()

virtual bool imtbase::IObjectCollection::RemoveElementSet ( const iprm::IParamsSet *  selectionParamsPtr = nullptr,
const IOperationContext operationContextPtr = nullptr 
)
pure virtual

Remove element with the given filter.

Parameters
selectionParamsPtrThe filter by which the selection will be made for deletion. If it is null, then everything will be deleted.

◆ ResetObjectIds()

void imtbase::IObjectCollection::ResetObjectIds ( )
inlinevirtual

This method will re-create all object-IDs.

Note
Possible references to the objects in this collection will be lost after this operation.

Definition at line 225 of file IObjectCollection.h.

◆ RestoreObjects()

virtual bool imtbase::IObjectCollection::RestoreObjects ( const Ids &  objectIds,
const IOperationContext operationContextPtr = nullptr 
)
pure virtual

Restore objects with the given IDs.

◆ RestoreObjectSet()

virtual bool imtbase::IObjectCollection::RestoreObjectSet ( const iprm::IParamsSet *  selectionParamsPtr = nullptr,
const IOperationContext operationContextPtr = nullptr 
)
pure virtual

Restore objects with the given filter.

Parameters
selectionParamsPtrThe filter by which the selection will be made for restoring. If it is null, then everything will be restored.

◆ SetObjectData()

virtual bool imtbase::IObjectCollection::SetObjectData ( const Id &  objectId,
const istd::IChangeable &  object,
CompatibilityMode  mode = CM_WITHOUT_REFS,
const IOperationContext operationContextPtr = nullptr 
)
pure virtual

Set data for the entry with the given ID.