SDK  2.1.4
CloudBackend Software Development Kit - SDK API for C++
cbe::Container Class Reference

A collection of Item, can also represent a table or folder. More...

#include <Container.h>

Inheritance diagram for cbe::Container:
Collaboration diagram for cbe::Container:

Public Types

using CreateContainerDelegatePtr = delegate::CreateContainerDelegatePtr
 
using CreateContainerException = delegate::CreateContainerDelegate::Exception
 
using CreateContainerError = delegate::CreateContainerDelegate::ErrorInfo
 
using MoveDelegatePtr = delegate::container::MoveDelegatePtr
 
using MoveException = delegate::container::MoveDelegate::Exception
 
using MoveError = delegate::container::MoveDelegate::ErrorInfo
 
using RenameDelegatePtr = delegate::container::RenameDelegatePtr
 
using RenameException = delegate::container::RenameDelegate::Exception
 
using RenameError = delegate::container::RenameDelegate::ErrorInfo
 
using RemoveDelegatePtr = delegate::container::RemoveDelegatePtr
 
using RemoveException = delegate::container::RemoveDelegate::Exception
 
using RemoveError = delegate::container::RemoveDelegate::ErrorInfo
 
using CreateObjectDelegatePtr = delegate::CreateObjectDelegatePtr
 
using CreateObjectException = delegate::CreateObjectDelegate::Exception
 
using CreateObjectError = delegate::CreateObjectDelegate::ErrorInfo
 
using UploadDelegatePtr = delegate::UploadDelegatePtr
 
using UploadException = delegate::UploadDelegate::Exception
 
using UploadError = delegate::UploadDelegate::ErrorInfo
 
using QueryDelegatePtr = delegate::QueryDelegatePtr
 
using QueryJoinDelegatePtr = std::shared_ptr< delegate::QueryJoinDelegate >
 
using QueryException = delegate::QueryDelegate::Exception
 
using QueryJoinError = delegate::QueryJoinDelegate::ErrorInfo
 
using QueryError = delegate::QueryDelegate::ErrorInfo
 
using queryWithPathException = delegate::QueryDelegate::Exception
 
using queryWithPathError = delegate::QueryDelegate::ErrorInfo
 
using SearchException = delegate::QueryDelegate::Exception
 
using SearchError = delegate::QueryDelegate::ErrorInfo
 
using SetAclDelegatePtr = delegate::AclDelegatePtr
 
using SetAclException = delegate::AclDelegate::Exception
 
using SetAclError = delegate::AclDelegate::ErrorInfo
 
using GetAclDelegatePtr = delegate::AclDelegatePtr
 
using GetAclException = delegate::AclDelegate::Exception
 
using GetAclError = delegate::AclDelegate::ErrorInfo
 
using ShareDelegatePtr = delegate::ShareDelegatePtr
 
using ShareException = delegate::ShareDelegate::Exception
 
using ShareError = delegate::ShareDelegate::ErrorInfo
 
using UnShareDelegatePtr = std::shared_ptr< delegate::UnShareDelegate >
 
using UnShareException = delegate::UnShareDelegate::Exception
 
using UnShareError = delegate::UnShareDelegate::ErrorInfo
 
using PublishDelegatePtr = delegate::PublishDelegatePtr
 
using PublishException = delegate::PublishDelegate::Exception
 
using PublishError = delegate::PublishDelegate::ErrorInfo
 
using UnPublishDelegatePtr = delegate::UnPublishDelegatePtr
 
using UnPublishException = delegate::UnPublishDelegate::Exception
 
using UnPublishError = delegate::UnPublishDelegate::ErrorInfo
 
using UnSubscribeDelegatePtr = delegate::UnSubscribeDelegatePtr
 
using UnSubscribeException = delegate::UnSubscribeDelegate::Exception
 
using UnSubscribeError = delegate::UnSubscribeDelegate::ErrorInfo
 

Public Member Functions

cbe::Container createContainer (const std::string &name, CreateContainerDelegatePtr delegate)
 Create a container. More...
 
cbe::Container createContainer (const std::string &name)
 Synchronous [exception] createContainer. More...
 
cbe::util::Optional< cbe::ContainercreateContainer (const std::string &name, CreateContainerError &error)
 Synchronous [non-throwing] createContainer. More...
 
void move (cbe::ContainerId dstId, MoveDelegatePtr delegate)
 Move a container to a different parent. More...
 
cbe::Container move (cbe::ContainerId dstId)
 Synchronous [exception] move. More...
 
cbe::util::Optional< cbe::Containermove (cbe::ContainerId dstId, MoveError &error)
 Synchronous [non-throwing] move. More...
 
void rename (const std::string &name, RenameDelegatePtr delegate)
 Change the name of the container. More...
 
cbe::Container rename (const std::string &name)
 Synchronous [exception] rename. More...
 
cbe::util::Optional< cbe::Containerrename (const std::string &name, RenameError &error)
 Synchronous [non-throwing] rename. More...
 
void remove (RemoveDelegatePtr delegate)
 Delete the container. More...
 
delegate::container::RemoveSuccess remove ()
 Synchronous [exception] remove/delete. More...
 
cbe::util::Optional< delegate::container::RemoveSuccessremove (RemoveError &error)
 Synchronous [non-throwing] remove/delete. More...
 
cbe::Object createObject (std::string name, cbe::KeyValues keyValues, CreateObjectDelegatePtr delegate)
 Create a new object. More...
 
cbe::Object createObject (std::string name, CreateObjectDelegatePtr delegate)
 
cbe::Object createObject (std::string name, cbe::KeyValues keyValues)
 Synchronous [exception] createObject. More...
 
cbe::util::Optional< cbe::ObjectcreateObject (std::string name, cbe::KeyValues keyValues, CreateObjectError &error)
 Synchronous [non-throwing] createObject. More...
 
cbe::Object upload (const std::string &filePath, UploadDelegatePtr delegate)
 Upload object to container with file given by filePath. More...
 
cbe::Object upload (const std::string &name, const std::string &path, UploadDelegatePtr delegate)
 Create an object in current container by uploading a file. More...
 
cbe::Object upload (const std::string &name, std::uint64_t length, const char *byteData, UploadDelegatePtr delegate)
 Upload from local memory to an object. More...
 
cbe::Object upload (const std::string &filePath, delegate::ProgressEventFn &&progressEventFn)
 Synchronous [exception] upload. More...
 
cbe::Object upload (const std::string &filePath)
 Synchronous [exception] upload. More...
 
cbe::Object upload (const std::string &name, const std::string &path, delegate::ProgressEventFn &&progressEventFn)
 Synchronous [exception] upload with progress. More...
 
cbe::Object upload (const std::string &name, const std::string &path)
 Synchronous [exception] upload. More...
 
cbe::Object upload (const std::string &name, std::uint64_t length, const char *byteData, delegate::ProgressEventFn &&progressEventFn)
 Synchronous [exception] upload from memory with progress. More...
 
cbe::Object upload (const std::string &name, std::uint64_t length, const char *byteData)
 Synchronous [exception] upload from memory. More...
 
cbe::util::Optional< cbe::Objectupload (const std::string &filePath, delegate::ProgressEventFn &&progressEventFn, UploadError &error)
 Synchronous [non-throwing] upload with progress. More...
 
cbe::util::Optional< cbe::Objectupload (const std::string &filePath, UploadError &error)
 Synchronous [non-throwing] upload. More...
 
cbe::util::Optional< cbe::Objectupload (const std::string &name, const std::string &path, delegate::ProgressEventFn &&progressEventFn, UploadError &error)
 Synchronous [non-throwing] upload with progress. More...
 
