Class ExchangeContextOperations
java.lang.Object
co.ankatech.ankasecure.keymanagement.ExchangeContextOperations
The tenant's exchange contexts: the bounded settings, owned by the tenant, in which actors exchange
protected data with a counterparty; every capability grant names one. Obtained from
AuthenticatedKeyManagementSdk.exchangeContexts().
ExchangeContextResponse context = sdk.exchangeContexts().create(
new CreateExchangeContextRequest().name("supplier-invoices"));
-
Method Summary
Modifier and TypeMethodDescriptionclose(UUID contextId, CloseExchangeContextRequest request) Closes an exchange context for good (POST /tenants/{t}/exchange-contexts/{c}/close); the close is terminal: in the same transaction it revokes every non-terminal exchange in the context and retires every live grant in it.create(CreateExchangeContextRequest request) Creates an exchange context owned by the tenant (POST /tenants/{t}/exchange-contexts).voidDeletes an exchange context (DELETE /tenants/{t}/exchange-contexts/{c}).Reads one exchange context (GET /tenants/{t}/exchange-contexts/{c}).list(ExchangeContextListQuery query) Lists the tenant's exchange contexts (GET /tenants/{t}/exchange-contexts).Resumes a suspended exchange context (POST /tenants/{t}/exchange-contexts/{c}/resume).suspend(UUID contextId, SuspendExchangeContextRequest request) Suspends an exchange context (POST /tenants/{t}/exchange-contexts/{c}/suspend).update(UUID contextId, UpdateExchangeContextRequest request) Updates an exchange context (PATCH /tenants/{t}/exchange-contexts/{c}).
-
Method Details
-
list
Lists the tenant's exchange contexts (GET /tenants/{t}/exchange-contexts).- Parameters:
query- the page; must not benull- Returns:
- one page of contexts
- Throws:
KeyManagementSdkException- when the call is refused
-
get
Reads one exchange context (GET /tenants/{t}/exchange-contexts/{c}).- Parameters:
contextId- the context; must not benull- Returns:
- the context
- Throws:
KeyManagementSdkException- when the call is refused
-
create
Creates an exchange context owned by the tenant (POST /tenants/{t}/exchange-contexts).- Parameters:
request- the context; must not benull- Returns:
- the created context
- Throws:
KeyManagementSdkException- when the call is refused
-
update
Updates an exchange context (PATCH /tenants/{t}/exchange-contexts/{c}).- Parameters:
contextId- the context; must not benullrequest- the members to change; must not benull- Returns:
- the updated context
- Throws:
KeyManagementSdkException- when the call is refused
-
delete
Deletes an exchange context (DELETE /tenants/{t}/exchange-contexts/{c}).- Parameters:
contextId- the context; must not benull- Throws:
KeyManagementSdkException- when the call is refused
-
suspend
Suspends an exchange context (POST /tenants/{t}/exchange-contexts/{c}/suspend).- Parameters:
contextId- the context; must not benullrequest- the suspension reason; must not benull- Returns:
- the suspended context
- Throws:
KeyManagementSdkException- when the call is refused
-
resume
Resumes a suspended exchange context (POST /tenants/{t}/exchange-contexts/{c}/resume).- Parameters:
contextId- the context; must not benull- Returns:
- the resumed context
- Throws:
KeyManagementSdkException- when the call is refused
-
close
Closes an exchange context for good (POST /tenants/{t}/exchange-contexts/{c}/close); the close is terminal: in the same transaction it revokes every non-terminal exchange in the context and retires every live grant in it.- Parameters:
contextId- the context; must not benullrequest- the audited reason for the close, required; must not benull- Returns:
- the closed context
- Throws:
KeyManagementSdkException- when the call is refused
-