Interface CapabilityChecker

All Known Subinterfaces:
ActivityManagerService, ADEPT2ClientService, AdministrationService, ClientService, ExecutionClientService, LocalExecutionClientService, ModellingClientService, RemoteExecutionClientService, SessionFactory, WorklistClientService
All Known Implementing Classes:
MultiplexingClientService

public interface CapabilityChecker
Interface for providing methods to check capabilities of session tokens.
See Also:
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    hasAllCapabilities(SessionToken sessionToken, String... capabilities)
    Checks the integrity of the (security token of the) designated session token and returns whether the (security token of the) designated session has all of the designated capabilities.
    boolean
    hasAllTopLevelCapabilities(SessionToken sessionToken, String... capabilities)
    Checks the integrity of the (security token of the) top-level session of the designated session token and returns whether the (security token of the) top-level session of the designated session has all of the designated capabilities.
    boolean
    hasOneCapability(SessionToken sessionToken, String... capabilities)
    Checks the integrity of the (security token of the) designated session token and returns whether the (security token of the) designated session has at least one of the designated capabilities.
    boolean
    hasOneTopLevelCapability(SessionToken sessionToken, String... capabilities)
    Checks the integrity of the (security token of the) top-level session of the designated session token and returns whether the (security token of the) top-level session of the designated session has at least one of the designated capabilities.
  • Method Details

    • hasOneCapability

      boolean hasOneCapability(SessionToken sessionToken, String... capabilities) throws SecurityTokenIntegrityException
      Checks the integrity of the (security token of the) designated session token and returns whether the (security token of the) designated session has at least one of the designated capabilities.
      Parameters:
      sessionToken - The session token of which to check the integrity and to return the capability of.
      capabilities - One ore more strings representing the capability/capabilities of the function the owner of this token wants to perform.
      Returns:
      Whether the (security token of the) designated session has at least one of the designated capabilities.
      Throws:
      SecurityTokenIntegrityException - If the designated session token has no integrity, a SecurityTokenIntegrityException will be thrown.
      See Also:
    • hasOneTopLevelCapability

      boolean hasOneTopLevelCapability(SessionToken sessionToken, String... capabilities) throws SecurityTokenIntegrityException
      Checks the integrity of the (security token of the) top-level session of the designated session token and returns whether the (security token of the) top-level session of the designated session has at least one of the designated capabilities.
      Parameters:
      sessionToken - The session token of which to check the integrity and to return the capability of the corresponding top-level session token.
      capabilities - One or more strings representing the capability/capabilities of the function the owner of the top-level session token wants to perform.
      Returns:
      Whether the (security token of the) top-level parent session of the designated session has at least one of the designated capabilities.
      Throws:
      SecurityTokenIntegrityException - If the top-level parent session of the designated session token has no integrity, a SecurityTokenIntegrityException will be thrown.
      See Also:
    • hasAllCapabilities

      boolean hasAllCapabilities(SessionToken sessionToken, String... capabilities) throws SecurityTokenIntegrityException
      Checks the integrity of the (security token of the) designated session token and returns whether the (security token of the) designated session has all of the designated capabilities.
      Parameters:
      sessionToken - The session token of which to check the integrity and to return the capability of.
      capabilities - One ore more strings representing the capability/capabilities of the function the owner of this token wants to perform.
      Returns:
      Whether the (security token of the) designated session has all of the designated capabilities.
      Throws:
      SecurityTokenIntegrityException - If the designated session token has no integrity, a SecurityTokenIntegrityException will be thrown.
      See Also:
    • hasAllTopLevelCapabilities

      boolean hasAllTopLevelCapabilities(SessionToken sessionToken, String... capabilities) throws SecurityTokenIntegrityException
      Checks the integrity of the (security token of the) top-level session of the designated session token and returns whether the (security token of the) top-level session of the designated session has all of the designated capabilities.
      Parameters:
      sessionToken - The session token of which to check the integrity and to return the capability of the corresponding top-level session token.
      capabilities - One or more strings representing the capability/capabilities of the function the owner of the top-level session token wants to perform.
      Returns:
      Whether the (security token of the) top-level parent session of the designated session has all of the designated capabilities.
      Throws:
      SecurityTokenIntegrityException - If the top-level parent session of the designated session token has no integrity, a SecurityTokenIntegrityException will be thrown.
      See Also: