org.optimizationservices.oscommon.util
Class OSParameter

java.lang.Object
  extended by org.optimizationservices.oscommon.util.OSParameter

public final class OSParameter
extends java.lang.Object

The OSParameter class stores predefined parameters/options (public an d static) used in other Optimization Services classes.

Since:
OS 1.0
Version:
1.0, 03/14/2004
Author:
Robert Fourer, Jun Ma, Kipp Martin

Field Summary
static boolean ALLOW_IO_OPERATIONS_BY_USERS
          ALLOW_IO_OPERATIONS_BY_USERS holds whether the users can carry out io operations (through option files).
static boolean APPEND_PRINT_FILE
          APPEND_PRINT_FILE holds whether to append or overwrite the PrintFile.
static java.lang.String BACKUP_FOLDER
          BACKUP_FOLDER holds the main system folder for backing up.
static java.lang.String[] CLEAN_UP_FOLDERS
          CLEAN_UP_FOLDERS holds the folder to clean up.
static java.lang.String CODE_DRIVE
          CODE_DRIVE holds the disk drive of the code installation.
static java.lang.String CODE_HOME
          CODE_HOME holds the home directory of home.
static double CPU_SPEED
          CPU_SPEED holds the cpu speed of the server.
static int DEFAULT_OUTPUT
          DEFAULT_OUTPUT holds the default output to print.
static java.lang.String[] DIRECTORIES_TO_DELETE
          DIRECTORIES_TO_DELETE holds the directories to delete after the solver's solve method is finished.
static java.lang.String[] DIRECTORIES_TO_MAKE
          DIRECTORIES_TO_MAKE holds the directories to make before invoking the solver's solve method.
static double DISK_SPACE
          DISK_SPACE holds the total disk space of the server.
static java.lang.String[] FILES_TO_CREATE
          FILES_TO_CREATE holds the files to create before invoking the solver's solve method.
static java.lang.String[] FILES_TO_DELETE
          FILES_TO_DELETE holds the files to delete after the solver's solve method is finished.
static java.lang.String FML_PUBLIC_SITE
          FML_PUBLIC_SITE holds the value of the FML schema public site.
static java.lang.String FROM_EMAIL
          FROM_EMAIL holds the from email address to send the email.
static java.lang.String FROM_PASSWORD
          FROM_PASSWORD holds the from email address to send the email.
static java.lang.String[] INPUT_FILES_TO_COPY_FROM
          INPUT_FILES_TO_COPY_FROM holds the names of the input files to copy from before invoking the solver's solve method.
static java.lang.String[] INPUT_FILES_TO_COPY_TO
          INPUT_FILES_TO_COPY_TO holds the names of the input files to copy to before invoking the solver's solve method.
static java.lang.String[] INPUT_FILES_TO_MOVE_FROM
          INPUT_FILES_TO_MOVE_FROM holds the names of the input files to move from before invoking the solver's solve method.
static java.lang.String[] INPUT_FILES_TO_MOVE_TO
          INPUT_FILES_TO_MOVE_TO holds the names of the input files to move to before invoking the solver's solve method.
static long JOB_MAX_HOURS
          JOB_MAX_HOUR holds the maximum hours allowed for a job.
static long JOB_MAX_MINUTES
          JOB_MAX_MINUTE holds the maximum minutes allowed for a job.
static long JOB_MAX_SECONDS
          JOB_MAX_SECOND holds the maximum seconds allowed for a job.
static double JOB_MAX_TIME
          JOB_MAX_TIME holds the maximum job time in seconds.
static java.lang.String LOG_FILE
          LOG_FILE holds the main system file for logging messages and errors.
static java.lang.String LOG_FOLDER
          LOG_FOLDER holds the main system folder for logging messages and errors.
static java.lang.String MAIL_MESSAGE
          MAIL_MESSAGE holds the email message body.
static java.lang.String MAIL_SUBJECT
          MAIL_SUBJECT holds the email subject.
static int MAX_JOB_NUMBERS
          MAX_JOB_NUMBERS holds the maximum number of running jobs allowed per service.
