|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object cmu.jspsurveymanager.data.SurveyStorage
public class SurveyStorage
Constructor Summary | |
---|---|
SurveyStorage(DatabaseObjectStorage objectStorage)
|
Method Summary | |
---|---|
void |
deleteSurvey(Survey survey)
|
Survey |
getNewSurvey()
|
Survey |
getSurvey(int id)
Provides the survey with the given unique ID. |
Survey |
getSurvey(java.lang.String title)
Provides the survey with the given name, or null if none exists. |
java.util.Vector<Survey> |
getSurveys()
Gets an array of all Admins. |
java.util.Vector<Survey> |
getSurveys(Admin admin)
Returns Surveys for which the given admin has a permissions entry. |
boolean |
grantSurveyDatabasePermission(Survey s,
Admin a)
|
boolean |
revokeSurveyDatabasePermission(Survey s,
Admin a)
|
boolean |
saveSurvey(Survey survey)
Saves the survey. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public SurveyStorage(DatabaseObjectStorage objectStorage)
Method Detail |
---|
public java.util.Vector<Survey> getSurveys()
public boolean saveSurvey(Survey survey)
survey
-
public Survey getSurvey(java.lang.String title)
title
- The name of the survey.
public Survey getSurvey(int id)
id
- The ID of the survey.
public void deleteSurvey(Survey survey)
public java.util.Vector<Survey> getSurveys(Admin admin)
admin
- The Admin to find Surveys for.
public Survey getNewSurvey()
public boolean grantSurveyDatabasePermission(Survey s, Admin a)
public boolean revokeSurveyDatabasePermission(Survey s, Admin a)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |