|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectsteve.pums.assess.process.ProjectService
public class ProjectService
Provides methods for the registration and mainteneance of student projects
Constructor Summary | |
---|---|
ProjectService(java.sql.Connection conn)
Creates a new instance of ProjectService |
Method Summary | |
---|---|
Project |
addProject(Project project)
Registers a new project in the SUMS database |
java.lang.String |
alreadyAssigned(int newmarker,
java.util.HashMap markers)
Checks if a person is assigned to a Project as a marker |
java.util.Vector |
getAllocations(int person)
Searches the projects held in the SUMS database associated with a particular staff member |
java.util.Vector |
getCohorts()
Returns all cohorts for the project registration form |
int |
getMarkerType(java.lang.String type)
Retrieves the ID of the marking capacity string |
java.util.Vector |
getStaff()
Returns all staff for the project registration form |
java.util.Vector |
getStudentProjects(int student)
Used to retrieve all projects assocaited with a particular student |
java.util.Vector |
getStudents()
Returns all students for the project registration form |
java.util.Vector |
getUnits()
Returns all units for the project registration form |
Project |
loadCoordinators(Project project)
Loads details of the co-ordinators associated with the selected project |
Project |
loadMarkers(Project project)
Retrieves details of the project markers from the SUMS database |
Project |
loadProject(Project project)
Populates a Project with data retrieved from the SUMS database |
java.lang.String |
populateStudentTxt(java.lang.String studentid)
Retrieves the student text field of the Project |
java.lang.String |
populateUnitTxt(java.lang.String unitid)
Retrieves the student text field of the Project |
void |
saveProjectStatus(Project project,
int userid)
Saves changes in the project status (status code, mark and comments) |
Project |
setMarker(Project project,
int person,
java.lang.String type)
Sets a person in a marking role for a specified project |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ProjectService(java.sql.Connection conn)
conn
- SUMS database connectionMethod Detail |
---|
public java.util.Vector getStudents() throws java.sql.SQLException
java.sql.SQLException
- in the event of SQL errorspublic java.util.Vector getCohorts() throws java.sql.SQLException
java.sql.SQLException
- in the event of SQL errorspublic java.util.Vector getUnits() throws java.sql.SQLException
java.sql.SQLException
- in the event of SQL errorspublic java.util.Vector getStaff() throws java.sql.SQLException
java.sql.SQLException
- in the event of SQL errorspublic Project addProject(Project project) throws java.sql.SQLException, java.text.ParseException, javax.mail.MessagingException, jim.common.JimFatalException
project
- the new project
java.sql.SQLException
- in the event of SQL errors
java.text.ParseException
- in the event of date parsing error
javax.mail.MessagingException
- As a result of error in sending emails
jim.common.JimFatalException
- As a result of fatal exceptionpublic Project setMarker(Project project, int person, java.lang.String type) throws java.sql.SQLException, java.text.ParseException, javax.mail.MessagingException, jim.common.JimFatalException
project
- Project to assign marker toperson
- Person to assign as markertype
- Role to assign marker to
java.sql.SQLException
- In the event of SQL errors
javax.mail.MessagingException
- As a result of errors in sending emails
java.text.ParseException
- As a result of date parsing error
jim.common.JimFatalException
- As a result of fatal exceptionpublic int getMarkerType(java.lang.String type) throws java.sql.SQLException
type
- String identifier of marking role e.g. Supervisor
java.sql.SQLException
- As a result of SQL errorspublic Project loadProject(Project project) throws java.sql.SQLException
project
- Project to be populated
java.sql.SQLException
- As a result of SQL errorpublic Project loadMarkers(Project project) throws java.sql.SQLException
project
- Project to load markers for
java.sql.SQLException
- In the event of SQL errorspublic Project loadCoordinators(Project project) throws java.sql.SQLException
project
- Project to retrieve co-ordinators for
java.sql.SQLException
- In the event of SQL errorspublic java.lang.String populateStudentTxt(java.lang.String studentid) throws java.sql.SQLException
studentid
- ID of student
java.sql.SQLException
- In the event of SQL errorspublic java.lang.String populateUnitTxt(java.lang.String unitid) throws java.sql.SQLException
unitid
- ID of unit
java.sql.SQLException
- In the event of SQL errorspublic void saveProjectStatus(Project project, int userid) throws java.sql.SQLException, java.text.ParseException, java.lang.Exception
project
- Project to save status foruserid
- User triggering state change
java.sql.SQLException
- In the event of SQL errors
java.text.ParseException
- In the event of date parsing errors
java.lang.Exception
- In the event of errors in sending emailspublic java.lang.String alreadyAssigned(int newmarker, java.util.HashMap markers)
newmarker
- ID of new markermarkers
- Map of existing markers
public java.util.Vector getAllocations(int person) throws java.sql.SQLException
person
- The ID of the staff member to retrieve marking allocations for
java.sql.SQLException
- in the event of SQL errorspublic java.util.Vector getStudentProjects(int student) throws java.sql.SQLException
student
- ID of student
java.sql.SQLException
- As a result of SQL errors
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |