/** * Returns a list of all the known projects contained within FreeAgent for the authorised account. * * @return A list of Project instances. */ public List<FreeAgentProject> getProjects() { FreeAgentProjectWrapper projectsWrapper = freeAgentServiceInstance.getProjects(); if (projectsWrapper != null) { return projectsWrapper.getProjects(); } return null; }
/** * Returns a list of all the known projects contained within FreeAgent for the authorised account. * * @param statusType The view type {@link * com.karlnosworthy.freeagent.FreeAgentClient.ProjectStatusType} filter to apply to the * projects. * @return A list of Project instances. */ public List<FreeAgentProject> getProjects(ProjectStatusType statusType) { FreeAgentProjectWrapper projectsWrapper = freeAgentServiceInstance.getProjects(statusType.identifier); if (projectsWrapper != null) { return projectsWrapper.getProjects(); } return null; }
/** * Returns a list of projects that are associated with the specified contact. * * @param contact The contact instance to look up projects for. * @return A list of the appropriate projects or null. */ public List<FreeAgentProject> getProjects(FreeAgentContact contact) { if (contact != null && contact.getUrl() != null && !contact.getUrl().isEmpty()) { FreeAgentProjectWrapper projectsWrapper = freeAgentServiceInstance.getProjectsForContact(contact.getUrl()); if (projectsWrapper != null) { return projectsWrapper.getProjects(); } } return null; }