|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object cmu.jspsurveymanager.data.Survey
public class Survey
User JavaBean represents admin user information cached from the database. Developed by Peter Centgraf as final project for the CMU 15-397: Web Application Development course, Spring 2004. Almost entirely updated by Saagar Patel on 2004-12-17 to take advantage of the new TableStorage functionality and remove SQL calls from the code.
SurveyStorage
Nested Class Summary | |
---|---|
class |
Survey.Permission
A utility class used to determine and set permissions relating to specific Admins and surveys. |
Constructor Summary | |
---|---|
Survey(int id,
java.lang.String title,
Survey.Permission perm,
java.lang.String dbHost,
java.lang.String dbDatabase,
java.lang.String dbUser,
java.lang.String dbPassword,
java.lang.String webappPath,
java.lang.String path,
SurveyStorage s)
Builds a Survey based upon a given unique id, title, and permissions. |
|
Survey(SurveyStorage s)
Required default constructor. |
Method Summary | |
---|---|
Survey.Permission |
defaultPermission()
|
void |
delete()
Deletes this survey. |
java.lang.String |
getDatabaseConnectionDatabase()
Returns the database connection database name |
java.lang.String |
getDatabaseConnectionHost()
Returns the database connection host |
java.lang.String |
getDatabaseConnectionPassword()
Returns the database connection user name |
java.lang.String |
getDatabaseConnectionUser()
Returns the database connection user name |
java.lang.String |
getFilesystemLocation()
|
boolean |
getHasBeenModified()
Determines whether this survey has been modified since being loaded. |
int |
getId()
Returns the unique ID of this survey (or -1 if the survey has not yet been stored). |
java.lang.String |
getTitle()
Returns title |
java.lang.String |
getWebappPath()
|
Survey.Permission |
permissions()
Provides an interface to set permissions to this survey. |
boolean |
save()
Saves this survey. |
void |
setDatabaseConnectionDatabase(java.lang.String database)
Sets the database connection database name |
void |
setDatabaseConnectionHost(java.lang.String host)
Sets the database connection host |
void |
setDatabaseConnectionPassword(java.lang.String password)
Sets the database connection database user |
void |
setDatabaseConnectionUser(java.lang.String user)
Sets the database connection database user |
void |
setFilesystemLocation(java.lang.String absolutePath)
|
void |
setTitle(java.lang.String title)
Sets title |
void |
setWebappPath(java.lang.String path)
|
java.lang.String |
toString()
A basic string representation of the Survey. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public Survey(SurveyStorage s)
public Survey(int id, java.lang.String title, Survey.Permission perm, java.lang.String dbHost, java.lang.String dbDatabase, java.lang.String dbUser, java.lang.String dbPassword, java.lang.String webappPath, java.lang.String path, SurveyStorage s)
id
- The unique ID for this surveytitle
- The title (50 character max) of this surveyperm
- The permissions to be attributed to this survey.Method Detail |
---|
public int getId()
public void setTitle(java.lang.String title)
title
- a String, 50 character maxpublic java.lang.String getTitle()
public java.lang.String toString()
toString
in class java.lang.Object
public boolean getHasBeenModified()
public Survey.Permission permissions()
public boolean save()
public void delete()
public void setDatabaseConnectionHost(java.lang.String host)
public java.lang.String getDatabaseConnectionHost()
public void setDatabaseConnectionDatabase(java.lang.String database)
public java.lang.String getDatabaseConnectionDatabase()
public void setDatabaseConnectionUser(java.lang.String user)
public java.lang.String getDatabaseConnectionUser()
public void setDatabaseConnectionPassword(java.lang.String password)
public java.lang.String getDatabaseConnectionPassword()
public void setWebappPath(java.lang.String path)
public java.lang.String getWebappPath()
public Survey.Permission defaultPermission()
public java.lang.String getFilesystemLocation()
public void setFilesystemLocation(java.lang.String absolutePath)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |