Class ProjectsApi


  • public class ProjectsApi
    extends java.lang.Object
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.util.Set<Project> getAllProjects()
      Uses the authenticated web client to pull all projects from the api and convert them to POJOs
      Project getProjectByName​(java.lang.String name)
      Loads in the full list of projects from the API, then selects one project by name.
      Project getProjectByName​(java.lang.String name, boolean ignoreCase)
      Loads in the full list of projects from the API, then selects one project by name.
      • Methods inherited from class java.lang.Object

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

      • getAllProjects

        public java.util.Set<Project> getAllProjects()
                                              throws java.lang.IllegalArgumentException,
                                                     java.io.IOException
        Uses the authenticated web client to pull all projects from the api and convert them to POJOs
        Returns:
        a Set of Projects (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
      • getProjectByName

        public Project getProjectByName​(java.lang.String name)
                                 throws java.lang.IllegalArgumentException,
                                        java.io.IOException
        Loads in the full list of projects from the API, then selects one project by name. Only selects the project if the name is an exact match (including case)
        Parameters:
        name - name of the project to select
        Returns:
        the named project or null if no such project exists
        Throws:
        java.lang.IllegalArgumentException - when the web client receives a bad parameter
        java.io.IOException - When the AuthenticatedWebClient receives and error response code
      • getProjectByName

        public Project getProjectByName​(java.lang.String name,
                                        boolean ignoreCase)
                                 throws java.lang.IllegalArgumentException,
                                        java.io.IOException
        Loads in the full list of projects from the API, then selects one project by name.
        Parameters:
        name - name of the project to select
        ignoreCase - when true uses equalsIgnoreCase in the name check
        Returns:
        the named project or null if no such project exists
        Throws:
        java.lang.IllegalArgumentException - when the web client receives a bad parameter
        java.io.IOException - When the AuthenticatedWebClient receives and error response code