public interface DirectoryInventory
Modifier and Type | Method and Description |
---|---|
CompletionStage<Directory> |
createDirectory(DirectoryParameters parameters,
String... acknowledgements)
Creates a directory according to the specified parameters.
|
CompletionStage<Void> |
deleteDirectory(String path,
boolean deleteDevices,
String... acknowledgements)
Deletes the directory with the specified path.
|
PageIterator<Directory> |
directories(Filter filter,
int pageSize)
Returns a list of directories matching the specified filter, divided into pages.
|
PageIterator<Directory> |
directories(int pageSize)
Returns a list of all directories, divided into pages.
|
CompletionStage<Integer> |
directoriesCount(Filter filter)
Returns the number of directories matching the given filter.
|
CompletionStage<Directory> |
directory(String path)
Returns the directory with the specified path.
|
com.bosch.iot.dm.util.PageIterator<Subscription<List<DirectoryEvent.Type>>> |
directoryEventSubscriptions(int pageSize)
Returns a list of directory event subscriptions grouped in pages.
|
CompletionStage<Void> |
moveDevice(String deviceId,
String targetParentPath,
String... acknowledgements)
Moves the device with the specified id to the parent directory with the specified path.
|
CompletionStage<Void> |
moveDirectory(String path,
String targetParentPath,
String... acknowledgements)
Moves the directory with the specified path to the parent directory with the specified path.
|
CompletionStage<Directory> |
root()
Returns the root directory of the directory tree.
|
void |
subscribeForDirectoryEvents(List<DirectoryEvent.Type> types,
StreamConsumer<DirectoryEvent> consumer)
Subscribe for
Directory events. |
CompletionStage<Void> |
subscribeForDirectoryEvents(String subscriptionId,
List<DirectoryEvent.Type> types,
Target target)
Subscribe for
Directory events. |
CompletionStage<Void> |
unsubscribeForDirectoryEvents(String subscriptionId)
Delete a persistent subscription for
Directory events with subscription id. |
CompletionStage<Directory> root()
CompletionStage
providing the root directory of the directory treeRoot
CompletionStage<Directory> directory(String path)
path
- the path of the directoryCompletionStage
providing the directory with the specified pathPageIterator<Directory> directories(int pageSize)
pageSize
- the page sizePageIterator
providing a list of all directories, divided into pagesPageIterator<Directory> directories(Filter filter, int pageSize)
filter
- the filter to match againstpageSize
- the page sizePageIterator
providing a list of directories matching the specified filter, divided into pagesCompletionStage<Directory> createDirectory(DirectoryParameters parameters, String... acknowledgements)
parameters
- parameters of the directory to be createdacknowledgements
- requested acknowledgements for this operationCompletionStage
providing the newly created directoryCompletionStage<Void> deleteDirectory(String path, boolean deleteDevices, String... acknowledgements)
path
- the path of the directory to be deleteddeleteDevices
- if true
the devices under the directory should be deleted as well, if false
,
after the directory is deleted, these devices will again be listed under the root directoryacknowledgements
- requested acknowledgements for this operationCompletionStage
providing the result of the operationCompletionStage<Void> moveDirectory(String path, String targetParentPath, String... acknowledgements)
path
- the path of the directory to be movedtargetParentPath
- the path of the parent directory the directory will be moved toacknowledgements
- requested acknowledgements for this operationCompletionStage
providing the result of the operationCompletionStage<Void> moveDevice(String deviceId, String targetParentPath, String... acknowledgements)
deviceId
- the id of the device to be movedtargetParentPath
- the path of the parent directory the device will be moved toacknowledgements
- requested acknowledgements for this operationCompletionStage
providing the result of the operationvoid subscribeForDirectoryEvents(List<DirectoryEvent.Type> types, StreamConsumer<DirectoryEvent> consumer)
Directory
events. This subscription is not persistent.types
- event types to subscribe for. Empty list will subscribe you for all event typesconsumer
- event consumerCompletionStage<Void> subscribeForDirectoryEvents(String subscriptionId, List<DirectoryEvent.Type> types, Target target)
Directory
events. This subscription is persistent and must be deleted explicitly by the user using
unsubscribeForDirectoryEvents(String)
.subscriptionId
- subscription id. The subscription id must be unique in the scope of the event source. Using this
subscription id the user may set consumer for the subscriptiontypes
- event types to subscribe for. Empty list will subscribe for all event typestarget
- target where the events shall be sent toCompletionStage
that is completed successfully if the subscription has been finished and
exceptionally in case of failureCompletionStage<Void> unsubscribeForDirectoryEvents(String subscriptionId)
Directory
events with subscription id.subscriptionId
- subscription idCompletionStage
that is completed successfully if the subscription has been finished and
exceptionally in case of failurecom.bosch.iot.dm.util.PageIterator<Subscription<List<DirectoryEvent.Type>>> directoryEventSubscriptions(int pageSize)
pageSize
- the number of subscriptions returned within a pageCompletionStage<Integer> directoriesCount(Filter filter)
filter
- the filter the directories to be returned to be matched againstCopyright © 2022 Bosch.IO GmbH. All rights reserved.