steve.pums.assess.bus
Class MarkFormBean

java.lang.Object
  extended by org.apache.struts.action.ActionForm
      extended by org.apache.struts.validator.ValidatorForm
          extended by steve.pums.assess.bus.MarkFormBean
All Implemented Interfaces:
java.io.Serializable

public class MarkFormBean
extends org.apache.struts.validator.ValidatorForm

Represents a project marking form

See Also:
Serialized Form

Field Summary
 
Fields inherited from class org.apache.struts.validator.ValidatorForm
page, validatorResults
 
Fields inherited from class org.apache.struts.action.ActionForm
multipartRequestHandler, servlet
 
Constructor Summary
MarkFormBean()
          Creates a new instance of SPMarkFormBean
 
Method Summary
 void addFormCategory(Category cat)
          Adds a new mark category to the form
 void addPrizeNomination(PrizeNomination nom)
          Adds a new prize nomination to the mark form
 int getAdjustment()
          Getter for mark form adjustment
 int getCatCount()
          Counts the number of mark form categories
 java.lang.String getExaminerComments()
          Getter for mark form comments
 java.util.Vector getFormCategories()
          Getter for mark form categories
 int getFormID()
          Getter for mark form ID
 java.lang.String getFormName()
          Getter for mark form name
 java.lang.String getGeneralComments()
          Getter for mark form general comments
 java.lang.String getJustification()
          Getter for mark form prize justification
 int getMarkEnteredBy()
          Getter for person completing mark form
 StaffBean getMarker()
          Getter for mark form marker
 int getMarkerCapacity()
          Getter for mark form marker capacity ID
 java.lang.String getMarkerCapacityDesc()
          Getter for mark form marker capacity description
 java.util.HashMap getMarkFormMap()
          Loads mark form data into a HashMap for email sending
 java.util.HashMap getMarkFormMap(java.util.HashMap markFormMap)
          Loads mark form data into a HashMap for email sending
 int getMarkID()
          Getter for mark form mark ID
 int getMostOptions()
          Works out which category has the most options, helps with generation of mark form table
 int getNomCount()
          Counts the number of prize nominations
 java.lang.String getPlagiarismSuspect()
          Getter for mark form suspected plagiarism
 int getPrizeID()
          Getter for mark form prize ID
 java.util.Vector getPrizeNominations()
          Getter for mark form prize nominations
 int getProjectID()
          Getter for mark form project ID
 int getProjectMark()
          Getter for mark form mark
 boolean isAllOptionsMulti()
          Checks if all categories use multiple input types such as radio or checkbox
 boolean isAllOptionsSame()
          Checks if all categories have the same amount of options
 boolean isPlagiarismSuspect()
          Getter for mark form suspected plagiarism
 void resetPrize()
          Clears out the prize nominations
 void setAdjustment(int adjustment)
          Setter for mark form mark adjustment
 void setExaminerComments(java.lang.String examinerComments)
          Setter for mark form examiner comments
 void setFormCategories(java.util.Vector formCategories)
          Setter for mark form categories
 void setFormID(int formID)
          Setter for mark form ID
 void setFormName(java.lang.String formName)
          Setter for mark form name
 void setGeneralComments(java.lang.String generalComments)
          Setter for mark form general comments
 void setJustification(java.lang.String justification)
          Setter for mark form prize justification
 void setMarkEnteredBy(int markEnteredBy)
          Setter for ID of person entering the mark
 void setMarker(StaffBean marker)
          Setter for mark form marker
 void setMarkerCapacity(int markerCapacity)
          Setter for mark form marker capacity ID
 void setMarkerCapacityDesc(java.lang.String markerCapacityDesc)
          Setter for mark form marker capacity string
 void setMarkID(int markID)
          Setter for mark form mark ID
 void setPlagiarismSuspect(boolean plagiarismSuspect)
          Setter for mark form suspected plagiarism
 void setPrizeID(int prizeID)
          Setter for mark form prize nomination ID
 void setPrizeNominations(java.util.Vector prizeNominations)
          Setter for collection of prize nominations
 void setProjectID(int projectID)
          Setter for mark form project ID
 org.apache.struts.action.ActionErrors validate(org.apache.struts.action.ActionMapping mapping, javax.servlet.http.HttpServletRequest request)
          Validates the mark form on submission
 
Methods inherited from class org.apache.struts.validator.ValidatorForm
getPage, getResultValueMap, getValidationKey, getValidatorResults, reset, setPage, setValidatorResults
 
Methods inherited from class org.apache.struts.action.ActionForm
getMultipartRequestHandler, getServlet, getServletWrapper, reset, setMultipartRequestHandler, setServlet, validate
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MarkFormBean

public MarkFormBean()
Creates a new instance of SPMarkFormBean

Method Detail

getFormName

public java.lang.String getFormName()
Getter for mark form name

Returns:
Mark form name

setFormName

public void setFormName(java.lang.String formName)
Setter for mark form name

Parameters:
formName - Mark form name

getFormID

public int getFormID()
Getter for mark form ID

Returns:
Mark form ID

setFormID

public void setFormID(int formID)
Setter for mark form ID

Parameters:
formID - Mark form ID

getProjectID

public int getProjectID()
Getter for mark form project ID

Returns:
Mark form project ID

setProjectID

public void setProjectID(int projectID)
Setter for mark form project ID

Parameters:
projectID - Project ID

isPlagiarismSuspect

public boolean isPlagiarismSuspect()
Getter for mark form suspected plagiarism

Returns:
If project is suspected of plagiarism

setPlagiarismSuspect

