Class EnvironmentsApi


  • public class EnvironmentsApi
    extends java.lang.Object
    • Method Detail

      • getAllEnvironments

        public java.util.Set<Environment> getAllEnvironments()
                                                      throws java.lang.IllegalArgumentException,
                                                             java.io.IOException
        Get all environments from the Octopus server as Environment objects.
        Returns:
        A set of all environments on the Octopus server.
        Throws:
        java.lang.IllegalArgumentException - when the web client receives a bad parameter
        java.io.IOException - When the AuthenticatedWebClient receives and error response code
      • getEnvironmentByName

        public Environment getEnvironmentByName​(java.lang.String name)
                                         throws java.lang.IllegalArgumentException,
                                                java.io.IOException
        Get the Environment with the given name if it exists, return null otherwise. Only selects the environment if the name is an exact match (including case)
        Parameters:
        name - The name of the Environment to find.
        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
      • getEnvironmentByName

        public Environment getEnvironmentByName​(java.lang.String name,
                                                boolean ignoreCase)
                                         throws java.lang.IllegalArgumentException,
                                                java.io.IOException
        Get the Environment with the given name if it exists, return null otherwise.
        Parameters:
        name - The name of the Environment 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