cbe::util::Optional< cbe::Objectupload (const std::string &name, const std::string &path, UploadError &error)
 Synchronous [non-throwing] upload. More...
 
cbe::util::Optional< cbe::Objectupload (const std::string &name, std::uint64_t length, const char *byteData, delegate::ProgressEventFn &&progressEventFn, UploadError &error)
 Synchronous [non-throwing] upload from memory with progress. More...
 
cbe::util::Optional< cbe::Objectupload (const std::string &name, std::uint64_t length, const char *byteData, UploadError &error)
 Synchronous [non-throwing] upload from memory. More...
 
cbe::QueryChain query (QueryDelegatePtr queryDelegate)
 Select list of objects. More...
 
cbe::QueryChain query (Filter filter, QueryDelegatePtr delegate)
 Select list of objects using filter. More...
 
cbe::QueryChainExt query (delegate::QueryJoinDelegatePtr delegate)
 Select list of objects, for join. More...
 
cbe::QueryChainExt query (Filter filter, delegate::QueryJoinDelegatePtr delegate)
 Select list of objects using filter, for join. More...
 
cbe::QueryChainSync query ()
 Synchronous [exception] Select list of objects. More...
 
cbe::QueryChainSync query (Filter filter)
 Synchronous [exception] Select list of objects using filter. More...
 
cbe::QueryChainSync query (QueryJoinError &error)
 Synchronous [non-throwing] Select list of objects, for join. More...
 
cbe::QueryChainSync query (Filter filter, QueryJoinError &error)
 Synchronous [non-throwing] Select list of objects using filter, for join. More...
 
cbe::QueryChain queryWithPath (std::string relativePath, QueryDelegatePtr delegate)
 Select list of objects in hierarchy. More...
 
cbe::QueryResult queryWithPath (std::string relativePath)
 Synchronous [exception] queryWithPath. More...
 
cbe::util::Optional< cbe::QueryResultqueryWithPath (std::string relativePath, queryWithPathError &error)
 Synchronous [non-throwing] queryWithPath. More...
 
cbe::QueryResult search (std::string tags, QueryDelegatePtr delegate)
 Search by tags. More...
 
cbe::QueryResult search (std::string tags)
 Synchronous [exception] search. More...
 
cbe::util::Optional< cbe::QueryResultsearch (std::string tags, SearchError &error)
 Synchronous [non-throwing] search. More...
 
cbe::QueryResult search (cbe::Filter filter, QueryDelegatePtr delegate)
 Search using filter. More...
 
cbe::QueryResult search (cbe::Filter)
 Synchronous [exception] search using filter. More...
 
cbe::util::Optional< cbe::QueryResultsearch (cbe::Filter filter, SearchError &error)
 Synchronous [non-throwing] search. More...
 
void setAcl (cbe::AclMap aclMap, SetAclDelegatePtr delegate)
 set ACL. More...
 
cbe::AclMap setAcl (cbe::AclMap aclMap)
 Synchronous [exception] setAcl. More...
 
cbe::util::Optional< cbe::AclMapsetAcl (cbe::AclMap aclMap, SetAclError &error)
 Synchronous [non-throwing] setAcl. More...
 
void getAcl (GetAclDelegatePtr delegate)
 Retrieves its ACL map. More...
 
cbe::AclMap getAcl ()
 Synchronous [exception] getAcl. More...
 
cbe::util::Optional< cbe::AclMapgetAcl (GetAclError &error)
 Synchronous [non-throwing] getAcl. More...
 
void share (cbe::UserId toUserGroup, std::string description, ShareDelegatePtr delegate)
 Make accessible by other user. More...
 
delegate::ShareDelegate::Success share (cbe::UserId toUserGroup, std::string description)
 Synchronous [exception] share. More...
 
cbe::util::Optional< delegate::ShareDelegate::Successshare (cbe::UserId toUserGroup, std::string description, ShareError &error)
 Synchronous [non-throwing] share. More...
 
void unShare (cbe::ShareId shareId, UnShareDelegatePtr delegate)
 Revoke a previous share. More...
 
delegate::UnShareDelegate::Success unShare (cbe::ShareId shareId)
 Synchronous [exception] unShare. More...
 
cbe::util::Optional< delegate::UnShareDelegate::SuccessunShare (cbe::ShareId shareId, UnShareError &error)
 Synchronous [non-throwing] unShare. More...
 
void publish (cbe::PublishAccess security, cbe::PublishVisibility privacy, std::string description, std::string password, PublishDelegatePtr delegate)
 Publishes a container and its content to any user. More...
 
delegate::PublishSuccess publish (cbe::PublishAccess security, cbe::PublishVisibility privacy, std::string description, std::string password)
 Synchronous [exception] publish. More...
 
cbe::util::Optional< delegate::PublishSuccesspublish (cbe::PublishAccess security, cbe::PublishVisibility privacy, std::string description, std::string password, PublishError &error)
 Synchronous [non-throwing] publish. More...
 
void unPublish (UnPublishDelegatePtr delegate)
 UnPublishes this container. More...
 
delegate::UnPublishSuccess unPublish ()
 Synchronous [exception] unPublish. More...
 
cbe::util::Optional< delegate::UnPublishSuccessunPublish (UnPublishError &error)
 Synchronous [non-throwing] unPublish. More...
 
void unSubscribe (UnSubscribeDelegatePtr delegate)
 UnSubscribes from this container. More...
 
delegate::UnSubscribeSuccess unSubscribe ()
 Synchronous [exception] unSubscribe. More...
 
cbe::util::Optional< delegate::UnSubscribeSuccessunSubscribe (UnSubscribeError &error)
 Synchronous [non-throwing] unSubscribe. More...
 
 Container (cbe::DefaultCtor)
 
- Public Member Functions inherited from cbe::Item
cbe::ShareIds getShareIds () const
 
cbe::ShareId getShareFromUserId (cbe::UserId userId)
 
cbe::UserId getUserFromShareId (cbe::UserId shareId)
 
std::string aclTag () const
 
std::string description () const
 
cbe::ItemId id () const
 
cbe::ContainerId parentId () const
 
cbe::ContainerId oldParentId () const
 
std::string name () const
 
std::string path () const
 
cbe::UserId ownerId () const
 
cbe::ContainerId driveId () const
 
std::string username () const
 
bool idLoaded () const
 
bool dataLoaded () const
 
cbe::Date created () const
 
cbe::Date updated () const
 
cbe::Date deleted () const
 
cbe::ItemType type () const
 
bool hasPublished () const
 
Publish getPublished () const
 
bool hasSubscribe () const
 
Subscribe getSubscribe () const
 
bool operator< (const cbe::Item &rh) const
 
AclMap aclMap () const
 
 operator bool () const
 Checks if the inherited instance is real. More...
 

Friends

class Account
 
class CloudBackend
 
class Database
 
class Filter
 
class Group
 
class QueryChain
 

Additional Inherited Members

- Protected Member Functions inherited from cbe::Item
 Item (std::shared_ptr< Impl > pImpl)
 
template<class ImplT >
ImplT & castImpl () const
 

Detailed Description

A collection of Item, can also represent a table or folder.

Member Typedef Documentation

◆ CreateContainerDelegatePtr

Pointer to cbe::delegate::CreateContainerDelegate that is passed into asynchronous version of method createContainer()

◆ CreateContainerException

See delegate::container::CreateContainerDelegate::Exception

◆ CreateContainerError

Forms the type of the error return parameter for the synchronous version of method createContainer()
See delegate::CreateContainerDelegate::ErrorInfo

◆ MoveDelegatePtr

Pointer to cbe::delegate::MoveDelegate that is passed into asynchronous version of method move()

◆ MoveException

◆ MoveError

Forms the type of the error return parameter for the synchronous version of method move()
See delegate::container::MoveDelegate::ErrorInfo

◆ RenameDelegatePtr

Pointer to cbe::delegate::container::RenameDelegate that is passed into asynchronous version of method rename()

◆ RenameException

◆ RenameError

Forms the type of the error return parameter for the synchronous version of method rename()
See delegate::container::RenameDelegate::ErrorInfo

◆ RemoveDelegatePtr

Pointer to cbe::delegate::RemoveDelegate that is passed into asynchronous version of method remove()

◆ RemoveException

◆ RemoveError

Forms the type of the error return parameter for the synchronous version of method remove()
See delegate::RemoveDelegate::ErrorInfo

◆ CreateObjectDelegatePtr

Pointer to cbe::delegate::CreateObjectDelegate that is passed into asynchronous version of method createObject()

◆ CreateObjectException

See delegate::object::CreateObjectDelegate::Exception

◆ CreateObjectError

Forms the type of the error return parameter for the synchronous version of method createObject()
See delegate::CreateObjectDelegate::ErrorInfo

◆ UploadDelegatePtr

◆ UploadException

◆ UploadError

◆ QueryDelegatePtr

Pointer to cbe::delegate::QueryDelegatePtr that is passed into asynchronous version of method query()

◆ QueryJoinDelegatePtr

Pointer to cbe::delegate::QueryJoinDelegate that is passed into asynchronous version of method query()

◆ QueryException

◆ QueryJoinError

◆ QueryError

◆ queryWithPathException

See delegate::object::queryWithPathDelegate::Exception

◆ queryWithPathError

Forms the type of the error return parameter for the synchronous version of method queryWithPath()
See delegate::queryWithPathDelegate::ErrorInfo

◆ SearchException

See delegate::container::QueryDelegate::Exception

◆ SearchError

Forms the type of the error return parameter for the synchronous version of method search()
See delegate::QueryDelegate::ErrorInfo

◆ SetAclDelegatePtr

Pointer to cbe::delegate::AclDelegate that is passed into asynchronous version of method setAcl()

◆ SetAclException

See delegate::object::AclDelegate::Exception

◆ SetAclError

Forms the type of the error return parameter for the synchronous version of method setAcl()
See delegate::AclDelegate::ErrorInfo

◆ GetAclDelegatePtr

Pointer to cbe::delegate::AclDelegate that is passed into asynchronous version of method getAcl()

◆ GetAclException

See delegate::container::AclDelegate::Exception

◆ GetAclError

Forms the type of the error return parameter for the synchronous version of method getAcl()
See delegate::AclDelegate::ErrorInfo

◆ ShareDelegatePtr

Pointer to cbe::delegate::ShareDelegate that is passed into asynchronous version of method share()

◆ ShareException

See delegate::container::ShareDelegate::Exception

◆ ShareError

Forms the type of the error return parameter for the synchronous version of method share()
See delegate::ShareDelegate::ErrorInfo

◆ UnShareDelegatePtr

Pointer to cbe::delegate::UnShareDelegate that is passed into asynchronous version of method unShare()

◆ UnShareException

See delegate::object::UnShareDelegate::Exception

◆ UnShareError

Forms the type of the error return parameter for the synchronous version of method unShare()
See delegate::UnShareDelegate::ErrorInfo

◆ PublishDelegatePtr

Pointer to cbe::delegate::PublishDelegate that is passed into asynchronous version of method publish()

◆ PublishException

See delegate::object::PublishDelegate::Exception

◆ PublishError

Forms the type of the error return parameter for the synchronous version of method publish()
See delegate::PublishDelegate::ErrorInfo

◆ UnPublishDelegatePtr

Pointer to cbe::delegate::UnPublishDelegatePtr that is passed into asynchronous version of method unPublish()

◆ UnPublishException

Pointer to cbe::delegate::UnPublishDelegate that is passed into asynchronous version of method unPublish() See delegate::object::UnPublishDelegate::Exception

◆ UnPublishError

Forms the type of the error return parameter for the synchronous version of method unPublish()
See delegate::UnPublishDelegate::ErrorInfo

◆ UnSubscribeDelegatePtr

◆ UnSubscribeException

See delegate::object::UnSubscribeDelegate::Exception

◆ UnSubscribeError

Forms the type of the error return parameter for the synchronous version of method unSubscribe()
See delegate::UnSubscribeDelegate::ErrorInfo

Member Function Documentation

◆ createContainer() [1/3]

cbe::Container cbe::Container::createContainer ( const std::string &  name,
CreateContainerDelegatePtr  delegate 
)

Create a container.

Creates a container inside this container to be used for adding objects.

Parameters
nameName of the container to be created.
delegatePointer to a delegate::CreateContainerDelegate instance that is implemented by the user.

◆ createContainer() [2/3]

cbe::Container cbe::Container::createContainer ( const std::string &  name)

Synchronous [exception] createContainer.

Synchronous version of createContainer(const std::string&, CreateContainerDelegatePtr), and throws an exception, CreateContainerException, in case of a failed call.
See createContainer(CreateContainerDelegatePtr)

Returns
Information about the createContainer object — if the call was successful.
See cbe::delegate::CreateContainerDelegate::Success
Exceptions
CreateContainerException

◆ createContainer() [3/3]

cbe::util::Optional<cbe::Container> cbe::Container::createContainer ( const std::string &  name,
CreateContainerError error 
)

Synchronous [non-throwing] createContainer.

Synchronous version of createContainer(const std::string&, CreateContainerDelegatePtr) , and throws no exception on error, instead the out/return parameter error is used to provide the error information in connection with a failed call.
See createContainer(const std::string& , CreateContainerDelegatePtr)

Parameters
[out]errorReturn parameter containing the error information in case of a failed call.
An empty return value will indicate failure, and the CreateContainerError object passed in will we be populated with the error information.
Returns
Empty — i.e., false — indicates a failed call, and the error information is passed out via the error out/return parameter.

◆ move() [1/3]

void cbe::Container::move ( cbe::ContainerId  dstId,
MoveDelegatePtr  delegate 
)

Move a container to a different parent.

Used to move container with its content to user specified location e.g., other container or to root container.

Parameters
dstIdid of the container to which it should be moved to.
delegatePointer to a delegate::container::MoveDelegate instance that is implemented by the user.

◆ move() [2/3]

cbe::Container cbe::Container::move ( cbe::ContainerId  dstId)

Synchronous [exception] move.

Synchronous version of move(cbe::ContainerId, MoveDelegatePtr) , and throws an exception, MoveException, in case of a failed call.
See move(MoveDelegatePtr)

Returns
Information about the moved object — if the call was successful.
See cbe::delegate::container::MoveDelegate::Success
Exceptions
MoveException

◆ move() [3/3]

cbe::util::Optional<cbe::Container> cbe::Container::move ( cbe::ContainerId  dstId,
MoveError error 
)

Synchronous [non-throwing] move.

Synchronous version of move(dstId, MoveDelegatePtr) , and throws no exception on error, instead the out/return parameter error is used to provide the error information in connection with a failed call.
See move(dstId, MoveDelegatePtr)

Parameters
[out]errorReturn parameter containing the error information in case of a failed call.
An empty return value will indicate failure, and the MoveError object passed in will we be populated with the error information.
Returns
Empty — i.e., false — indicates a failed call, and the error information is passed out via the error out/return parameter.

◆ rename() [1/3]

void cbe::Container::rename ( const std::string &  name,
RenameDelegatePtr  delegate 
)

Change the name of the container.

Rename the container.

Parameters
nameNew name of the container.
delegatePointer to a delegate::container::RenameDelegate instance that is implemented by the user.

◆ rename() [2/3]

cbe::Container cbe::Container::rename ( const std::string &  name)

Synchronous [exception] rename.

Synchronous version of rename(const std::string&, RenameDelegatePtr) , and throws an exception, RenameException, in case of a failed call.
See rename(RenameDelegatePtr)

Returns
Information about the renamed object — if the call was successful.
See cbe::delegate::container::RenameDelegate::Success
Exceptions
RenameException

◆ rename() [3/3]

cbe::util::Optional<cbe::Container> cbe::Container::rename ( const std::string &  name,
RenameError error 
)

Synchronous [non-throwing] rename.

Synchronous version of rename(name, RenameDelegatePtr) , and throws no exception on error, instead the out/return parameter error is used to provide the error information in connection with a failed call.
See rename(name, RenameDelegatePtr)

Parameters
[out]errorReturn parameter containing the error information in case of a failed call.
An empty return value will indicate failure, and the RenameError object passed in will we be populated with the error information.
Returns
Empty — i.e., false — indicates a failed call, and the error information is passed out via the error out/return parameter.

◆ remove() [1/3]

void cbe::Container::remove ( RemoveDelegatePtr  delegate)

Delete the container.

Removes/deletes the container and all its content.

Parameters
delegatePointer to a delegate::container::RemoveDelegate instance that is implemented by the user.

◆ remove() [2/3]

delegate::container::RemoveSuccess cbe::Container::remove ( )

Synchronous [exception] remove/delete.

Synchronous version of remove(RemoveDelegatePtr) , and throws an exception, RemoveException, in case of a failed call.
See remove(RemoveDelegatePtr)

Returns
Information about the removed object — if the call was successful.
See cbe::delegate::container::RemoveSuccess
Exceptions
RemoveException

◆ remove() [3/3]

Synchronous [non-throwing] remove/delete.

Synchronous version of remove(RemoveDelegatePtr) , and throws no exception on error, instead the out/return parameter error is used to provide the error information in connection with a failed call.
See remove(RemoveDelegatePtr)

Parameters
[out]errorReturn parameter containing the error information in case of a failed call.
An empty return value will indicate failure, and the RemoveError object passed in will we be populated with the error information.
Returns
Empty — i.e., false — indicates a failed call, and the error information is passed out via the error out/return parameter.

◆ createObject() [1/4]

cbe::Object cbe::Container::createObject ( std::string  name,
cbe::KeyValues  keyValues,
CreateObjectDelegatePtr  delegate 
)

Create a new object.

Creates an object with indexed tags or indexed tags + non indexed tags a.k.a. metadata, key/value pairs.

Parameters
nameName of the object.
keyValuesOptional map of key/value pairs (metadata).
delegatePointer to a delegate::CreateObjectDelegate instance that is implemented by the user.
Note
If an old object with the same name already exists that will be removed.
The object name may not contain characters < & : /
Any key name must start with a letter or _
The following key names are reserved and should not be used: category, content, id, link and date
Key names are case sensitive, hence variations with uppercase are permitted.

◆ createObject() [2/4]

cbe::Object cbe::Container::createObject ( std::string  name,
CreateObjectDelegatePtr  delegate 
)

Same as createObject(std::string, cbe::KeyValues, CreateObjectDelegatePtr), but without the keyValues parameter.

◆ createObject() [3/4]

cbe::Object cbe::Container::createObject ( std::string  name,
cbe::KeyValues  keyValues 
)

Synchronous [exception] createObject.

Synchronous version of createObject(std::string, cbe::KeyValues, CreateObjectDelegatePtr) , and throws an exception, CreateObjectException, in case of a failed call.
See createObject(CreateObjectDelegatePtr)

Returns
Information about the created object — if the call was successful.
See cbe::delegate::CreateContainerDelegate::Success
Exceptions
CreateObjectException

◆ createObject() [4/4]

cbe::util::Optional<cbe::Object> cbe::Container::createObject ( std::string  name,
cbe::KeyValues  keyValues,
CreateObjectError error 
)

Synchronous [non-throwing] createObject.

Synchronous version of createObject(name, keyValues, CreateObjectDelegatePtr) , and throws no exception on error, instead the out/return parameter error is used to provide the error information in connection with a failed call.
See createObject(name, keyValues, CreateObjectDelegatePtr)

Parameters
[out]errorReturn parameter containing the error information in case of a failed call.
An empty return value will indicate failure, and the CreateObjectError object passed in will we be populated with the error information.
Returns
Empty — i.e., false — indicates a failed call, and the error information is passed out via the error out/return parameter.

◆ upload() [1/15]

cbe::Object cbe::Container::upload ( const std::string &  filePath,
UploadDelegatePtr  delegate 
)

Upload object to container with file given by filePath.

See upload(const std::string&,const std::string& path,UploadDelegatePtr)

Parameters
filePathFully qualified file name. I.e., the path, relative or absolute, including file name.

Example
Async creation of a cbe::Object by using Container::upload()
#include "cbe/Object.h"
#include "cbe/Container.h"
#include "cbe/delegate/UploadDelegate.h"
#include <condition_variable>
#include <fstream> // std::ofstream
#include <mutex>
~~~
struct MyUploadDelegate : cbe::delegate::UploadDelegate {
std::mutex mutex{};
std::condition_variable conditionVariable{};
// Indicates operation completed - success or failure
bool called{};
// Default construct the result object. If the method
// onUploadSuccess() has not been called, this default constructed state
// implies that the object is not valid
void onUploadSuccess(cbe::Object&& object) final {
{
std::lock_guard<std::mutex> lock{mutex};
// Change state of object member to indicate success
this->object = std::move(object);
// Indicate operation completed, member object indicates success
called = true;
}
conditionVariable.notify_one();
}
void onUploadError(cbe::delegate::TransferError&& transferError,
cbe::util::Context&& context) final {
{
std::lock_guard<std::mutex> lock{mutex};
// Put object into the default constructed state to indicate no-success
// Indicate operation completed, member object indicates failure
called = true;
}
conditionVariable.notify_one();
}
cbe::Object waitForRsp() {
std::unique_lock<std::mutex> lock{mutex};
conditionVariable.wait(lock, [this]{ return called; });
// Reset called flag, so current delegate instance can be reused
called = false;
// If object is still in its default constructed state, this implies a
// failed cbe::object::upload() operation
return object;
}
}; // struct MyUploadDelegate
~~~
constexpr const char* const uploadPath = "/tmp/upload/";
constexpr const char* const myObjectFileName = "myObject";
const std::string qualFile1Name =
std::string{uploadPath} + myObjectFileName;
std::ofstream ofs{qualFile1Name};
ofs << "Line 11\n" << "Line 12\n" << "Line 13\n" << std::flush;
ofs.close();
// Access container previously created with cbe::Container::createContainer()
cbe::Container myContainer = ~~~;
std::shared_ptr<MyUploadDelegate> myUploadDelegate =
std::make_shared<MyUploadDelegate>();
// Create an object named after file name in variable qualFile1Name
myContainer.upload(qualFile1Name, myUploadDelegate);
// Continuously, use the Object instance passed into the delegate.
cbe::Object object = myUploadDelegate->waitForRsp();
// Check if upload was successful
if (!object) {
// Not, bail out
~~~
// }
~~~
A collection of Item, can also represent a table or folder.
Definition: Container.h:63
cbe::Object upload(const std::string &filePath, UploadDelegatePtr delegate)
Upload object to container with file given by filePath.
Holder of a set of data, can represent a table row.
Definition: Object.h:64
Definition: TransferError.h:18
Definition: UploadDelegate.h:28
DefaultCtor
Default constructor marker.
Definition: Types.h:204
Definition: Context.h:11
Continues at: Async retrieving the Stream attached to a cbe::Object with the Object::getStreams()"

◆ upload() [2/15]

cbe::Object cbe::Container::upload ( const std::string &  name,
const std::string &  path,
UploadDelegatePtr  delegate 
)

Create an object in current container by uploading a file.

Object is named by name, residing at path.

The object being created is instantly returned with a temporary id. When the response is retrieved from from the server, via callback method onUploadSuccess() the object will be updated with its final unique id.

Parameters
nameName of local file name. The object, that is created, will be given the same name.
pathPath to local folder where the file is located. The can be relative or absolute and must end with a slash (/).
delegatePointer to a delegate::UploadDelegate instance that is implemented by the user.
Returns
The created Object, first with its temporary id, and after successful with is final id.

◆ upload() [3/15]

cbe::Object cbe::Container::upload ( const std::string &  name,
std::uint64_t  length,
const char *  byteData,
UploadDelegatePtr  delegate 
)

Upload from local memory to an object.

Parameters
namename that the uploaded object will get
lengthsize of file in Bytes
byteData(char pointer to an array containing the data).
delegatePointer to a delegate::UploadDelegate instance that is implemented by the user.

◆ upload() [4/15]

cbe::Object cbe::Container::upload ( const std::string &  filePath,
delegate::ProgressEventFn &&  progressEventFn 
)

Synchronous [exception] upload.

Synchronous version of upload(const std::string&,UploadDelegatePtr) , and throws an exception, UploadException, in case of a failed call.
See upload(const std::string&,UploadDelegatePtr)

Parameters
progressEventFnCallback function that is called for each memory chunk uploaded.
The callback function will be executed the calling thread's context.
Also see cbe::delegate::ProgressEventFn.
For the other parameters, see upload(const std::string&,UploadDelegatePtr)
Returns
The uploaded and created object — if the call was successful.
Exceptions
UploadException
Example
Sync [exception] creation of a cbe::Object by using Container::upload()
#include "cbe/Object.h"
#include "cbe/Container.h"
#include <condition_variable>
#include <fstream> // std::ofstream
#include <mutex>
~~~
constexpr const char* const uploadPath = "/tmp/upload/";
constexpr const char* const myObjectFileName = "myObject";
const std::string qualFile1Name =
std::string{uploadPath} + myObjectFileName;
std::ofstream ofs{qualFile1Name};
ofs << "Line 11\n" << "Line 12\n" << "Line 13\n" << std::flush;
ofs.close();
// Access container previously created with cbe::Container::createContainer()
cbe::Container myContainer = ~~~;
// Create an object named after file name in variable qualFile1Name
try
{
myContainer.upload(qualFile1Name);
}
{
std::cout << "Error!" << std::endl << e.what() << std::endl;
~~~
}
~~~
exception thrown by cbe::Container::upload(const std::string&,const std::string&) and its overloads i...
Definition: UploadDelegate.h:68
Continues at: Sync exception example of retrieving the Stream attached to a cbe::Object with the Object::getStreams()"

◆ upload() [5/15]

cbe::Object cbe::Container::upload ( const std::string &  filePath)

Synchronous [exception] upload.

Same as upload(const std::string&,delegate::ProgressEventFn&&), but without the parameter, progressEventFn.

◆ upload() [6/15]

cbe::Object cbe::Container::upload ( const std::string &  name,
const std::string &  path,
delegate::ProgressEventFn &&  progressEventFn 
)

Synchronous [exception] upload with progress.

Synchronous version of upload(const std::string&,const std::string&,UploadDelegatePtr) , and throws an exception, UploadException, in case of a failed call.
See upload(const std::string&,const std::string&,UploadDelegatePtr)

Parameters
progressEventFnSee upload(const std::string&,delegate::ProgressEventFn&&).
For the other parameters, see upload(const std::string&,UploadDelegatePtr)
Returns
The uploaded and created object — if the call was successful.
Exceptions
UploadException

◆ upload() [7/15]

cbe::Object cbe::Container::upload ( const std::string &  name,
const std::string &  path 
)

Synchronous [exception] upload.

Same as upload(const std::string&, const std::string&, delegate::ProgressEventFn&&, UploadError&) , but without the parameter, progressEventFn.

◆ upload() [8/15]

cbe::Object cbe::Container::upload ( const std::string &  name,
std::uint64_t  length,
const char *  byteData,
delegate::ProgressEventFn &&  progressEventFn 
)

Synchronous [exception] upload from memory with progress.

Synchronous version of upload(const std::string&,std::uint64_t,const char*,UploadDelegatePtr) , and throws an exception, UploadException, in case of a failed call.
See upload(const std::string&,std::uint64_t,const char*,UploadDelegatePtr)

Parameters
progressEventFnSee upload(const std::string&,delegate::ProgressEventFn&&).
For the other parameters, see upload(const std::string&,UploadDelegatePtr)
Returns
The uploaded and created object — if the call was successful.
Exceptions
UploadException

◆ upload() [9/15]

cbe::Object cbe::Container::upload ( const std::string &  name,
std::uint64_t  length,
const char *  byteData 
)

Synchronous [exception] upload from memory.

Same as upload(const std::string&,std::uint64_t,const char*,delegate::ProgressEventFn&&) , but without the parameter, progressEventFn.

◆ upload() [10/15]

cbe::util::Optional<cbe::Object> cbe::Container::upload ( const std::string &  filePath,
delegate::ProgressEventFn &&  progressEventFn,
UploadError error 
)

Synchronous [non-throwing] upload with progress.

Similar to synchronous method upload(const std::string&,delegate::ProgressEventFn&&) , but throws no exception on error, instead the out/return parameter error is used to provide the error information in connection with a failed call.
See upload(const std::string&,delegate::ProgressEventFn&&)

Parameters
[out]errorReturn parameter containing the error information in case of a failed call.
An empty return value will indicate failure, and the UploadError object passed in will we be populated with the error information.
For the other parameters, see upload(const std::string&,delegate::ProgressEventFn&&)
Returns
Empty — i.e., false — indicates a failed call, and the error information is passed out via the error out/return parameter.

Example
Sync [non-throwing] creation of a cbe::Object by using Container::upload()
#include "cbe/Object.h"
#include "cbe/Container.h"
#include <condition_variable>
#include <fstream> // std::ofstream
#include <mutex>
~~~
constexpr const char* const uploadPath = "/tmp/upload/";
constexpr const char* const myObjectFileName = "myObject";
const std::string qualFile1Name =
std::string{uploadPath} + myObjectFileName;
std::ofstream ofs{qualFile1Name};
ofs << "Line 11\n"
<< "Line 12\n"
<< "Line 13\n"
<< std::flush;
ofs.close();
// Access container previously created with cbe::Container::createContainer()
cbe::Container myContainer = ~~~;
// Create an object named after file name in variable qualFile1Name
myObject = *myContainer.upload(qualFile1Name, uploadError);
if (uploadError) {
std::cout << "Error! " << uploadError << std::endl;
~~~
}
~~~
Definition: UploadDelegate.h:57
Continues at: Sync [non-throwing] retrieving the Stream attached to a cbe::Object with the Object::getStreams()"

◆ upload() [11/15]

cbe::util::Optional<cbe::Object> cbe::Container::upload ( const std::string &  filePath,
UploadError error 
)

Synchronous [non-throwing] upload.

Same as upload(const std::string&,delegate::ProgressEventFn&&,UploadError&) , but without the parameter, progressEventFn.

◆ upload() [12/15]

cbe::util::Optional<cbe::Object> cbe::Container::upload ( const std::string &  name,
const std::string &  path,
delegate::ProgressEventFn &&  progressEventFn,
UploadError error 
)

Synchronous [non-throwing] upload with progress.

Similar to synchronous method upload(const std::string&,const std::string&,delegate::ProgressEventFn&&) , but throws no exception on error, instead the out/return parameter error is used to provide the error information in connection with a failed call.
See upload(const std::string&, const std::string&, delegate::ProgressEventFn&&)

Parameters
[out]errorSee upload(const std::string&, delegate::ProgressEventFn&&, UploadError&).
For the other parameters, see upload(const std::string&, const std::string&, delegate::ProgressEventFn&&)
Returns
See upload(const std::string&, delegate::ProgressEventFn&&, UploadError&)

◆ upload() [13/15]

cbe::util::Optional<cbe::Object> cbe::Container::upload ( const std::string &  name,
const std::string &  path,
UploadError error 
)

Synchronous [non-throwing] upload.

Same as upload(const std::string&, const std::string&, delegate::ProgressEventFn&&, UploadError&) , but without the parameter, progressEventFn.

◆ upload() [14/15]

cbe::util::Optional<cbe::Object> cbe::Container::upload ( const std::string &  name,
std::uint64_t  length,
const char *  byteData,
delegate::ProgressEventFn &&  progressEventFn,
UploadError error 
)

Synchronous [non-throwing] upload from memory with progress.

Similar to synchronous method upload(const std::string&, std::uint64_t, const char*, delegate::ProgressEventFn&&) , but throws no exception on error, instead the out/return parameter error is used to provide the error information in connection with a failed call.
See upload(const std::string&, std::uint64_t, const char*, delegate::ProgressEventFn&&)

Parameters
[out]errorSee upload(const std::string&, delegate::ProgressEventFn&&, UploadError&).
Returns
See upload(const std::string&, delegate::ProgressEventFn&&, UploadError&)

◆ upload() [15/15]

cbe::util::Optional<cbe::Object> cbe::Container::upload ( const std::string &  name,
std::uint64_t  length,
const char *  byteData,
UploadError error 
)

Synchronous [non-throwing] upload from memory.

Same as upload(const std::string&, std::uint64_t, const char*, delegate::ProgressEventFn&&, UploadError&) , but without the parameter, progressEventFn.

◆ query() [1/8]

cbe::QueryChain cbe::Container::query ( QueryDelegatePtr  queryDelegate)

Select list of objects.

In line with function CloudBackend::query(ContainerId, QueryDelegatePtr), but with its ContainerId parameter excluded.

See also
CloudBackend::query(ContainerId, QueryDelegatePtr)

◆ query() [2/8]

cbe::QueryChain cbe::Container::query ( Filter  filter,
QueryDelegatePtr  delegate 
)

Select list of objects using filter.

In line with function CloudBackend::query(ContainerId, Filter, QueryDelegatePtr), but with its ContainerId parameter excluded.

See also
CloudBackend::query(ContainerId, Filter, QueryDelegatePtr)

◆ query() [3/8]

cbe::QueryChainExt cbe::Container::query ( delegate::QueryJoinDelegatePtr  delegate)

Select list of objects, for join.

In line with function CloudBackend::query(ContainerId, delegate::QueryJoinDelegatePtr), but with its ContainerId parameter excluded.

See also
CloudBackend::query(ContainerId, delegate::QueryJoinDelegatePtr)

◆ query() [4/8]

cbe::QueryChainExt cbe::Container::query ( Filter  filter,
delegate::QueryJoinDelegatePtr  delegate 
)

Select list of objects using filter, for join.

In line with function CloudBackend::query(ContainerId, Filter, delegate::QueryJoinDelegatePtr), but with its ContainerId parameter excluded.

See also
CloudBackend::query(ContainerId, Filter, delegate::QueryJoinDelegatePtr)

◆ query() [5/8]

cbe::QueryChainSync cbe::Container::query ( )

Synchronous [exception] Select list of objects.

In line with function CloudBackend::query(ContainerId), but with its ContainerId parameter excluded.

See also
CloudBackend::query(ContainerId)
Exceptions
QueryException

◆ query() [6/8]

cbe::QueryChainSync cbe::Container::query ( Filter  filter)

Synchronous [exception] Select list of objects using filter.

In line with function CloudBackend::query(ContainerId, Filter), but with its ContainerId parameter excluded.

See also
CloudBackend::query(ContainerId, Filter)
Exceptions
QueryException

◆ query() [7/8]

cbe::QueryChainSync cbe::Container::query ( QueryJoinError error)

Synchronous [non-throwing] Select list of objects, for join.

In line with function CloudBackend::query(ContainerId, QueryJoinError&), but with its ContainerId parameter excluded.

See also
CloudBackend::query(ContainerId, QueryJoinError&)

◆ query() [8/8]

cbe::QueryChainSync cbe::Container::query ( Filter  filter,
QueryJoinError error 
)

Synchronous [non-throwing] Select list of objects using filter, for join.

In line with function CloudBackend::query(ContainerId, Filter, QueryJoinError&), but with its ContainerId parameter excluded.

See also
CloudBackend::query(ContainerId, Filter, QueryJoinError&)

◆ queryWithPath() [1/3]

cbe::QueryChain cbe::Container::queryWithPath ( std::string  relativePath,
QueryDelegatePtr  delegate 
)

Select list of objects in hierarchy.

Pointer to cbe::delegate::queryWithPathDelegate that is passed into asynchronous version of method queryWithPath()

Queries the container with a given relative path, returns container with objects.
E.g. /Documents/Pictures will return objects and subContainers for Pictures.

Note
.. or . path options are not available, top down Paths in the container tree are available.
Parameters
relativePathcontainer path, e.g. /Documents/Pictures
delegatePointer to a delegate::QueryDelegate instance that is implemented by the user.

◆ queryWithPath() [2/3]

cbe::QueryResult cbe::Container::queryWithPath ( std::string  relativePath)

Synchronous [exception] queryWithPath.

Synchronous version of queryWithPath(relativePath, queryWithPathDelegatePtr) , and throws an exception, queryWithPathException, in case of a failed call.
See queryWithPath(queryWithPathDelegatePtr)

Returns
Information about the query — if the call was successful.
See cbe::delegate::queryWithPathSuccess
Exceptions
queryWithPathException

◆ queryWithPath() [3/3]

cbe::util::Optional<cbe::QueryResult> cbe::Container::queryWithPath ( std::string  relativePath,
queryWithPathError error 
)

Synchronous [non-throwing] queryWithPath.

Synchronous version of queryWithPath(relativePath, queryWithPathDelegatePtr) , and throws no exception on error, instead the out/return parameter error is used to provide the error information in connection with a failed call.
See queryWithPath(relativePath, queryWithPathDelegatePtr)

Parameters
[out]errorReturn parameter containing the error information in case of a failed call.
An empty return value will indicate failure, and the queryWithPathError object passed in will we be populated with the error information.
Returns
Empty — i.e., false — indicates a failed call, and the error information is passed out via the error out/return parameter.

◆ search() [1/6]

cbe::QueryResult cbe::Container::search ( std::string  tags,
QueryDelegatePtr  delegate 
)

Search by tags.

Pointer to cbe::delegate::QueryDelegate that is passed into asynchronous version of method search()

Search the whole container for tags related to Objects in the container structure.
E.g. Key = Name, Value Contract/Object/Song => Name:Contract1.

Search handles tags in combination of conjunctions of keys and/or key values separated by |.
E.g. Name:*|Country:Sweden|Country:Norway, this would search for objects with key Name of any value and where key Country is either Sweden or Norway.

Parameters
tagsis a string of key tags or key:value pairs that are separated by |.
delegatePointer to a delegate::QueryDelegate instance that is implemented by the user.

◆ search() [2/6]

cbe::QueryResult cbe::Container::search ( std::string  tags)

Synchronous [exception] search.

Synchronous version of search(std::string, QueryDelegatePtr) , and throws an exception, SearchException, in case of a failed call.
See search(QueryDelegatePtr)

Returns
Information about the search — if the call was successful.
See cbe::cbe::QueryResult
Exceptions
SearchException

◆ search() [3/6]

cbe::util::Optional<cbe::QueryResult> cbe::Container::search ( std::string  tags,
SearchError error 
)

Synchronous [non-throwing] search.

Synchronous version of search(tags, QueryDelegatePtr) , and throws no exception on error, instead the out/return parameter error is used to provide the error information in connection with a failed call.
See search(tags, QueryDelegatePtr)

Parameters
[out]errorReturn parameter containing the error information in case of a failed call.
An empty return value will indicate failure, and the SearchError object passed in will we be populated with the error information.
Returns
Empty — i.e., false — indicates a failed call, and the error information is passed out via the error out/return parameter.

◆ search() [4/6]

cbe::QueryResult cbe::Container::search ( cbe::Filter  filter,
QueryDelegatePtr  delegate 
)

Search using filter.

Search the whole container with sub-containers related to Objects in the container hierarchy structure.
E.g. Key = Name, Value Contract/Object/Song => Name:Contract1.

Search handles tags in combination / conjunction of keys and/or key values separated by |.
E.g. Name:*|Country:Sweden|Country:Norway, this would search for objects with key Name of any value and where key Country is either Sweden or Norway.

Parameters
filteris a cbe::Filter on which you can set how you want data to be ordered when searching.
Remember to set the queryString to be keys/tags or key:value pairs that are separated by |.
delegatePointer to a delegate::QueryDelegate instance that is implemented by the user.

◆ search() [5/6]

cbe::QueryResult cbe::Container::search ( cbe::Filter  )

Synchronous [exception] search using filter.

Pointer to cbe::delegate::SearchDelegate that is passed into asynchronous version of method search()

Synchronous version of search(cbe::Filter, SearchDelegatePtr) , and throws an exception, SearchException, in case of a failed call.
See search(cbe::Filter, SearchDelegatePtr)

Returns
Information about the searched object — if the call was successful.
See cbe::cbe::QueryResult
Exceptions
SearchException

◆ search() [6/6]

cbe::util::Optional<cbe::QueryResult> cbe::Container::search ( cbe::Filter  filter,
SearchError error 
)

Synchronous [non-throwing] search.

Synchronous version of search(filter, SearchDelegatePtr) , and throws no exception on error, instead the out/return parameter error is used to provide the error information in connection with a failed call.
See search(filter, SearchDelegatePtr)

Parameters
[out]errorReturn parameter containing the error information in case of a failed call.
An empty return value will indicate failure, and the SearchError object passed in will we be populated with the error information.
Returns
Empty — i.e., false — indicates a failed call, and the error information is passed out via the error out/return parameter.

◆ setAcl() [1/3]

void cbe::Container::setAcl ( cbe::AclMap  aclMap,
SetAclDelegatePtr  delegate 
)

set ACL.

Set the Access Control List ACL for the container. For containers set does set the whole container tree, so all its sub items as well. Remember this is set and not update so every time you set all ids that should be there should be added.

Parameters
aclMapThe desired permissions for current container.
delegatePointer to a delegate::AclDelegate instance that is implemented by the user.

◆ setAcl() [2/3]

cbe::AclMap cbe::Container::setAcl ( cbe::AclMap  aclMap)

Synchronous [exception] setAcl.

Synchronous version of setAcl(cbe::AclMap, SetAclDelegatePtr) , and throws an exception, SetAclException, in case of a failed call.
See setAcl(SetAclDelegatePtr)

Returns
Information about the shared object — if the call was successful.
See cbe::delegate::AclDelegate::Success
Exceptions
SetAclException

◆ setAcl() [3/3]

cbe::util::Optional<cbe::AclMap> cbe::Container::setAcl ( cbe::AclMap  aclMap,
SetAclError error 
)

Synchronous [non-throwing] setAcl.

Synchronous version of setAcl(aclMap, SetAclDelegatePtr) , and throws no exception on error, instead the out/return parameter error is used to provide the error information in connection with a failed call.
See setAcl(aclMap, SetAclDelegatePtr)

Parameters
[out]errorReturn parameter containing the error information in case of a failed call.
An empty return value will indicate failure, and the SetAclError object passed in will we be populated with the error information.
Returns
Empty — i.e., false — indicates a failed call, and the error information is passed out via the error out/return parameter.

◆ getAcl() [1/3]

void cbe::Container::getAcl ( GetAclDelegatePtr  delegate)

Retrieves its ACL map.

get the Access Control List ACL of the Container.

Parameters
delegatePointer to a delegate::AclDelegate instance that is implemented by the user.

◆ getAcl() [2/3]

cbe::AclMap cbe::Container::getAcl ( )

Synchronous [exception] getAcl.

Synchronous version of getAcl(GetAclDelegatePtr) , and throws an exception, GetAclException, in case of a failed call.
See getAcl(GetAclDelegatePtr)

Returns
Information about the shared object — if the call was successful.
See cbe::delegate::AclDelegate::Success
Exceptions
GetAclException

◆ getAcl() [3/3]

cbe::util::Optional<cbe::AclMap> cbe::Container::getAcl ( GetAclError error)

Synchronous [non-throwing] getAcl.

Synchronous version of getAcl(GetAclDelegatePtr) , and throws no exception on error, instead the out/return parameter error is used to provide the error information in connection with a failed call.
See getAcl(GetAclDelegatePtr)

Parameters
[out]errorReturn parameter containing the error information in case of a failed call.
An empty return value will indicate failure, and the GetAclError object passed in will we be populated with the error information.
Returns
Empty — i.e., false — indicates a failed call, and the error information is passed out via the error out/return parameter.

◆ share() [1/3]

void cbe::Container::share ( cbe::UserId  toUserGroup,
std::string  description,
ShareDelegatePtr  delegate 
)

Make accessible by other user.

Shares a container and its content to a user. This provides the user the ability to access what has been shared to them via the listAvailableShares command. To allow users to view and change shared information see ACL .

Note
At present Sharing the container gives the user read permissions for the container and all its sub-items, this might change in the future.
Parameters
toUserGrouptakes a user id or group id to share to.
descriptionnames the specific share between you and the user/group.
delegatePointer to a delegate::ShareDelegate instance that is implemented by the user.

◆ share() [2/3]

delegate::ShareDelegate::Success cbe::Container::share ( cbe::UserId  toUserGroup,
std::string  description 
)

Synchronous [exception] share.

Synchronous version of share(cbe::UserId, std::string, ShareDelegatePtr) , and throws an exception, ShareException, in case of a failed call.
See share(ShareDelegatePtr)

Returns
Information about the shared container — if the call was successful.
See cbe::delegate::ShareDelegate::Success
Exceptions
ShareException

◆ share() [3/3]

cbe::util::Optional<delegate::ShareDelegate::Success> cbe::Container::share ( cbe::UserId  toUserGroup,
std::string  description,
ShareError error 
)

Synchronous [non-throwing] share.

Synchronous version of share(toUserGroup, description, ShareDelegatePtr) , and throws no exception on error, instead the out/return parameter error is used to provide the error information in connection with a failed call.
See share(toUserGroup, description, ShareDelegatePtr)

Parameters
[out]errorReturn parameter containing the error information in case of a failed call.
An empty return value will indicate failure, and the ShareError object passed in will we be populated with the error information.
Returns
Empty — i.e., false — indicates a failed call, and the error information is passed out via the error out/return parameter.

◆ unShare() [1/3]

void cbe::Container::unShare ( cbe::ShareId  shareId,
UnShareDelegatePtr  delegate 
)

Revoke a previous share.

unShare the container to a specific shareId created when sharing. Each share is unique between user/group and the one sharing. This is represented with a unique share id.

Parameters
shareIdis as mentioned the unique id for a share between the owner and other user/group.
delegatePointer to a delegate::UnShareDelegate instance that is implemented by the user.

◆ unShare() [2/3]

delegate::UnShareDelegate::Success cbe::Container::unShare ( cbe::ShareId  shareId)

Synchronous [exception] unShare.

Synchronous version of unShare(UnShareDelegatePtr) , and throws an exception, UnShareException, in case of a failed call.
See unShare(UnShareDelegatePtr)

Returns
Information about the unshared object — if the call was successful.
See cbe::delegate::UnShareSuccess
Exceptions
UnShareException

◆ unShare() [3/3]

cbe::util::Optional<delegate::UnShareDelegate::Success> cbe::Container::unShare ( cbe::ShareId  shareId,
UnShareError error 
)

Synchronous [non-throwing] unShare.

Synchronous version of unShare(UnShareDelegatePtr) , and throws no exception on error, instead the out/return parameter error is used to provide the error information in connection with a failed call.
See unShare(UnShareDelegatePtr)

Parameters
[out]errorReturn parameter containing the error information in case of a failed call.
An empty return value will indicate failure, and the UnShareError object passed in will we be populated with the error information.
Returns
Empty — i.e., false — indicates a failed call, and the error information is passed out via the error out/return parameter.

◆ publish() [1/3]

void cbe::Container::publish ( cbe::PublishAccess  security,
cbe::PublishVisibility  privacy,
std::string  description,
std::string  password,
PublishDelegatePtr  delegate 
)

Publishes a container and its content to any user.

Asynchronous version of this service function.

Can be revoked with unPublish()

Parameters
securityA cbe::PublishAccess enum
privacyA cbe::PublishVisibility enum
descriptionFree text
passwordPassword
delegatePointer to a delegate::PublishDelegate instance that is implemented by the user.

◆ publish() [2/3]

delegate::PublishSuccess cbe::Container::publish ( cbe::PublishAccess  security,
cbe::PublishVisibility  privacy,
std::string  description,
std::string  password 
)

Synchronous [exception] publish.

Synchronous version of publish(cbe::PublishAccess, cbe::PublishVisibility, std::string, std::string, PublishDelegatePtr) , and throws an exception, PublishException, in case of a failed call.
See publish(PublishDelegatePtr)

Returns
Information about the published object — if the call was successful.
See cbe::delegate::PublishSuccess
Exceptions
PublishException

◆ publish() [3/3]

cbe::util::Optional<delegate::PublishSuccess> cbe::Container::publish ( cbe::PublishAccess  security,
cbe::PublishVisibility  privacy,
std::string  description,
std::string  password,
PublishError error 
)

Synchronous [non-throwing] publish.

Synchronous version of publish(security, privacy, description, password, PublishDelegatePtr) , and throws no exception on error, instead the out/return parameter error is used to provide the error information in connection with a failed call.
See publish(security, privacy, description, password, PublishDelegatePtr)

Parameters
[out]errorReturn parameter containing the error information in case of a failed call.
An empty return value will indicate failure, and the PublishError object passed in will we be populated with the error information.
Returns
Empty — i.e., false — indicates a failed call, and the error information is passed out via the error out/return parameter.

◆ unPublish() [1/3]

void cbe::Container::unPublish ( UnPublishDelegatePtr  delegate)

UnPublishes this container.

Asynchronous version of this service function.

Revokes previous publish().

Parameters
delegateGets notified when the container has been unPublished (or if there was an error)

◆ unPublish() [2/3]

delegate::UnPublishSuccess cbe::Container::unPublish ( )

Synchronous [exception] unPublish.

Synchronous version of unPublish(UnPublishDelegatePtr) , and throws an exception, UnPublishException, in case of a failed call.
See unPublish(UnPublishDelegatePtr)

Returns
Information about the unPublished object — if the call was successful.
See cbe::delegate::UnPublishSuccess
Exceptions
UnPublishException

◆ unPublish() [3/3]

cbe::util::Optional<delegate::UnPublishSuccess> cbe::Container::unPublish ( UnPublishError error)

Synchronous [non-throwing] unPublish.

Synchronous version of unPublish(UnPublishDelegatePtr) , and throws no exception on error, instead the out/return parameter error is used to provide the error information in connection with a failed call.
See unPublish(UnPublishDelegatePtr)

Parameters
[out]errorReturn parameter containing the error information in case of a failed call.
An empty return value will indicate failure, and the UnPublishError object passed in will we be populated with the error information.
Returns
Empty — i.e., false — indicates a failed call, and the error information is passed out via the error out/return parameter.

◆ unSubscribe() [1/3]

void cbe::Container::unSubscribe ( UnSubscribeDelegatePtr  delegate)

UnSubscribes from this container.

Asynchronous version of this service function.

Revokes the subscription previously established with cbe::SubscribeManager::subscribe()

Parameters
delegateGets notified when the container has been unSubscribed (or if there was an error)

◆ unSubscribe() [2/3]

delegate::UnSubscribeSuccess cbe::Container::unSubscribe ( )

Synchronous [exception] unSubscribe.

Synchronous version of unSubscribe(UnSubscribeDelegatePtr) , and throws an exception, UnSubscribeException, in case of a failed call.
See unSubscribe(UnSubscribeDelegatePtr)

Returns
Information about the unSubscribe object — if the call was successful.
See cbe::delegate::UnSubscribeSuccess
Exceptions
UnSubscribeException

◆ unSubscribe() [3/3]

cbe::util::Optional<delegate::UnSubscribeSuccess> cbe::Container::unSubscribe ( UnSubscribeError error)

Synchronous [non-throwing] unSubscribe.

Synchronous version of unSubscribe(UnSubscribeDelegatePtr) , and throws no exception on error, instead the out/return parameter error is used to provide the error information in connection with a failed call.
See unSubscribe(UnSubscribeDelegatePtr)

Parameters
[out]errorReturn parameter containing the error information in case of a failed call.
An empty return value will indicate failure, and the UnSubscribeError object passed in will we be populated with the error information.
Returns
Empty — i.e., false — indicates a failed call, and the error information is passed out via the error out/return parameter.

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