static int MAX_JOBIDS_TO_KEEP
          MAX_JOBIDS_TO_KEEP holds the maximum number of job ids to keep before deleting them.
static int MAX_JOBS_PER_USER
          MAX_JOBS_PER_USER holds the maximum number of active jobs a user can run.
static long MAX_LOG_FILE_SIZE
          MAX_LOG_FILE_SIZE holds the maximum size of the log file before it is backed up and started again.
static int MAX_WAITING_NUMBERS
          MAX_WAITING_NUMBERS holds the maximum number of waiting jobs allowed per service.
static int MAXIMUM_TRIAL_NUMBER_FOR_SOLVE
          MAXIMUM_TRIAL_NUMBER_FOR_SOLVE holds the maximum number of trials for a (failed) solve before the service terminates.
static int MAXIMUM_WAIT_TIME_BEFORE_NEXT_TRIAL
          MAXIMUM_WAIT_TIME_BEFORE_NEXT_TRIAL holds the maximum wait time (in milliseconds before the service tries another solve after the last solve.
static double MEMORY_SIZE
          MEMORY_SIZE holds the total physical memory of the server.
static long MINIMUM_DISKSPACE_TRIGGER
          MINIMUM_DISKSPACE_TRIGGER holds the minimum disk space before the automatic clean up is triggered to delete temporary files.
static long MINIMUM_MEMORY_TRIGGER
          MINIMUM_MEMORY_TRIGGER holds the minimum memory before the automatic clean up is triggered to get more memory.
static int MINIMUM_WAIT_TIME_BEFORE_NEXT_TRIAL
          MINIMUM_WAIT_TIME_BEFORE_NEXT_TRIAL holds the minimum wait time (in milliseconds before the service tries another solve after the last solve.
static java.lang.String OS_REGISTRY_SITE
          OS_REGISTRY_SITE holds the site of the OS Registry.
static java.lang.String OS_SCHEDULER_SITE
          OS_SCHEDULER_SITE holds the site of the OS scheduler.
static java.lang.String OS_SCHEMA_SITE
          OS_SCHEMA_SITE holds the value of the OSxL schema's public site.
static java.lang.String OS_SERVICE_SITE
          OS_SERVICE_SITE holds the main site of the OS services.
static java.lang.String OS_SITE
          OS_SITE holds the site of optimizationservices.org.
static java.lang.String[] OUTPUT_FILES_TO_COPY_FROM
          OUTPUT_FILES_TO_COPY_FROM holds the names of the output files to copy from after the solver's solve method is finished.
static java.lang.String[] OUTPUT_FILES_TO_COPY_TO
          OUTPUT_FILES_TO_COPY_TO holds the names of the output files to copy to after the solver's solve method is finished.
static java.lang.String[] OUTPUT_FILES_TO_MOVE_FROM
          OUTPUT_FILES_TO_MOVE_FROM holds the names of the output files to move from after the solver's solve method is finished.
static java.lang.String[] OUTPUT_FILES_TO_MOVE_TO
          OUTPUT_FILES_TO_MOVE_TO holds the names of the output files to move to after the solver's solve method is finished.
static java.lang.String PARAMETER_FILE
          PARAMETER_FILE holds the file that keeps the parameter information.
static boolean PARSE_INSTANCE_INPUT
          PARSE_INSTANCE_INPUT holds whether to parse the OSiL instance input arguments of the solve or send method.
static java.lang.String PRINT_FILE
          PRINT_FILE holds the main system file for printing a sting.
static java.lang.String PRINT_FOLDER
          PRINT_FOLDER holds the main system folder for printing a string.
static java.io.StringWriter PRINT_STRING_WRITER
          PRINT_STRING_WRITER holds the main system string writer for printing a string.
static java.lang.String PROCESS_FILE
          PROCESS_FILE holds the file that keeps the service process information in OSpL.
static java.lang.String[] PROCESSES_TO_KILL
          PROCESSES_TO_KILL holds the names of the processes to kill after tge sikver's solve method is finished.
static java.lang.String REGISTRY_DETAILED_REPORT
          REGISTRY_DETAILED_REPORT holds the file to log the registry detailed report.
static java.lang.String REGISTRY_FILE
          REGISTRY_FILE holds the file that keeps the registry information.
static java.lang.String REGISTRY_LOG_FILE
          REGISTRY_LOG_FILE holds the main registry file for logging registy related messages.
static java.lang.String REGISTRY_LOG_FOLDER
          REGISTRY_LOG_FOLDER holds the main registry folder for logging registy related messages.
static java.lang.String REGISTRY_REGISTRATION_FILE
          REGISTRY_REGISTRATION_FILE holds the main registry file for logging registration related messages.
static java.lang.String REGISTRY_SUMMARY_REPORT
          REGISTRY_SUMMARY_REPORT holds the file to log the registry summary report.
static boolean REQUIRE_LICENSE
          REQUIRE_LICENSE holds whether the service needs a license number for each user.
static boolean REQUIRE_ONLY_JOB_ID_TO_KILL_JOB
          REQUIRE_ONLY_JOB_ID_TO_KILL_JOB holds whether only the job id (no user name/password/license) is needed to kill a job.
static boolean REQUIRE_ONLY_JOB_ID_TO_RETRIEVE_JOB_RESULT
          REQUIRE_ONLY_JOB_ID_TO_RETRIEVE_JOB_RESULT holds whether only the job id (no user name/password/license) is needed to retrieve a job result.
static boolean REQUIRE_PASSWORD
          REQUIRE_PASSWORD holds whether the service needs a password for each user.
static boolean REQUIRE_USER_NAME
          REQUIRE_USER_NAME holds whether the service needs user name to be submitted.
static java.lang.String[] REQUIRED_DIRECTORIES_AND_FILES
          REQUIRED_DIRECTORIES_AND_FILES holds the required directories and files for invoking the solver's solve method.
static boolean SAVE_INPUTS
          SAVE_INPUTS holds whether to save the OSiL and OSoL input arguments of the solve or send method.
static boolean SCHEDULER_WITH_REGISTRY
          SCHEDULER_WITH_REGISTRY holds whether the scheduler service locally sits with the registry service in the same web application.
static java.lang.String SERVICE_NAME
          SERVICE_NAME holds the service name.
static int SERVICE_POLLING_INTERVAL_LONG
          SERVICE_POLLING_INTERVAL_LONG holds the number of milli-seconds that a service periodically carries out maintentance.
static int SERVICE_POLLING_INTERVAL_MEDIUM
          SERVICE_POLLING_INTERVAL_MEDIUM holds the number of milli-seconds that a service periodically carries out maintentance.
static int SERVICE_POLLING_INTERVAL_SHORT
          SERVICE_POLLING_INTERVAL_SHORT holds the number of milli-seconds that a service periodically carries out maintentance.
static java.lang.String SERVICE_TYPE
          SERVICE_TYPE holds the service type.
static java.lang.String SERVICE_URI
          SERVICE_URI holds the service uri.
static java.lang.String SMTP_SERVER
          SMTP_SERVER holds the smtp server address to send the email.
static java.lang.String SOLVER_CLASS_NAME
          SOLVER_CLASS_NAME holds the full class name (including name space) of the solver
static java.lang.String SOLVER_LIBRARY
          SOLVER_LIBRARY holds the library file of the solver class.
static java.lang.String TEMP_FILE_FOLDER
          TEMP_FILE_FOLDER holds the folder to save temporary files.
static long TEMP_FILE_MAX_DAYS
          TEMP_FILE_MAX_DAY holds the maximum days allowed to keep a temporary file.
static long TEMP_FILE_MAX_HOURS
          TEMP_FILE_MAX_HOUR holds the maximum hours allowed to keep a temporary file.
static long TEMP_FILE_MAX_MINUTES
          TEMP_FILE_MAX_MINUTE holds the maximum minutes allowed to keep a temporary file.
static long TEMP_FILE_MAX_SECONDS
          TEMP_FILE_MAX_SECOND holds the maximum seconds allowed to keep a temporary file.
static long TEMP_FILE_MIN_DAYS
          TEMP_FILE_MIN_DAY holds the minimum days allowed to keep a temporary file.
static long TEMP_FILE_MIN_HOURS
          TEMP_FILE_MIN_HOUR holds the minimum hours allowed to keep a temporary file.
static long TEMP_FILE_MIN_MINUTES
          TEMP_FILE_MIN_MINUTE holds the minimum minutes allowed to keep a temporary file.
static long TEMP_FILE_MIN_SECONDS
          TEMP_FILE_MIN_SECOND holds the minimum seconds allowed to keep a temporary file.
static java.lang.String TO_EMAIL
          TO_EMAIL holds the to email address to send the email.
static java.lang.String[] USER_NAMES
          USER_NAMES holds all the user names.
static boolean VALIDATE
          VALIDATE holds whether the parser should be validating against the xml schema or not.
static java.lang.String XML_ENCODING_STYLE
          XML_ENCODING_STYLE holds the xml encoding style.
static boolean XML_INDENTING
          XML_INDENTING holds whether to write out the xml indented.
 
Constructor Summary
OSParameter()
          Default constructor.
 
Method Summary
static boolean checkLicense(java.lang.String userName, java.lang.String license)
          check license given a user name and license
static boolean checkUserNameAndPassword(java.lang.String userName, java.lang.String password)
          check user name and password.
static void main(java.lang.String[] args)
          main for test purposes.
static boolean readAndSetOSParameter(java.lang.String osParameter, boolean isFile, boolean validate)
          read an osParameter file or string and and set the parameters.
static java.lang.String writeOSParameter()
          write the OSParameter to an xml string.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CODE_DRIVE

public static java.lang.String CODE_DRIVE
CODE_DRIVE holds the disk drive of the code installation.


CODE_HOME

public static java.lang.String CODE_HOME
CODE_HOME holds the home directory of home.


PARAMETER_FILE

public static java.lang.String PARAMETER_FILE
PARAMETER_FILE holds the file that keeps the parameter information.


REGISTRY_FILE

public static java.lang.String REGISTRY_FILE
REGISTRY_FILE holds the file that keeps the registry information.


PROCESS_FILE

public static java.lang.String PROCESS_FILE
PROCESS_FILE holds the file that keeps the service process information in OSpL.


TEMP_FILE_FOLDER

public static java.lang.String TEMP_FILE_FOLDER
TEMP_FILE_FOLDER holds the folder to save temporary files.


LOG_FOLDER

public static java.lang.String LOG_FOLDER
LOG_FOLDER holds the main system folder for logging messages and errors.


LOG_FILE

public static java.lang.String LOG_FILE
LOG_FILE holds the main system file for logging messages and errors.


MAX_LOG_FILE_SIZE

public static long MAX_LOG_FILE_SIZE
MAX_LOG_FILE_SIZE holds the maximum size of the log file before it is backed up and started again.


BACKUP_FOLDER

public static java.lang.String BACKUP_FOLDER
BACKUP_FOLDER holds the main system folder for backing up.


REGISTRY_LOG_FOLDER

public static java.lang.String REGISTRY_LOG_FOLDER
REGISTRY_LOG_FOLDER holds the main registry folder for logging registy related messages.


REGISTRY_LOG_FILE

public static java.lang.String REGISTRY_LOG_FILE
REGISTRY_LOG_FILE holds the main registry file for logging registy related messages.


REGISTRY_REGISTRATION_FILE

public static java.lang.String REGISTRY_REGISTRATION_FILE
REGISTRY_REGISTRATION_FILE holds the main registry file for logging registration related messages.


REGISTRY_SUMMARY_REPORT

public static java.lang.String REGISTRY_SUMMARY_REPORT
REGISTRY_SUMMARY_REPORT holds the file to log the registry summary report.


REGISTRY_DETAILED_REPORT

public static java.lang.String REGISTRY_DETAILED_REPORT
REGISTRY_DETAILED_REPORT holds the file to log the registry detailed report.


PRINT_FOLDER

public static java.lang.String PRINT_FOLDER
PRINT_FOLDER holds the main system folder for printing a string.


PRINT_FILE

public static java.lang.String PRINT_FILE
PRINT_FILE holds the main system file for printing a sting.


APPEND_PRINT_FILE

public static boolean APPEND_PRINT_FILE
APPEND_PRINT_FILE holds whether to append or overwrite the PrintFile.


PRINT_STRING_WRITER

public static java.io.StringWriter PRINT_STRING_WRITER
PRINT_STRING_WRITER holds the main system string writer for printing a string. need to call the .toString() method to get the final print sting.


DEFAULT_OUTPUT

public static int DEFAULT_OUTPUT
DEFAULT_OUTPUT holds the default output to print.


MINIMUM_DISKSPACE_TRIGGER

public static long MINIMUM_DISKSPACE_TRIGGER
MINIMUM_DISKSPACE_TRIGGER holds the minimum disk space before the automatic clean up is triggered to delete temporary files.


MINIMUM_MEMORY_TRIGGER

public static long MINIMUM_MEMORY_TRIGGER
MINIMUM_MEMORY_TRIGGER holds the minimum memory before the automatic clean up is triggered to get more memory.


CLEAN_UP_FOLDERS

public static java.lang.String[] CLEAN_UP_FOLDERS
CLEAN_UP_FOLDERS holds the folder to clean up.


MAX_JOBIDS_TO_KEEP

public static int MAX_JOBIDS_TO_KEEP
MAX_JOBIDS_TO_KEEP holds the maximum number of job ids to keep before deleting them.


JOB_MAX_HOURS

public static long JOB_MAX_HOURS
JOB_MAX_HOUR holds the maximum hours allowed for a job.


JOB_MAX_MINUTES

public static long JOB_MAX_MINUTES
JOB_MAX_MINUTE holds the maximum minutes allowed for a job.


JOB_MAX_SECONDS

public static long JOB_MAX_SECONDS
JOB_MAX_SECOND holds the maximum seconds allowed for a job.


JOB_MAX_TIME

public static double JOB_MAX_TIME
JOB_MAX_TIME holds the maximum job time in seconds.


TEMP_FILE_MAX_DAYS

public static long TEMP_FILE_MAX_DAYS
TEMP_FILE_MAX_DAY holds the maximum days allowed to keep a temporary file.


TEMP_FILE_MAX_HOURS

public static long TEMP_FILE_MAX_HOURS
TEMP_FILE_MAX_HOUR holds the maximum hours allowed to keep a temporary file.


TEMP_FILE_MAX_MINUTES

public static long TEMP_FILE_MAX_MINUTES
TEMP_FILE_MAX_MINUTE holds the maximum minutes allowed to keep a temporary file.


TEMP_FILE_MAX_SECONDS

public static long TEMP_FILE_MAX_SECONDS
TEMP_FILE_MAX_SECOND holds the maximum seconds allowed to keep a temporary file.


TEMP_FILE_MIN_DAYS

public static long TEMP_FILE_MIN_DAYS
TEMP_FILE_MIN_DAY holds the minimum days allowed to keep a temporary file.


TEMP_FILE_MIN_HOURS

public static long TEMP_FILE_MIN_HOURS
TEMP_FILE_MIN_HOUR holds the minimum hours allowed to keep a temporary file.


TEMP_FILE_MIN_MINUTES

public static long TEMP_FILE_MIN_MINUTES
TEMP_FILE_MIN_MINUTE holds the minimum minutes allowed to keep a temporary file.


TEMP_FILE_MIN_SECONDS

public static long TEMP_FILE_MIN_SECONDS
TEMP_FILE_MIN_SECOND holds the minimum seconds allowed to keep a temporary file.


CPU_SPEED

public static double CPU_SPEED
CPU_SPEED holds the cpu speed of the server.


MEMORY_SIZE

public static double MEMORY_SIZE
MEMORY_SIZE holds the total physical memory of the server.


DISK_SPACE

public static double DISK_SPACE
DISK_SPACE holds the total disk space of the server.


MAX_JOB_NUMBERS

public static int MAX_JOB_NUMBERS
MAX_JOB_NUMBERS holds the maximum number of running jobs allowed per service.


MAX_WAITING_NUMBERS

public static int MAX_WAITING_NUMBERS
MAX_WAITING_NUMBERS holds the maximum number of waiting jobs allowed per service.


SERVICE_POLLING_INTERVAL_SHORT

public static int SERVICE_POLLING_INTERVAL_SHORT
SERVICE_POLLING_INTERVAL_SHORT holds the number of milli-seconds that a service periodically carries out maintentance. It is relatively short.


SERVICE_POLLING_INTERVAL_MEDIUM

public static int SERVICE_POLLING_INTERVAL_MEDIUM
SERVICE_POLLING_INTERVAL_MEDIUM holds the number of milli-seconds that a service periodically carries out maintentance. It is not too short and nor too long.


SERVICE_POLLING_INTERVAL_LONG

public static int SERVICE_POLLING_INTERVAL_LONG
SERVICE_POLLING_INTERVAL_LONG holds the number of milli-seconds that a service periodically carries out maintentance. It is relatively long.


SOLVER_CLASS_NAME

public static java.lang.String SOLVER_CLASS_NAME
SOLVER_CLASS_NAME holds the full class name (including name space) of the solver


SOLVER_LIBRARY

public static java.lang.String SOLVER_LIBRARY
SOLVER_LIBRARY holds the library file of the solver class. No need if the library is registered or on a class path.


MAXIMUM_TRIAL_NUMBER_FOR_SOLVE

public static int MAXIMUM_TRIAL_NUMBER_FOR_SOLVE
MAXIMUM_TRIAL_NUMBER_FOR_SOLVE holds the maximum number of trials for a (failed) solve before the service terminates.


MINIMUM_WAIT_TIME_BEFORE_NEXT_TRIAL

public static int MINIMUM_WAIT_TIME_BEFORE_NEXT_TRIAL
MINIMUM_WAIT_TIME_BEFORE_NEXT_TRIAL holds the minimum wait time (in milliseconds before the service tries another solve after the last solve.


MAXIMUM_WAIT_TIME_BEFORE_NEXT_TRIAL

public static int MAXIMUM_WAIT_TIME_BEFORE_NEXT_TRIAL
MAXIMUM_WAIT_TIME_BEFORE_NEXT_TRIAL holds the maximum wait time (in milliseconds before the service tries another solve after the last solve.


REQUIRED_DIRECTORIES_AND_FILES

public static java.lang.String[] REQUIRED_DIRECTORIES_AND_FILES
REQUIRED_DIRECTORIES_AND_FILES holds the required directories and files for invoking the solver's solve method.


DIRECTORIES_TO_MAKE

public static java.lang.String[] DIRECTORIES_TO_MAKE
DIRECTORIES_TO_MAKE holds the directories to make before invoking the solver's solve method.


FILES_TO_CREATE

public static java.lang.String[] FILES_TO_CREATE
FILES_TO_CREATE holds the files to create before invoking the solver's solve method.


SAVE_INPUTS

public static boolean SAVE_INPUTS
SAVE_INPUTS holds whether to save the OSiL and OSoL input arguments of the solve or send method.


PARSE_INSTANCE_INPUT

public static boolean PARSE_INSTANCE_INPUT
PARSE_INSTANCE_INPUT holds whether to parse the OSiL instance input arguments of the solve or send method.


INPUT_FILES_TO_MOVE_FROM

public static java.lang.String[] INPUT_FILES_TO_MOVE_FROM
INPUT_FILES_TO_MOVE_FROM holds the names of the input files to move from before invoking the solver's solve method. It should countain the same number of files as in INPUT_FILES_TO_MOVE_TO.


INPUT_FILES_TO_MOVE_TO

public static java.lang.String[] INPUT_FILES_TO_MOVE_TO
INPUT_FILES_TO_MOVE_TO holds the names of the input files to move to before invoking the solver's solve method. It should countain the same number of files as in INPUT_FILES_TO_MOVE_FROM.


INPUT_FILES_TO_COPY_FROM

public static java.lang.String[] INPUT_FILES_TO_COPY_FROM
INPUT_FILES_TO_COPY_FROM holds the names of the input files to copy from before invoking the solver's solve method. It should countain the same number of files as in INPUT_FILES_TO_COPY_TO.


INPUT_FILES_TO_COPY_TO

public static java.lang.String[] INPUT_FILES_TO_COPY_TO
INPUT_FILES_TO_COPY_TO holds the names of the input files to copy to before invoking the solver's solve method. It should countain the same number of files as in INPUT_FILES_TO_COPY_FROM.


OUTPUT_FILES_TO_COPY_FROM

public static java.lang.String[] OUTPUT_FILES_TO_COPY_FROM
OUTPUT_FILES_TO_COPY_FROM holds the names of the output files to copy from after the solver's solve method is finished. It should countain the same number of files as in OUTPUT_FILES_TO_COPY_TO.


OUTPUT_FILES_TO_COPY_TO

public static java.lang.String[] OUTPUT_FILES_TO_COPY_TO
OUTPUT_FILES_TO_COPY_TO holds the names of the output files to copy to after the solver's solve method is finished. It should countain the same number of files as in OUTPUT_FILES_TO_COPY_FROM.


OUTPUT_FILES_TO_MOVE_FROM

public static java.lang.String[] OUTPUT_FILES_TO_MOVE_FROM
OUTPUT_FILES_TO_MOVE_FROM holds the names of the output files to move from after the solver's solve method is finished. It should countain the same number of files as in OUTPUT_FILES_TO_MOVE_TO.


OUTPUT_FILES_TO_MOVE_TO

public static java.lang.String[] OUTPUT_FILES_TO_MOVE_TO
OUTPUT_FILES_TO_MOVE_TO holds the names of the output files to move to after the solver's solve method is finished. It should countain the same number of files as in OUTPUT_FILES_TO_MOVE_FROM.


FILES_TO_DELETE

public static java.lang.String[] FILES_TO_DELETE
FILES_TO_DELETE holds the files to delete after the solver's solve method is finished.


DIRECTORIES_TO_DELETE

public static java.lang.String[] DIRECTORIES_TO_DELETE
DIRECTORIES_TO_DELETE holds the directories to delete after the solver's solve method is finished.


PROCESSES_TO_KILL

public static java.lang.String[] PROCESSES_TO_KILL
PROCESSES_TO_KILL holds the names of the processes to kill after tge sikver's solve method is finished.


SERVICE_NAME

public static java.lang.String SERVICE_NAME
SERVICE_NAME holds the service name.


SERVICE_URI

public static java.lang.String SERVICE_URI
SERVICE_URI holds the service uri.


SERVICE_TYPE

public static java.lang.String SERVICE_TYPE
SERVICE_TYPE holds the service type.


OS_SERVICE_SITE

public static java.lang.String OS_SERVICE_SITE
OS_SERVICE_SITE holds the main site of the OS services.


OS_REGISTRY_SITE

public static java.lang.String OS_REGISTRY_SITE
OS_REGISTRY_SITE holds the site of the OS Registry.


OS_SCHEDULER_SITE

public static java.lang.String OS_SCHEDULER_SITE
OS_SCHEDULER_SITE holds the site of the OS scheduler.


SCHEDULER_WITH_REGISTRY

public static boolean SCHEDULER_WITH_REGISTRY
SCHEDULER_WITH_REGISTRY holds whether the scheduler service locally sits with the registry service in the same web application.


SMTP_SERVER

public static java.lang.String SMTP_SERVER
SMTP_SERVER holds the smtp server address to send the email.


FROM_EMAIL

public static java.lang.String FROM_EMAIL
FROM_EMAIL holds the from email address to send the email.


FROM_PASSWORD

public static java.lang.String FROM_PASSWORD
FROM_PASSWORD holds the from email address to send the email.


TO_EMAIL

public static java.lang.String TO_EMAIL
TO_EMAIL holds the to email address to send the email.


MAIL_SUBJECT

public static java.lang.String MAIL_SUBJECT
MAIL_SUBJECT holds the email subject.


MAIL_MESSAGE

public static java.lang.String MAIL_MESSAGE
MAIL_MESSAGE holds the email message body.


REQUIRE_USER_NAME

public static boolean REQUIRE_USER_NAME
REQUIRE_USER_NAME holds whether the service needs user name to be submitted.


REQUIRE_PASSWORD

public static boolean REQUIRE_PASSWORD
REQUIRE_PASSWORD holds whether the service needs a password for each user.


REQUIRE_LICENSE

public static boolean REQUIRE_LICENSE
REQUIRE_LICENSE holds whether the service needs a license number for each user.


REQUIRE_ONLY_JOB_ID_TO_RETRIEVE_JOB_RESULT

public static boolean REQUIRE_ONLY_JOB_ID_TO_RETRIEVE_JOB_RESULT
REQUIRE_ONLY_JOB_ID_TO_RETRIEVE_JOB_RESULT holds whether only the job id (no user name/password/license) is needed to retrieve a job result.


REQUIRE_ONLY_JOB_ID_TO_KILL_JOB

public static boolean REQUIRE_ONLY_JOB_ID_TO_KILL_JOB
REQUIRE_ONLY_JOB_ID_TO_KILL_JOB holds whether only the job id (no user name/password/license) is needed to kill a job.


MAX_JOBS_PER_USER

public static int MAX_JOBS_PER_USER
MAX_JOBS_PER_USER holds the maximum number of active jobs a user can run.


USER_NAMES

public static java.lang.String[] USER_NAMES
USER_NAMES holds all the user names.


ALLOW_IO_OPERATIONS_BY_USERS

public static boolean ALLOW_IO_OPERATIONS_BY_USERS
ALLOW_IO_OPERATIONS_BY_USERS holds whether the users can carry out io operations (through option files).


VALIDATE

public static boolean VALIDATE
VALIDATE holds whether the parser should be validating against the xml schema or not.


XML_INDENTING

public static boolean XML_INDENTING
XML_INDENTING holds whether to write out the xml indented.


FML_PUBLIC_SITE

public static java.lang.String FML_PUBLIC_SITE
FML_PUBLIC_SITE holds the value of the FML schema public site.


OS_SITE

public static java.lang.String OS_SITE
OS_SITE holds the site of optimizationservices.org.


OS_SCHEMA_SITE

public static java.lang.String OS_SCHEMA_SITE
OS_SCHEMA_SITE holds the value of the OSxL schema's public site.


XML_ENCODING_STYLE

public static java.lang.String XML_ENCODING_STYLE
XML_ENCODING_STYLE holds the xml encoding style.

Constructor Detail

OSParameter

public OSParameter()
Default constructor.

Method Detail

checkUserNameAndPassword

public static boolean checkUserNameAndPassword(java.lang.String userName,
                                               java.lang.String password)
check user name and password.

Parameters:
userName - holds the user name; can be null if the service requires only the password.
password - holds the password to check; can be null if the service requires only the user name.
Returns:
whether the user name and password are correct.

checkLicense

public static boolean checkLicense(java.lang.String userName,
                                   java.lang.String license)
check license given a user name and license

Parameters:
userName - holds the user name. can be null if the service requires only the license.
license - holds the license to check.
Returns:
whether the license is correct given the user name (if the user name is required.)

readAndSetOSParameter

public static boolean readAndSetOSParameter(java.lang.String osParameter,
                                            boolean isFile,
                                            boolean validate)
                                     throws java.lang.Exception
read an osParameter file or string and and set the parameters.

Parameters:
osParameter - holds the OS Parameter in a string which format follows the OSParameter schema.
isFile - holds whether the osParameter string is a file name or a string that literally holds the osParameter contents.
validate - holds whether the reader should be validating against the schema or not.
Returns:
whether the osParameter is read and set successfully or not.
Throws:
java.lang.Exception

writeOSParameter

public static java.lang.String writeOSParameter()
                                         throws java.lang.Exception
write the OSParameter to an xml string.

Returns:
the osParameter xml string.
Throws:
java.lang.Exception - if there are errors in writing the osParameter string.

main

public static void main(java.lang.String[] args)
main for test purposes.

Parameters:
argv - command line arguments.