|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.sun.slamd.server.ConfigHandler
This class handles all interaction with the LDAP directory used to store the SLAMD configuration. In addition to working with configuration, this class provides methods for storing and retrieving scheduler information and the status of jobs in progress or that have been completed.
| Constructor Summary | |
ConfigHandler(SLAMDServer slamdServer)
Creates a new configuration handler that will be associated with the provided SLAMD server. |
|
| Method Summary | |
void |
addJobClass(JobClass jobClass)
Adds information about the provided SLAMD job class into the configuration directory. |
void |
addJobFolder(java.lang.String folderName,
boolean displayInReadOnlyMode)
Attempts to create the specified folder in the configuration directory. |
void |
addJobsToVirtualFolder(java.lang.String folderName,
java.lang.String[] jobIDs)
Adds the specified set of job IDs to the named virtual folder. |
void |
addOptimizingJob(OptimizingJob optimizingJob,
java.lang.String folderName)
Adds information about the provided optimizing job into the configuration directory. |
void |
addScheduledJob(Job job,
java.lang.String folderName)
Writes information about the specified job into the configuration directory so that it will remain scheduled even if the SLAMD server is shut down and restarted for some reason. |
void |
addUploadedFile(java.lang.String folderName,
UploadedFile uploadedFile)
Adds the specified file to the specified folder in the configuration directory. |
void |
closeConfigHandler()
Closes the connection to the configuration directory. |
void |
createVirtualFolder(java.lang.String folderName,
java.lang.String folderFilter,
java.lang.String[] jobIDs,
boolean displayInReadOnlyMode)
Creates a new virtual job folder with the provided information. |
void |
deleteScheduledJob(java.lang.String jobID)
Removes information about the specified job from the configuration directory. |
void |
deleteScheduledJobNoCheck(java.lang.String jobID)
Removes information about the specified job from the configuration directory. |
void |
deregisterAsSubscriber(ConfigSubscriber configSubscriber)
Deregisters the specified subscriber so that it is no longer notified of changes to the configuration. |
Job[] |
doJobSearch(java.lang.String searchFilter)
Performs a search in the configuration directory that retrieves all jobs matching the provided filter. |
Job[] |
doSummaryJobSearch(java.lang.String searchFilter)
Performs a search in the configuration directory to retrieve all jobs matching the provided search filter. |
Job[] |
getCompletedJobs(java.lang.String folderName)
Retrieves the set of jobs that have been completed in the requested folder. |
Job[] |
getCompletedNonOptimizingJobs(java.lang.String folderName)
Retrieves the set of jobs that have been completed in the requested folder, excluding any jobs that are iterations of an optimizing job. |
ConfigSubscriber[] |
getConfigSubscribers()
Retrieves the set of configuration subscribers registered with this configuration handler. |
void |
getFolderExportData(java.lang.String folderName,
java.io.PrintWriter writer)
Exports the contents of the specified real job folder. |
Job |
getJob(java.lang.String jobID)
Retrieves the specified job from the configuration directory. |
JobFolder |
getJobFolder(java.lang.String folderName)
Retrieves the requested real job folder from the configuration directory. |
java.lang.String |
getJobFolderDN(java.lang.String folderName)
Retrieves the DN of the entry for the specified job folder. |
java.lang.String |
getJobFolderName(java.lang.String folderDN)
Retrieves the name of the job folder defined in the entry with the provided DN. |
JobFolder[] |
getJobFolders()
Retrieves the real job folders that are currently defined in the configuration directory. |
Job[] |
getJobsForState(int jobState)
Retrieves the set of jobs from the configuration directory that have the specified state. |
Job |
getJobUnlocked(java.lang.String jobID)
Retrieves the specified job from the configuration directory. |
OptimizingJob |
getOptimizingJob(java.lang.String optimizingJobID)
Retrieves the optimizing job with the specified job ID from the configuration directory. |
OptimizingJob[] |
getOptimizingJobs(java.lang.String folderName)
Retrieves the set of optimizing jobs that have been defined in the configuration directory in the specified folder. |
OptimizingJob |
getOptimizingJobUnlocked(java.lang.String optimizingJobID)
Retrieves the optimizing job with the specified job ID from the configuration directory. |
java.lang.String |
getParameter(java.lang.String parameterName)
Retrieves the value of the specified configuration parameter. |
java.lang.String |
getParentDN(java.lang.String dn)
Retrieves the DN of the parent of the specified DN. |
java.lang.String |
getSafeName(ConfigSubscriber subscriber)
Retrieves a "safe" version of the subscriber name that may be used as an HTTP parameter in the admin interface. |
Job[] |
getSummaryJobs(java.lang.String[] jobIDs)
Retrieves the specified jobs from the configuration directory. |
OptimizingJob[] |
getUncompletedOptimizingJobs()
Retrieves the set of optimizing jobs that have been defined in the configuration directory and have not yet completed execution. |
UploadedFile |
getUploadedFile(java.lang.String folderName,
java.lang.String fileName)
Retrieves the requested file from the configuration directory. |
UploadedFile[] |
getUploadedFiles(java.lang.String folderName)
Retrieves the set of files that have been uploaded into the specified folder of the configuration directory. |
void |
getVirtualFolderExportData(java.lang.String folderName,
java.io.PrintWriter writer)
Exports the contents of the specified virtual job folder. |
JobFolder |
getVirtualJobFolder(java.lang.String folderName)
Retrieves the requested virtual job folder from the configuration directory. |
JobFolder[] |
getVirtualJobFolders()
Retrieves the virtual job folders that are currently defined in the configuration directory. |
Job[] |
getVirtualJobs(java.lang.String folderName)
Retrieves the jobs contained in the virtual folder with the specified folder name. |
boolean |
jobIDInUse(java.lang.String jobID)
Indicates whether the specified job ID is already assigned to a job in the configuration directory (regardless of the job state). |
void |
moveJob(java.lang.String jobID,
java.lang.String folderName)
Moves the job with the specified job ID from its current location into the specified job folder. |
void |
moveOptimizingJob(java.lang.String optimizingJobID,
java.lang.String folderName)
Moves the optimizing job with the specified job ID from its current location into the specified job folder. |
void |
notifySubscribers()
Notifies all the configuration subscribers that they should refresh their configuration. |
void |
notifySubscribers(java.lang.String parameterName)
Notifies all the configuration subscribers that they should refresh their configuration for the specified parameter. |
void |
processDataImport(java.lang.String importFile,
java.io.PrintWriter writer)
Handles the work of importing the data in the specified file into the SLAMD server's database. |
void |
readConfiguration()
Retrieves the SLAMD server configuration from the configuration directory server. |
void |
readConfigurationParameter(java.lang.String parameterName)
Reads the value of the specified configuration parameter from the config directory and stores it in the configuration. |
JobClass[] |
readJobClasses()
Reads the job class definitions stored in the configuration directory. |
void |
reconnectIfNecessary()
Checks to see if the connection to the configuration directory is still valid. |
void |
refreshConfiguration()
Causes the configuration handler to reload all the configuration data stored in the configuration directory and notify all subscribers that they should refresh their configuration as well. |
void |
refreshConfiguration(java.lang.String parameterName)
Causes the configuration handler to reload information about the specified parameter from the configuration directory and notify all subscribers that the specified parameter may have changed. |
boolean |
registerAsSubscriber(ConfigSubscriber configSubscriber)
Registers the provided configuration subscriber so that it will be notified of any changes that are made to the configuration. |
void |
removeFromVirtualFolders(java.lang.String jobID)
Removes the specified job from any virtual folders that may contain it. |
void |
removeJobClass(java.lang.String className)
Removes the specified class from the list of available job classes in the configuration directory. |
void |
removeJobFolder(java.lang.String folderName,
boolean removeFolderData)
Removes a job folder from the configuration directory. |
void |
removeJobsFromVirtualFolder(java.lang.String folderName,
java.lang.String[] jobIDs)
Removes the specified set of job IDs from the named virtual folder. |
void |
removeOptimizingJob(java.lang.String optimizingJobID)
Removes information about the specified optimizing job from the configuration directory. |
void |
removeUploadedFile(java.lang.String folderName,
java.lang.String fileName)
Removes the specified file from the given folder. |
void |
removeVirtualFolder(java.lang.String folderName)
Removes a virtual job folder definition from the configuration directory. |
java.lang.String |
replaceText(java.lang.String originalString,
java.lang.String textToFind,
java.lang.String replaceWith)
Replaces all occurrences of the specified text in the provided string with the given value. |
void |
setJobCache(JobCache jobCache)
Specifies the job cache that is associated with this config handler and the SLAMD server. |
void |
setParameter(java.lang.String parameterName,
java.lang.String parameterValue,
boolean notifySubscribers)
Specifies the new value to use for the given configuration parameter. |
void |
setReRunIteration(OptimizingJob optimizingJob,
Job reRunIteration)
Specifies the iteration of the optimizing job that is a re-run of the best iteration found during normal job processing. |
void |
sortJobs(Job[] jobArray)
Sorts the provided set of jobs based on their scheduled start times. |
void |
sortOptimizingJobs(OptimizingJob[] jobArray)
Sorts the provided set of optimizing jobs based on their scheduled start times. |
ConfigSubscriber |
subscriberForSafeName(java.lang.String safeSubscriberName)
Retrieves the configuration subscriber that has the specified "safe" name. |
void |
updateCompletedJob(Job job)
Updates the directory entry for a job to indicate that processing on that job has been completed. |
void |
updateFileType(java.lang.String folderName,
java.lang.String fileName,
java.lang.String newType)
Updates the MIME type for the specified uploaded file. |
void |
updateFolderForReadOnlyMode(java.lang.String folderName,
boolean displayInReadOnlyMode,
boolean updateFolderJobs)
Updates the specified job folder to either publish or un-publish the folder and optionally all the jobs it contains for display in restricted read-only mode. |
void |
updateJobComments(java.lang.String jobID,
java.lang.String jobDescription,
java.lang.String jobComments,
boolean displayInReadOnlyMode)
Updates the description and/or set of comments associated with a job. |
void |
updateJobFolderDescription(java.lang.String folderName,
java.lang.String description,
boolean displayInReadOnlyMode)
Updates the description of the indicated real or virtual job folder. |
void |
updateJobForReadOnlyMode(java.lang.String jobID,
boolean displayInReadOnlyMode)
Updates the specified job to indicate whether it should be displayed in restricted read-only mode. |
void |
updateJobStatus(java.lang.String jobID,
int jobState,
boolean setStartTime,
boolean setStopTime)
Updates the job state information for the specified job in the configuration directory. |
void |
updateOptimizingJob(OptimizingJob optimizingJob,
java.lang.Integer jobState,
java.util.Date actualStartTime,
java.util.Date actualStopTime,
java.lang.String stopReason,
Job newJobIteration)
Updates one or more pieces of information about the optimizing job in the the configuration directory. |
void |
updateOptimizingJobForReadOnlyMode(java.lang.String optimizingJobID,
boolean displayInReadOnlyMode)
Updates the specified optimizing job to indicate whether it should be displayed in restricted read-only mode. |
void |
updateScheduledJob(Job job,
boolean jobDisabled,
java.lang.String description,
java.util.Date startTime,
java.util.Date stopTime,
int duration,
int numClients,
java.lang.String[] requestedClients,
java.lang.String[] monitorClients,
boolean monitorClientsIfAvailable,
boolean waitForClients,
int threadsPerClient,
int threadStartupDelay,
java.lang.String[] dependencies,
java.lang.String[] notifyAddresses,
int collectionInterval,
java.lang.String comments,
Parameter[] parameters,
boolean displayInReadOnlyMode)
Updates the information about the job in the config directory with the new set of information. |
boolean |
virtualFolderExists(java.lang.String folderName)
Indicates whether a virtual folder exists with the specified name. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public ConfigHandler(SLAMDServer slamdServer)
throws SLAMDServerException
slamdServer - The SLAMD server that this configuration handler will
serve.
SLAMDServerException - If there is a problem while attempting to
bind to the configuration directory server.| Method Detail |
public void setJobCache(JobCache jobCache)
jobCache - The job cache to use for this config handler.
public void readConfiguration()
throws SLAMDServerException
SLAMDServerException - If a problem is encountered while retrieving
the configuration from the directory server.
public void readConfigurationParameter(java.lang.String parameterName)
throws SLAMDServerException
parameterName - The name of the configuration parameter to read from
the configuration directory.
SLAMDServerException - If a problem is encountered while attempting
to interact with the config directory.
public boolean jobIDInUse(java.lang.String jobID)
throws SLAMDServerException
jobID - The job ID for which to make the determination.
true if a job already exists with the specified job
ID, or false if there is no such job.
SLAMDServerException - If a problem occurs while making the
determination.
public void addScheduledJob(Job job,
java.lang.String folderName)
throws SLAMDServerException
job - The job for which to update the scheduled job
information in the configuration directory.folderName - The name of the job folder in which the job should be
placed.
SLAMDServerException - If there is a problem while writing the job
information to the configuration directory.
public void updateScheduledJob(Job job,
boolean jobDisabled,
java.lang.String description,
java.util.Date startTime,
java.util.Date stopTime,
int duration,
int numClients,
java.lang.String[] requestedClients,
java.lang.String[] monitorClients,
boolean monitorClientsIfAvailable,
boolean waitForClients,
int threadsPerClient,
int threadStartupDelay,
java.lang.String[] dependencies,
java.lang.String[] notifyAddresses,
int collectionInterval,
java.lang.String comments,
Parameter[] parameters,
boolean displayInReadOnlyMode)
throws SLAMDServerException
job - The job for which to make the update.jobDisabled - Indicates whether the job should be created
with a disabled state.description - A description of the job.startTime - The time at which the job should start
running.stopTime - The time at which the job should stop
running.duration - The length of time in seconds that the job
should run.numClients - The number of clients on which the job
should run.requestedClients - The set of clients requested for this job.monitorClients - The set of resource monitor clients
requested for this job.waitForClients - Indicates whether to wait for clients to be
available before attempting to start the
job.threadsPerClient - The number of threads that should be used on
each client.threadStartupDelay - The delay in milliseconds to use when
starting each thread.dependencies - The IDs of the jobs on which this job
should be dependent.notifyAddresses - The e-mail addresses of the users that
should be notified when the job is done.collectionInterval - The statistics collection interval for the
job.comments - The set of comments for the job.parameters - The set of job-specific parameters for the
job.displayInReadOnlyMode - Indicates whether the job should be
displayed in restricted read-only mode.
SLAMDServerException - If a problem occurs while attempting to
update the job information in the config
directory.
public void updateJobForReadOnlyMode(java.lang.String jobID,
boolean displayInReadOnlyMode)
throws SLAMDServerException
jobID - The job ID of the job to be updated.displayInReadOnlyMode - Indicates whether the job should be
displayed in restricted read-only mode.
SLAMDServerException - If a problem occurs while updating the job.
public void updateOptimizingJobForReadOnlyMode(java.lang.String optimizingJobID,
boolean displayInReadOnlyMode)
throws SLAMDServerException
optimizingJobID - The job ID of the optimizing job to be
updated.displayInReadOnlyMode - Indicates whether the job should be
displayed in restricted read-only mode.
SLAMDServerException - If a problem occurs while updating the job.
public void updateFolderForReadOnlyMode(java.lang.String folderName,
boolean displayInReadOnlyMode,
boolean updateFolderJobs)
throws SLAMDServerException
folderName - The name of the folder to be updated.displayInReadOnlyMode - Indicates whether the folder and optionally
included jobs should be displayed in
restricted read-only mode.updateFolderJobs - Indicates whether the jobs included in the
folder should also be updated.
SLAMDServerException - If a problem occurs while trying to update
the folder and/or jobs.
public void deleteScheduledJob(java.lang.String jobID)
throws SLAMDServerException
jobID - The ID of the job to be removed from the configuration
directory.
SLAMDServerException - If the specified job is currently scheduled
for execution, or if a problem occurs while
removing information about the job from the
configuration directory.
public void deleteScheduledJobNoCheck(java.lang.String jobID)
throws SLAMDServerException
jobID - The ID of the job to be removed from the configuration
directory.
SLAMDServerException - If the specified job is currently scheduled
for execution, or if a problem occurs while
removing information about the job from the
configuration directory.
public void addOptimizingJob(OptimizingJob optimizingJob,
java.lang.String folderName)
throws SLAMDServerException
optimizingJob - The optimizing job that is to be added into the
configuration directory.folderName - The name of the job folder in which the optimizing
job should be placed.
SLAMDServerException - If a problem occurs while adding the job
information to the configuration directory.
public void removeOptimizingJob(java.lang.String optimizingJobID)
throws SLAMDServerException
optimizingJobID - The optimizing job to be removed from the
configuration directory.
SLAMDServerException - If a problem occurs while trying to remove
the specified optimizing job.
public OptimizingJob[] getOptimizingJobs(java.lang.String folderName)
throws SLAMDServerException
folderName - The name of the folder from which to retrieve the set
of optimizing jobs.
SLAMDServerException - If a problem occurs while attempting to
retrieve the set of optimizing jobs.
public OptimizingJob[] getUncompletedOptimizingJobs()
throws SLAMDServerException
SLAMDServerException - If a problem occurs while attempting to
retrieve the set of optimizing jobs.
public OptimizingJob getOptimizingJob(java.lang.String optimizingJobID)
throws SLAMDServerException
optimizingJobID - The job ID for the optimizing job to retrieve.
SLAMDServerException - If a problem occurs while trying to retrieve
the requested optimizing job.
public OptimizingJob getOptimizingJobUnlocked(java.lang.String optimizingJobID)
throws SLAMDServerException
optimizingJobID - The job ID for the optimizing job to retrieve.
SLAMDServerException - If a problem occurs while trying to retrieve
the requested optimizing job.
public void updateOptimizingJob(OptimizingJob optimizingJob,
java.lang.Integer jobState,
java.util.Date actualStartTime,
java.util.Date actualStopTime,
java.lang.String stopReason,
Job newJobIteration)
throws SLAMDServerException
null, then that information will be updated in the
configuration directory.
optimizingJob - The optimizing job to be updated.jobState - The current state for the optimizing job.actualStartTime - The time at which the first iteration of this
optimizing job started running.actualStopTime - The time at which the last iteration of this
optimizing job completed running.stopReason - The reason that the optimization process stopped.newJobIteration - The next job iteration that has been scheduled for
this optimizing job.
SLAMDServerException - If a problem occurs while updating the
configuration directory.
public void setReRunIteration(OptimizingJob optimizingJob,
Job reRunIteration)
throws SLAMDServerException
optimizingJob - The optimizing job for which the re-run iteration
is to be set.reRunIteration - The job iteration that is a re-run of the best
iteration for the optimizing job.
SLAMDServerException - If a problem occurs while attempting to
update the optimizing job.
public void removeFromVirtualFolders(java.lang.String jobID)
throws SLAMDServerException
jobID - The job ID to remove from any virtual folders.
SLAMDServerException - If a problem occurs while removing the job
public void updateJobStatus(java.lang.String jobID,
int jobState,
boolean setStartTime,
boolean setStopTime)
throws SLAMDServerException
jobID - The job ID for the job to update.jobState - The new state for this job.setStartTime - Indicates whether the current time should be used as
the actual start time for the job.setStopTime - Indicates whether the current time should be used as
the actual stop time for the job.
SLAMDServerException - If there is a problem while attempting to
update the state information for the job.
public void updateJobComments(java.lang.String jobID,
java.lang.String jobDescription,
java.lang.String jobComments,
boolean displayInReadOnlyMode)
throws SLAMDServerException
jobID - The job ID for the job to update.jobDescription - The new description to use for the job.jobComments - The new set of comments to use for the job.displayInReadOnlyMode - Indicates whether the job should be
displayed in restricted read-only mode.
SLAMDServerException - If there is a problem while attempting to
update the comment information for the job.
public void updateCompletedJob(Job job)
throws SLAMDServerException
job - The job that has completed processing.
SLAMDServerException - If there is a problem while attempting to
update the state information for the job.
public Job[] getJobsForState(int jobState)
throws SLAMDServerException
jobState - The state of the jobs to be retrieved.
SLAMDServerException - If there is a problem retrieving the job
information from the directory.
public Job[] getCompletedJobs(java.lang.String folderName)
throws SLAMDServerException
folderName - Specifies the name of the folder in which to look for
the completed job information.
SLAMDServerException - If there is a problem retrieving the job
information from the directory.
public Job[] getCompletedNonOptimizingJobs(java.lang.String folderName)
throws SLAMDServerException
folderName - Specifies the name of the folder in which to look for
the completed job information.
SLAMDServerException - If there is a problem retrieving the job
information from the directory.
public Job getJob(java.lang.String jobID)
throws SLAMDServerException
jobID - The job ID of the job to retrieve.
SLAMDServerException - If there is a problem retrieving the job
information from the directory.
public Job getJobUnlocked(java.lang.String jobID)
throws SLAMDServerException
jobID - The job ID of the job to retrieve.
SLAMDServerException - If there is a problem retrieving the job
information from the directory.
public Job[] getSummaryJobs(java.lang.String[] jobIDs)
throws SLAMDServerException
jobIDs - The job IDs of the jobs to retrieve.
SLAMDServerException - If there is a problem retrieving the job
information from the directory.
public Job[] doJobSearch(java.lang.String searchFilter)
throws SLAMDServerException
searchFilter - A properly-formed RFC 2254-compliant LDAP search
filter to use when querying the directory.
SLAMDServerException - If a problem occurs while attempting to
perform the search.
public Job[] doSummaryJobSearch(java.lang.String searchFilter)
throws SLAMDServerException
searchFilter - A properly-formed RFC 2254-compliant LDAP search
filter to use when querying the directory.
SLAMDServerException - If a problem occurs while attempting to
perform the search.public java.lang.String getParentDN(java.lang.String dn)
null if
no parent DN could be determined.public void sortJobs(Job[] jobArray)
jobArray - The array containing the jobs to be sorted.public void sortOptimizingJobs(OptimizingJob[] jobArray)
jobArray - The array containing the optimizing jobs to be sorted.
public JobFolder[] getJobFolders()
throws SLAMDServerException
SLAMDServerException - If a problem occurs while trying to get the
list of job folders.
public JobFolder getJobFolder(java.lang.String folderName)
throws SLAMDServerException
folderName - The name of the real job folder to retrieve.
SLAMDServerException - If the requested folder cannot be retrieved
from the configuration directory.
public java.lang.String getJobFolderDN(java.lang.String folderName)
throws SLAMDServerException
folderName - The name of the job folder for which to retrieve the
DN.
SLAMDServerException - If a problem occurs while attempting to
find the DN.
public java.lang.String getJobFolderName(java.lang.String folderDN)
throws SLAMDServerException
folderDN - The DN of the entry for which to determine the folder
name.
SLAMDServerException - If a problem occurs while attempting to
find the folder name.
public JobFolder[] getVirtualJobFolders()
throws SLAMDServerException
SLAMDServerException - If a problem occurs while trying to get the
list of virtual job folders.
public JobFolder getVirtualJobFolder(java.lang.String folderName)
throws SLAMDServerException
folderName - The name of the virtual job folder to retrieve.
SLAMDServerException - If the requested folder cannot be retrieved
from the configuration directory.
public void createVirtualFolder(java.lang.String folderName,
java.lang.String folderFilter,
java.lang.String[] jobIDs,
boolean displayInReadOnlyMode)
throws SLAMDServerException
folderName - The name of the virtual job folder to
create.folderFilter - The LDAP search filter to use to dynamically
itentify the jobs in this virtual job
folder. It may be null if
there is no filter.jobIDs - The job IDs of the jobs to include in this
virtual job folder. It may be
null if there are no jobs.displayInReadOnlyMode - Indicates whether this virtual folder should
be displayed in restricted read-only mode.
SLAMDServerException - If a problem occurs creating the new virtual
job folder.
public void removeVirtualFolder(java.lang.String folderName)
throws SLAMDServerException
folderName - The name of the virtual job folder to remove from the
configuration directory.
SLAMDServerException - If a problem occurs while attempting to
remove the virtual job folder.
public boolean virtualFolderExists(java.lang.String folderName)
throws SLAMDServerException
folderName - The name of the virtual job folder for which to make
the determination.
true if the specified virtual folder exists, or
false if not.
SLAMDServerException - If a problem occurs while making the
determination.
public void addJobsToVirtualFolder(java.lang.String folderName,
java.lang.String[] jobIDs)
throws SLAMDServerException
folderName - The name of the virtual job folder to which the
specified jobs are to be added.jobIDs - The job IDs to add to the virtual folder.
SLAMDServerException - If a problem occurs while adding the
specified jobs to the virtual folder.
public void removeJobsFromVirtualFolder(java.lang.String folderName,
java.lang.String[] jobIDs)
throws SLAMDServerException
folderName - The name of the virtual job folder from which the
specified jobs are to be removed.jobIDs - The job IDs to remove from the virtual folder.
SLAMDServerException - If a problem occurs while removing the
specified jobs from the virtual folder.
public Job[] getVirtualJobs(java.lang.String folderName)
throws SLAMDServerException
folderName - The name of the virtual folder for which to retrieve
the list of jobs.
SLAMDServerException - If a problem occurs while attempting to
retrieve the jobs.
public void addJobFolder(java.lang.String folderName,
boolean displayInReadOnlyMode)
throws SLAMDServerException
folderName - The name of the folder to create in the
configuration directory.displayInReadOnlyMode - Indicates whether the folder and its
contents should be displayed in restricted
read-only mode.
SLAMDServerException - If a problem occurs while trying to create
the job folder.
public void removeJobFolder(java.lang.String folderName,
boolean removeFolderData)
throws SLAMDServerException
folderName - The name of the job folder that is to be removed.removeFolderData - Indicates whether the contents of the folder
should be removed as well.
SLAMDServerException - If a problem occurs while trying to remove
the job folder.
public void updateJobFolderDescription(java.lang.String folderName,
java.lang.String description,
boolean displayInReadOnlyMode)
throws SLAMDServerException
folderName - The name of the job folder to update.description - The new description to use for the job
folder. If it is null or blank, then the
description will be removed. If a
description is provided, then it will be
be used as the new description for the
folder.displayInReadOnlyMode - Indicates whether this folder and its
contents should be displayed in restricted
read-only mode.
SLAMDServerException - If a problem occurs while trying to update
the job folder.
public void moveJob(java.lang.String jobID,
java.lang.String folderName)
throws SLAMDServerException
jobID - The job ID of the job to be moved.folderName - The name of the new folder in which to place the job.
SLAMDServerException - If a problem occurs while trying to move
the job.
public void moveOptimizingJob(java.lang.String optimizingJobID,
java.lang.String folderName)
throws SLAMDServerException
optimizingJobID - The ID of the optimizing job to be moved.folderName - The name of the new folder in which to place
the optimizing job.
SLAMDServerException - If a problem occurs while trying to move
the optimizing job.
public JobClass[] readJobClasses()
throws SLAMDServerException
SLAMDServerException - If a problem is encountered while reading
the information from the configuration
directory.
public void addJobClass(JobClass jobClass)
throws SLAMDServerException
jobClass - The job class for which the information is to be added.
SLAMDServerException - If a problem is encountered while adding the
job class information into the configuration
directory.
public UploadedFile[] getUploadedFiles(java.lang.String folderName)
throws SLAMDServerException
folderName - The name of the folder for which to retrieve the
uploaded files.
SLAMDServerException - If a problem occurs while retrieving the
file information.
public UploadedFile getUploadedFile(java.lang.String folderName,
java.lang.String fileName)
throws SLAMDServerException
folderName - The name of the folder from which to retrieve the file.fileName - The name of the file to retrieve.
null if it could not be found.
SLAMDServerException - If a problem occurs while attempting to
retrieve the requested file.
public void addUploadedFile(java.lang.String folderName,
UploadedFile uploadedFile)
throws SLAMDServerException
folderName - The name of the folder in which to place the file.uploadedFile - The file information to upload into the configuration
directory.
SLAMDServerException - If a problem occurs while adding the file
information to the configuration directory.
public void removeUploadedFile(java.lang.String folderName,
java.lang.String fileName)
throws SLAMDServerException
folderName - The name of the folder in which the file is located.fileName - The name of the file to be removed.
SLAMDServerException - If a problem occurs while removing the
specified file.
public void updateFileType(java.lang.String folderName,
java.lang.String fileName,
java.lang.String newType)
throws SLAMDServerException
folderName - The name of the folder in which the file is located.fileName - The name of the file to be updated.newType - The new MIME type to use for the file.
SLAMDServerException - If a problem occurs while updating the
specified file.
public java.lang.String replaceText(java.lang.String originalString,
java.lang.String textToFind,
java.lang.String replaceWith)
originalString - The original string in which the replacements
should be made.textToFind - The text to find in the original string that should
be replaced.replaceWith - The text to use to replace the text to find in the
original string.
public void removeJobClass(java.lang.String className)
throws SLAMDServerException
className - The name of the job class to remove from the
configuration directory.
SLAMDServerException - If there is a problem removing the specified
class.
public void getFolderExportData(java.lang.String folderName,
java.io.PrintWriter writer)
throws SLAMDServerException
folderName - The name of the real job folder to be exported. If
this is null, then the default
(unclassified) folder will be exported.writer - The print writer to which the output data should be
written.
SLAMDServerException - If a problem occurs while generating the
export.
public void getVirtualFolderExportData(java.lang.String folderName,
java.io.PrintWriter writer)
throws SLAMDServerException
folderName - The name of the virtual job folder to be exported.writer - The print writer to which the data is to be written.
SLAMDServerException - If a problem occurs while generating the
export.
public void processDataImport(java.lang.String importFile,
java.io.PrintWriter writer)
importFile - The absolute path to the import file. It must be
located on the filesystem of the machine running the
SLAMD server.writer - The print writer that can be used to report progress
back to the end user.public java.lang.String getParameter(java.lang.String parameterName)
parameterName - The name of the configuration parameter for which to
retrieve the value.
null if the specified parameter has not been
defined in the configuration.
public void setParameter(java.lang.String parameterName,
java.lang.String parameterValue,
boolean notifySubscribers)
throws SLAMDServerException
parameterName - The name of the configuration parameter to be
updated.parameterValue - The value to use for the configuration
parameter.notifySubscribers - Indicates whether the config handler will notify
all of the configuration subscribers about this
change.
SLAMDServerException - If there is a problem making the change in
the configuration, or if any of the
configuration subscribers complain about it.public void closeConfigHandler()
public boolean registerAsSubscriber(ConfigSubscriber configSubscriber)
configSubscriber - The component that is to be subscribed with this
configuration handler.
true if the subscriber was successfully registered,
or false if it could not be for some reason (e.g.,
there was already a subscriber with the specified name).public void deregisterAsSubscriber(ConfigSubscriber configSubscriber)
configSubscriber - The configuration subscriber to be deregistered
from the configuration handler.public ConfigSubscriber[] getConfigSubscribers()
public java.lang.String getSafeName(ConfigSubscriber subscriber)
subscriber - The configuration subscriber for which to generate the
safe name.
public ConfigSubscriber subscriberForSafeName(java.lang.String safeSubscriberName)
safeSubscriberName - The safe name of the subscriber to retrieve.
null if it
could not be found.
public void refreshConfiguration()
throws SLAMDServerException
SLAMDServerException - If there is a problem while reading the
configuration information from the config
directory.
public void refreshConfiguration(java.lang.String parameterName)
throws SLAMDServerException
parameterName - The name of the configuration parameter
SLAMDServerException - If there is a problem while reading the
configuration information from the config
directory.
public void notifySubscribers()
throws SLAMDServerException
SLAMDServerException - If any of the configuration subscribers
threw an exception while updating their
configuration.
public void notifySubscribers(java.lang.String parameterName)
throws SLAMDServerException
parameterName - The name of the configuration parameter that should
be refreshed.
SLAMDServerException - If any of the configuration subscribers
threw an exception while updating their
configuration.
public void reconnectIfNecessary()
throws netscape.ldap.LDAPException