Class ExchangeContextOperations
java.lang.Object
co.ankatech.ankasecure.keymanagement.ExchangeContextOperations
The tenant's exchange contexts: the bounded settings in which an application's actors exchange
protected data with a counterparty. Obtained from
AuthenticatedKeyManagementSdk.exchangeContexts().
ExchangeContextResponse context = sdk.exchangeContexts().create(applicationId,
new CreateExchangeContextRequest().name("supplier-invoices"));
-
Method Summary
Modifier and TypeMethodDescriptionCloses an exchange context for good (POST /tenants/{t}/exchange-contexts/{c}/close).create(UUID applicationId, CreateExchangeContextRequest request) Creates an exchange context for an application (POST /tenants/{t}/applications/{a}/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).listForApplication(UUID applicationId) Lists the exchange contexts of one application (GET /tenants/{t}/applications/{a}/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
-
listForApplication
Lists the exchange contexts of one application (GET /tenants/{t}/applications/{a}/exchange-contexts).- Parameters:
applicationId- the application; must not benull- Returns:
- the application's contexts, as the Admin API answers them (empty when it has none)
- 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 for an application (POST /tenants/{t}/applications/{a}/exchange-contexts).- Parameters:
applicationId- the application; must not benullrequest- 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).- Parameters:
contextId- the context; must not benull- Returns:
- the closed context
- Throws:
KeyManagementSdkException- when the call is refused
-