public void setPlagiarismSuspect(boolean plagiarismSuspect)
Setter for mark form suspected plagiarism

Parameters:
plagiarismSuspect - Suspected plagiarism

getPlagiarismSuspect

public java.lang.String getPlagiarismSuspect()
Getter for mark form suspected plagiarism

Returns:
Mark form suspected plagiarism

getGeneralComments

public java.lang.String getGeneralComments()
Getter for mark form general comments

Returns:
Mark form general comments

setGeneralComments

public void setGeneralComments(java.lang.String generalComments)
Setter for mark form general comments

Parameters:
generalComments - General comments

getExaminerComments

public java.lang.String getExaminerComments()
Getter for mark form comments

Returns:
Mark form comments

setExaminerComments

public void setExaminerComments(java.lang.String examinerComments)
Setter for mark form examiner comments

Parameters:
examinerComments - Mark form examiner comments

addFormCategory

public void addFormCategory(Category cat)
Adds a new mark category to the form

Parameters:
cat - Mark category

addPrizeNomination

public void addPrizeNomination(PrizeNomination nom)
Adds a new prize nomination to the mark form

Parameters:
nom - Prize nomination

getAdjustment

public int getAdjustment()
Getter for mark form adjustment

Returns:
Mark form adjustment

setAdjustment

public void setAdjustment(int adjustment)
Setter for mark form mark adjustment

Parameters:
adjustment - Mark adjustment

getProjectMark

public int getProjectMark()
                   throws java.lang.Exception
Getter for mark form mark

Returns:
Mark
Throws:
java.lang.Exception - In the event of lang exception

validate

public org.apache.struts.action.ActionErrors validate(org.apache.struts.action.ActionMapping mapping,
                                                      javax.servlet.http.HttpServletRequest request)
Validates the mark form on submission

Overrides:
validate in class org.apache.struts.validator.ValidatorForm
Parameters:
mapping - Action Mapping
request - Servlet request
Returns:
Errors identified during validation

getFormCategories

public java.util.Vector getFormCategories()
Getter for mark form categories

Returns:
Mark form categories

getPrizeNominations

public java.util.Vector getPrizeNominations()
Getter for mark form prize nominations

Returns:
Collection of prize nominations

getCatCount

public int getCatCount()
Counts the number of mark form categories

Returns:
Count of mark form categoies

isAllOptionsSame

public boolean isAllOptionsSame()
Checks if all categories have the same amount of options

Returns:
If all categories have the same amount of options

isAllOptionsMulti

public boolean isAllOptionsMulti()
Checks if all categories use multiple input types such as radio or checkbox

Returns:
If all categories use same input

getMostOptions

public int getMostOptions()
Works out which category has the most options, helps with generation of mark form table

Returns:
Category count

resetPrize

public void resetPrize()
Clears out the prize nominations


getPrizeID

public int getPrizeID()
Getter for mark form prize ID

Returns:
ID of prize

setPrizeID

public void setPrizeID(int prizeID)
Setter for mark form prize nomination ID

Parameters:
prizeID - ID of prize

getJustification

public java.lang.String getJustification()
Getter for mark form prize justification

Returns:
Nomination justification

setJustification

public void setJustification(java.lang.String justification)
Setter for mark form prize justification

Parameters:
justification - Justification of prize nomination

getNomCount

public int getNomCount()
Counts the number of prize nominations

Returns:
Prize nomination count

setPrizeNominations

public void setPrizeNominations(java.util.Vector prizeNominations)
Setter for collection of prize nominations

Parameters:
prizeNominations - Collection of prize nominations

getMarkID

public int getMarkID()
Getter for mark form mark ID

Returns:
Mark ID

setMarkID

public void setMarkID(int markID)
Setter for mark form mark ID

Parameters:
markID - Mark ID

setFormCategories

public void setFormCategories(java.util.Vector formCategories)
Setter for mark form categories

Parameters:
formCategories - Collection of mark categories

getMarkerCapacity

public int getMarkerCapacity()
Getter for mark form marker capacity ID

Returns:
Marker capacity

setMarkerCapacity

public void setMarkerCapacity(int markerCapacity)
Setter for mark form marker capacity ID

Parameters:
markerCapacity - Marker capacity ID

getMarker

public StaffBean getMarker()
Getter for mark form marker

Returns:
Marker

setMarker

public void setMarker(StaffBean marker)
Setter for mark form marker

Parameters:
marker - Marker

getMarkerCapacityDesc

public java.lang.String getMarkerCapacityDesc()
Getter for mark form marker capacity description

Returns:
Marker capacity string

setMarkerCapacityDesc

public void setMarkerCapacityDesc(java.lang.String markerCapacityDesc)
Setter for mark form marker capacity string

Parameters:
markerCapacityDesc - Marker capacity string

getMarkEnteredBy

public int getMarkEnteredBy()
Getter for person completing mark form

Returns:
Person ID of person entering mark

setMarkEnteredBy

public void setMarkEnteredBy(int markEnteredBy)
Setter for ID of person entering the mark

Parameters:
markEnteredBy - ID of person entering the mark

getMarkFormMap

public java.util.HashMap getMarkFormMap(java.util.HashMap markFormMap)
                                 throws java.lang.Exception
Loads mark form data into a HashMap for email sending

Parameters:
markFormMap - If needing to add to existing map
Returns:
Map of mark form data
Throws:
java.lang.Exception - In the event of lang exception

getMarkFormMap

public java.util.HashMap getMarkFormMap()
                                 throws java.lang.Exception
Loads mark form data into a HashMap for email sending

Returns:
Mark of mark form data
Throws:
java.lang.Exception - In the event of lang exception