StoreApi
Manages PrivMX Bridge Stores and Files.
Constructors
StoreApi
Initialize Store module on passed active connection.
public void StoreApi(
Connection connection
)
Name | Type | Description |
---|---|---|
connection | Connection | active connection to PrivMX Bridge |
Methods
close
Frees memory.
public void close()
closeFile
Closes the file handle.
public String closeFile(
long fileHandle
)
Name | Type | Description |
---|---|---|
fileHandle | long | handle to read/write file data |
Type | Description |
---|---|
String | ID of closed file |
createFile
Creates a new file in a Store.
public Long createFile(
String storeId,
byte[] publicMeta,
byte[] privateMeta,
long size
)
Name | Type | Description |
---|---|---|
storeId | String | ID of the Store to create the file in |
publicMeta | byte[] | public file metadata |
privateMeta | byte[] | private file metadata |
size | long | size of the file |
Type | Description |
---|---|
Long | Handle to write data |
createStore
Creates a new Store in given Context.
public String createStore(
String contextId,
List<UserWithPubKey> users,
List<UserWithPubKey> managers,
byte[] publicMeta,
byte[] privateMeta
)
Name | Type | Description |
---|---|---|
contextId | String | ID of the Context to create the Store in |
users | List<UserWithPubKey> | list of UserWithPubKey which indicates who will have access to the created Store |
managers | List<UserWithPubKey> | list of UserWithPubKey which indicates who will have access (and management rights) to the created Store |
publicMeta | byte[] | public (unencrypted) metadata |
privateMeta | byte[] | private (encrypted) metadata |
Type | Description |
---|---|
String | Created Store ID |