Class DirectoryOperations

java.lang.Object
co.ankatech.ankasecure.keymanagement.DirectoryOperations

public final class DirectoryOperations extends Object
Read-only lookups of the tenant's applications, cryptographic actors and counterparty types: what a key management automation needs to name the grantees and counterparties of the resources it manages. Obtained from AuthenticatedKeyManagementSdk.directory(). Applications, actors and their credentials are administered in the Admin Console; this SDK only reads them.

 PageApplicationResponse applications = sdk.directory().listApplications(ApplicationListQuery.firstPage());
 
  • Method Details

    • listApplications

      public PageApplicationResponse listApplications(ApplicationListQuery query)
      Lists the tenant's applications (GET /tenants/{t}/applications).
      Parameters:
      query - the page; must not be null
      Returns:
      one page of applications
      Throws:
      KeyManagementSdkException - when the call is refused
    • getApplication

      public ApplicationResponse getApplication(UUID applicationId)
      Reads one application (GET /tenants/{t}/applications/{a}).
      Parameters:
      applicationId - the application; must not be null
      Returns:
      the application
      Throws:
      KeyManagementSdkException - when the call is refused
    • listActors

      public PageActorResponse listActors(ActorListQuery query)
      Lists the tenant's cryptographic actors (GET /tenants/{t}/actors).
      Parameters:
      query - the page; must not be null
      Returns:
      one page of actors
      Throws:
      KeyManagementSdkException - when the call is refused
    • listApplicationActors

      public List<ActorResponse> listApplicationActors(UUID applicationId)
      Lists the actors of one application (GET /tenants/{t}/applications/{a}/actors).
      Parameters:
      applicationId - the application; must not be null
      Returns:
      the application's actors
      Throws:
      KeyManagementSdkException - when the call is refused
    • getActor

      public ActorResponse getActor(UUID actorId)
      Reads one actor (GET /tenants/{t}/actors/{a}).
      Parameters:
      actorId - the actor; must not be null
      Returns:
      the actor
      Throws:
      KeyManagementSdkException - when the call is refused
    • listCounterpartyTypes

      public List<CounterpartyTypeResponse> listCounterpartyTypes()
      Lists the counterparty types the tenant can use (GET /tenants/{t}/counterparty-types).
      Returns:
      the counterparty types
      Throws:
      KeyManagementSdkException - when the call is refused
    • getCounterpartyType

      public CounterpartyTypeResponse getCounterpartyType(UUID counterpartyTypeId)
      Reads one counterparty type (GET /tenants/{t}/counterparty-types/{id}).
      Parameters:
      counterpartyTypeId - the counterparty type; must not be null
      Returns:
      the counterparty type
      Throws:
      KeyManagementSdkException - when the call is refused