Class TenantsApi


  • public class TenantsApi
    extends java.lang.Object
    Methods for the Tenants aspects of the Octopus API
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.util.Set<Tenant> getAllTenants()
      Uses the authenticated web client to pull all tenants from the api and convert them to POJOs
      Tenant getTenantByName​(java.lang.String name)
      Get the Tenant with the given name if it exists, return null otherwise.
      Tenant getTenantByName​(java.lang.String name, boolean ignoreCase)
      Get the Tenant with the given name if it exists, return null otherwise.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • getAllTenants

        public java.util.Set<Tenant> getAllTenants()
                                            throws java.lang.IllegalArgumentException,
                                                   java.io.IOException
        Uses the authenticated web client to pull all tenants from the api and convert them to POJOs
        Returns:
        a Set of Tenants (may be empty)
        Throws:
        java.lang.IllegalArgumentException - when the web client receives a bad parameter
        java.io.IOException - When the AuthenticatedWebClient receives and error response code
      • getTenantByName

        public Tenant getTenantByName​(java.lang.String name)
                               throws java.lang.IllegalArgumentException,
                                      java.io.IOException
        Get the Tenant with the given name if it exists, return null otherwise. Only selects the tenant if the name is an exact match (including case)
        Parameters:
        name - The name of the Tenant to find.
        Returns:
        The Tenant with that name.
        Throws:
        java.lang.IllegalArgumentException - when the web client receives a bad parameter
        java.io.IOException - When the AuthenticatedWebClient receives and error response code
      • getTenantByName

        public Tenant getTenantByName​(java.lang.String name,
                                      boolean ignoreCase)
                               throws java.lang.IllegalArgumentException,
                                      java.io.IOException
        Get the Tenant with the given name if it exists, return null otherwise.
        Parameters:
        name - The name of the Tenant to find.
        ignoreCase - when true uses equalsIgnoreCase in the name check
        Returns:
        The Environment with that name.
        Throws:
        java.lang.IllegalArgumentException - when the web client receives a bad parameter
        java.io.IOException - When the AuthenticatedWebClient receives and error response code