ensemble
Class UserBean

java.lang.Object
  extended by ensemble.UserBean
All Implemented Interfaces:
java.io.Serializable

@Named(value="userBean")
@SessionScoped
public class UserBean
extends java.lang.Object
implements java.io.Serializable

These bean holds data about the current user.

See Also:
Serialized Form

Constructor Summary
UserBean()
           
 
Method Summary
 Data_set getCurrentData()
          The data set the user is currently viewing information for.
 int getDatasetID()
          The ID number of the data set that the current user intends to upload predictions for.
 java.lang.Boolean getExcluded()
          Flag indicating whether the current user's submitted prediction should be excluded from ensembles and further uploads should be prevented.
 java.lang.String getFileDesc()
          The description of the file that the current user intends to upload.
 java.lang.String getFilename()
          The name of the file the current user intends to upload.
 java.lang.Boolean getLoggedIn()
          Indicates whether a user is currently logged in.
 java.lang.String getName()
          The username of the current user.
 java.lang.Boolean getUploadingData()
          A flag indicating whether the current user intends to upload data or predictions.
 java.lang.Boolean getUploadReady()
          Checks whether the current user is ready to upload a file.
 java.lang.String getUploadType()
          A string indicating whether the current user intends to upload data or predictions.
 boolean isAdmin()
          Determines if the user has administrative privileges.
 java.lang.String logout()
          Logs the current user out, then navigates back to the index.
 void ready()
          Registers than the user is ready to upload a file.
 void setDatasetID(int datasetID)
          Sets the ID number of the data set that the current user intends to upload predictions for.
 void setExcluded(java.lang.Boolean excluded)
          Sets a flag indicating whether the current user's submitted prediction should be excluded from ensembles and further uploads should be prevented.
 void setFileDesc(java.lang.String fileDesc)
          Sets the description of the file that the current user intends to upload.
 void setFilename(java.lang.String filename)
          Sets the name of the file the current user intends to upload.
 void setLoggedIn(java.lang.Boolean loggedIn)
          Sets a flag Indicating whether a user is currently logged in.
 void setName(java.lang.String name)
          Sets the username of the current user, indicating that a user has logged in.
 void setUploadingData(java.lang.Boolean uploadingData)
          Sets a flag indicating whether the current user intends to upload data or predictions.
 void setUploadReady(java.lang.Boolean uploadReady)
          Sets flag indicating whether the current user is ready to upload a file.
 java.lang.String toDataInfo(Data_set data)
          Used to navigate to a page that displays info about a given data set.
 java.lang.String toUpload()
          Checks if there is a user logged in, and navigates accordingly.
 java.lang.String upload()
          Registers that an upload has been made, then returns a navigation string.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

UserBean

public UserBean()
Method Detail

isAdmin

public boolean isAdmin()
Determines if the user has administrative privileges.

Returns:
True if this user is the admin, else false

ready

public void ready()
Registers than the user is ready to upload a file.


upload

public java.lang.String upload()
Registers that an upload has been made, then returns a navigation string.

Returns:
"/index"

toDataInfo

public java.lang.String toDataInfo(Data_set data)
Used to navigate to a page that displays info about a given data set.

Parameters:
data - The data set to view information for
Returns:
"/dataInfo"

getCurrentData

public Data_set getCurrentData()
The data set the user is currently viewing information for.

Returns:
The current data set

getName

public java.lang.String getName()
The username of the current user.

Returns:
The current user's name

setName

public void setName(java.lang.String name)
Sets the username of the current user, indicating that a user has logged in.

Parameters:
name - The current user's name

getFilename

public java.lang.String getFilename()
The name of the file the current user intends to upload.

Returns:
The name of a file to upload

setFilename

public void setFilename(java.lang.String filename)
Sets the name of the file the current user intends to upload.


getFileDesc

public java.lang.String getFileDesc()
The description of the file that the current user intends to upload.

Returns:
A description of a file

setFileDesc

public void setFileDesc(java.lang.String fileDesc)
Sets the description of the file that the current user intends to upload.


getUploadType

public java.lang.String getUploadType()
A string indicating whether the current user intends to upload data or predictions.

Returns:
A string indicating the upload type

getDatasetID

public int getDatasetID()
The ID number of the data set that the current user intends to upload predictions for.

Returns:
The ID number of the data set

setDatasetID

public void setDatasetID(int datasetID)
Sets the ID number of the data set that the current user intends to upload predictions for.


getUploadReady

public java.lang.Boolean getUploadReady()
Checks whether the current user is ready to upload a file.

Returns:
True if the user is ready, else false

setUploadReady

public void setUploadReady(java.lang.Boolean uploadReady)
Sets flag indicating whether the current user is ready to upload a file.

Parameters:
uploadReady - True if the user is ready, else false

setUploadingData

public void setUploadingData(java.lang.Boolean uploadingData)
Sets a flag indicating whether the current user intends to upload data or predictions.

Parameters:
uploadingData - True if the user is uploading data, false if predictions

getUploadingData

public java.lang.Boolean getUploadingData()
A flag indicating whether the current user intends to upload data or predictions.

Parameters:
uploadingData - True if the user is uploading data, false if predictions

toUpload

public java.lang.String toUpload()
Checks if there is a user logged in, and navigates accordingly.

Returns:
"/login" if no user is logged in, else "/upload/upload"

logout

public java.lang.String logout()
Logs the current user out, then navigates back to the index.

Returns:
"/index"

getLoggedIn

public java.lang.Boolean getLoggedIn()
Indicates whether a user is currently logged in.

Returns:
True if a user is logged in, else false

setLoggedIn

public void setLoggedIn(java.lang.Boolean loggedIn)
Sets a flag Indicating whether a user is currently logged in.


getExcluded

public java.lang.Boolean getExcluded()
Flag indicating whether the current user's submitted prediction should be excluded from ensembles and further uploads should be prevented.

Returns:
True if the user is excluded, else false

setExcluded

public void setExcluded(java.lang.Boolean excluded)
Sets a flag indicating whether the current user's submitted prediction should be excluded from ensembles and further uploads should be prevented.