package uk.ac.ox.oucs.vle;

import java.util.List;
import java.util.Set;

public interface CourseSignupService {
	
	public static enum Status {PENDING, WITHDRAWN, APPROVED, ACCEPTED}; 

	public CourseGroup getCourseGroup(String courseId);
	
	/**
	 * This loads a course group with only the data that is available at the moment.
	 * @param courseId
	 * @return
	 */
	public CourseGroup getAvailableCourseGroup(String courseId);
	
	public String findSupervisor(String search);
	
	public void signup(Set<String> components, String superviorId, String message);
	
	public void withdraw(String signupId);
	
	public List<CourseSignup> getCourseSignups(String courseId);
	
	public List<CourseSignup> getApprovals();
	
	public void approve(String signupId);
	
	public void reject(String signupId);
	
	public List<CourseGroup> getAdministering();
	
	public void setSignupStatus(String signupId, Status status);
	
}

@@ -21,16 +21,39 @@
 s.vle;%0A%0A
+import java.util.Date;%0A
 import j
@@ -67,16 +67,16 @@
 l.List;%0A
-
 import j
@@ -199,17 +199,61 @@
 CEPTED%7D;
- 
+%0A%09%0A%09public static enum Range %7BALL, UPCOMING%7D;
 %0A%0A%09publi
@@ -481,32 +481,105 @@
 ng courseId);%0A%09%0A
+%09public List%3CCourseGroup%3E getCourseGroups(String deptId, Range range);%0A%09%0A
 %09public String f
@@ -1035,12 +1035,197 @@
 tatus);%0A
-
 %09%0A
+%09/**%0A%09 * This is what the service should use when determining the current time.%0A%09 * This is to support testing the data against different times.%0A%09 * @return%0A%09 */%0A%09public Date getNow();%0A
 %7D%0A

Add API method for getting upcoming components.