|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectedu.wpi.prc.project.Project
public class Project
The Project class stores information specific to the PRC project.
Field Summary | |
---|---|
private static java.lang.String |
clientDir
|
private int |
clientPort
|
private static java.lang.String |
configFilePath
|
private java.lang.String |
dbPassword
|
private java.lang.String |
dbTypeStr
|
private java.lang.String |
dbURI
|
private java.lang.String |
dbUserName
|
private boolean |
defaultValidator
|
private java.lang.String |
failedSpotCheckActionStr
|
private static java.lang.String |
generatorProgram
|
private long |
id
|
private int |
minNumResults
|
private int |
minNumSpotChecks
|
private java.lang.String |
name
|
private java.lang.String |
password
|
private static Project |
project
|
private static java.lang.String |
resultValidatorProgram
|
private java.lang.String |
scienceApp
|
private int |
scienceAppPort
|
private static java.lang.String |
serverDir
|
private java.lang.String |
serverURI
|
private float |
spotCheckProbability
|
private java.lang.String |
transitionerURI
|
private static java.lang.String |
unixExtension
|
private static java.lang.String |
winExtension
|
Constructor Summary | |
---|---|
protected |
Project()
Protected constructor because this class is a singleton but needs to be constructed by Hibernate. |
Method Summary | |
---|---|
static Project |
createProject()
There is one case in which it is necessary to create a new project without reading project information from the database or from the project.properties file: when creating a new project from the ProjectBuilder. |
java.lang.String |
getClientDirectoryPath()
Returns the path to the client directory. |
int |
getClientPort()
|
java.lang.String |
getDbPassword()
|
DatabaseType |
getDbType()
|
protected java.lang.String |
getDbTypeStr()
|
java.lang.String |
getDbURI()
|
java.lang.String |
getDbUserName()
|
boolean |
getDefaultValidator()
|
protected java.lang.String |
getFailedSpotCheckActionStr()
|
java.lang.String |
getGeneratorPath()
Returns the path to the project specific work unit generator program. |
protected long |
getId()
|
int |
getMinNumResults()
|
int |
getMinNumSpotChecks()
|
java.lang.String |
getName()
|
private static OperatingSystemType |
getOSType()
Reads the "os.name" system property and parses it to determine what operating system is being used. |
java.lang.String |
getPassword()
|
private static java.lang.String |
getProjectPath()
|
java.lang.String |
getResultValidatorPath()
Returns the path to the project specific result validator program. |
java.lang.String |
getScienceApp()
|
java.lang.String |
getScienceAppPath()
Returns the path to the project specific science application. |
int |
getScienceAppPort()
|
private static java.lang.String |
getScriptExtension()
Returns the operating system specific file extension for scripts. |
java.lang.String |
getServerDirectoryPath()
Returns the path to the server directory. |
java.lang.String |
getServerURI()
|
SpotCheckFailureAction |
getSpotCheckFailureAction()
|
float |
getSpotCheckProbability()
|
java.lang.String |
getTransitionerURI()
|
static Project |
instance()
Retrieves the project information from the database and returns it as a Project object. |
static boolean |
projectFileExists()
Looks for the project configuration file in the default location. |
static Project |
readFromDatabase()
Attempts to read the project configuration from the database specified in the project configuration file. |
static Project |
readFromFile()
Retrieves the project settings from the configuration file rather than the database using the default location for the configuration file. |
static Project |
readFromFile(java.lang.String filePath)
Retrieves the project settings from the configuration file rather than the database allowing the path of the configuration file to be specified. |
void |
saveOrUpdate()
Saves this Project to the database or updates it if it already exists. |
void |
setClientPort(int clientPort)
|
void |
setDbPassword(java.lang.String dbPassword)
|
void |
setDbType(DatabaseType dbType)
|
protected void |
setDbTypeStr(java.lang.String dbTypeStr)
|
void |
setDbURI(java.lang.String dbPath)
|
void |
setDbUserName(java.lang.String dbUserName)
|
void |
setDefaultValidator(boolean defaultValidator)
|
protected void |
setFailedSpotCheckActionStr(java.lang.String failedSpotCheckActionStr)
|
protected void |
setId(long id)
|
void |
setMinNumResults(int minNumResults)
|
void |
setMinNumSpotChecks(int minNumSpotChecks)
|
void |
setName(java.lang.String name)
|
void |
setPassword(java.lang.String password)
|
void |
setScienceApp(java.lang.String scienceApp)
|
void |
setScienceAppPort(int scienceAppPort)
|
void |
setServerURI(java.lang.String projectURI)
|
void |
setSpotCheckFailureAction(SpotCheckFailureAction action)
Sets the action to take when a user fails a spot check. |
void |
setSpotCheckProbability(float spotCheckProbability)
|
void |
setTransitionerURI(java.lang.String transitionerURI)
|
void |
writeClientProjectFile(java.lang.String filePath)
Writes all configuration information that is necessary for client components to a file. |
void |
writeServerProjectFile(java.lang.String filePath)
Writes all configuration information that is necessary for server components to a file. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private static Project project
private static final java.lang.String configFilePath
private static final java.lang.String clientDir
private static final java.lang.String serverDir
private static final java.lang.String generatorProgram
private static final java.lang.String resultValidatorProgram
private static final java.lang.String unixExtension
private static final java.lang.String winExtension
private long id
private java.lang.String name
private java.lang.String password
private java.lang.String serverURI
private int clientPort
private java.lang.String scienceApp
private int scienceAppPort
private java.lang.String transitionerURI
private boolean defaultValidator
private java.lang.String dbTypeStr
private java.lang.String dbURI
private java.lang.String dbUserName
private java.lang.String dbPassword
private int minNumResults
private float spotCheckProbability
private int minNumSpotChecks
private java.lang.String failedSpotCheckActionStr
Constructor Detail |
---|
protected Project()
Method Detail |
---|
protected long getId()
protected void setId(long id)
id
- The id to set.public java.lang.String getName()
public void setName(java.lang.String name)
name
- The name to set.public java.lang.String getPassword()
public void setPassword(java.lang.String password)
password
- The password to set.protected java.lang.String getDbTypeStr()
protected void setDbTypeStr(java.lang.String dbTypeStr)
dbTypeStr
- The dbTypeStr to set.public DatabaseType getDbType()
public void setDbType(DatabaseType dbType)
dbType
- The dbType to set.public java.lang.String getServerURI()
public void setServerURI(java.lang.String projectURI)
projectURI
- The serverURI to set.public int getClientPort()
public void setClientPort(int clientPort)
clientPort
- The clientPort to set.public java.lang.String getScienceApp()
public void setScienceApp(java.lang.String scienceApp)
scienceApp
- The scienceApp to set.public int getScienceAppPort()
public void setScienceAppPort(int scienceAppPort)
scienceAppPort
- The scienceAppPort to set.public java.lang.String getTransitionerURI()
public void setTransitionerURI(java.lang.String transitionerURI)
transitionerURI
- The transitionerURI to set.public boolean getDefaultValidator()
public void setDefaultValidator(boolean defaultValidator)
defaultValidator
- The defaultValidator to set.public java.lang.String getDbURI()
public void setDbURI(java.lang.String dbPath)
dbPath
- The dbPath to set.public java.lang.String getDbUserName()
public void setDbUserName(java.lang.String dbUserName)
dbUserName
- The dbUserName to set.public java.lang.String getDbPassword()
public void setDbPassword(java.lang.String dbPassword)
dbPassword
- The dbPassword to set.public int getMinNumResults()
public void setMinNumResults(int minNumResults)
minNumResults
- The minNumResults to set.public float getSpotCheckProbability()
public void setSpotCheckProbability(float spotCheckProbability)
spotCheckProbability
- The spotCheckProbability to set.public int getMinNumSpotChecks()
public void setMinNumSpotChecks(int minNumSpotChecks)
minNumSpotChecks
- The minNumSpotChecks to set.protected java.lang.String getFailedSpotCheckActionStr()
protected void setFailedSpotCheckActionStr(java.lang.String failedSpotCheckActionStr)
failedSpotCheckActionStr
- The failedSpotCheckActionStr to set.public SpotCheckFailureAction getSpotCheckFailureAction()
public void setSpotCheckFailureAction(SpotCheckFailureAction action)
action
- The action to take.private static OperatingSystemType getOSType()
private static java.lang.String getScriptExtension()
private static java.lang.String getProjectPath()
public java.lang.String getClientDirectoryPath()
public java.lang.String getServerDirectoryPath()
public java.lang.String getGeneratorPath()
public java.lang.String getResultValidatorPath()
public java.lang.String getScienceAppPath()
public void saveOrUpdate() throws org.hibernate.HibernateException
org.hibernate.HibernateException
public static boolean projectFileExists()
public static Project readFromFile() throws MissingConfigurationFileException
MissingConfigurationFileException
public void writeServerProjectFile(java.lang.String filePath) throws java.io.IOException
filePath
- Path to the file that should be written.
java.io.IOException
public void writeClientProjectFile(java.lang.String filePath) throws java.io.IOException
filePath
- Path to the file that should be written.
java.io.IOException
public static Project readFromFile(java.lang.String filePath) throws MissingConfigurationFileException
filePath
- The path to the project configuration file.
MissingConfigurationFileException
public static Project readFromDatabase() throws org.hibernate.HibernateException
org.hibernate.HibernateException
public static Project createProject()
public static Project instance()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |