com.sun.slamd.admin
Class AdminServlet

java.lang.Object
  extended byjavax.servlet.GenericServlet
      extended byjavax.servlet.http.HttpServlet
          extended bycom.sun.slamd.admin.AdminServlet
All Implemented Interfaces:
ConfigSubscriber, java.io.Serializable, javax.servlet.Servlet, javax.servlet.ServletConfig

public class AdminServlet
extends javax.servlet.http.HttpServlet
implements ConfigSubscriber

This class serves as the single point of entry for the Web-based SLAMD administration interface. It provides a user-friendly mechanism for the end user to access the SLAMD server.

See Also:
Serialized Form

Field Summary
static java.lang.String CONFIG_SUBSCRIBER_NAME
          The name that will be used to identify the amin interface as a configuration subscriber.
static java.lang.String EOL
          The end of line character that will be used for the generated HTML content.
 
Constructor Summary
AdminServlet()
           
 
Method Summary
 boolean addSchemaDefinitions(RequestInfo requestInfo, netscape.ldap.LDAPConnection conn)
          Attempts to add schema information to the configuration directory server.
 void addSLAMDConfigToDirectory(RequestInfo requestInfo, netscape.ldap.LDAPConnection conn)
          Adds SLAMD configuration information to the configuration directory.
 boolean changeRequiresAccessManagerRestart(java.lang.String name)
          Indicates whether a change in the specified parameter requires that the access manager be restarted before the change will take effect.
 boolean changeRequiresSLAMDRestart(java.lang.String name)
          Indicates whether a change in the specified parameter requires that the SLAMD server be restarted before the change will take effect.
 java.lang.String debugRequestInfo(RequestInfo requestInfo)
          Extracts information from the HTTP request that may be used for debugging purposes.
 void destroy()
          Indicates that the servlet engine is shutting down and that the appropriate action should be taken to ensure that SLAMD is properly stopped.
 void doGet(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
          Receives an HTTP GET request from a client, interprets the request, and generates the appropriate response.
 void doPost(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
          Receives an HTTP POST request from a client, interprets the request, and generates the appropriate response.
 void generateAccessDeniedBody(RequestInfo requestInfo, java.lang.String message)
          Generates the HTML page body that will be used whenever a user attempts to perform a function that he/she doesn't have permission to do.
 void generateCloneOptimizingJobForm(RequestInfo requestInfo)
          Generates a form that allows the user to schedule a self-optimizing job based on a previous optimizing job.
 java.lang.String generateGetJobLink(RequestInfo requestInfo, java.lang.String jobID, java.lang.String linkText)
          Generates a link that can take a user directly to the page to view results for a given job.
 java.lang.String generateHidden(java.lang.String name, java.lang.String value)
          Generates the HTML for a hidden form element, which is not visible to the end user in the rendered page, but provides additional information needed for the server to process the form submission.
 java.lang.String generateHTMLFooter(RequestInfo requestInfo)
          Generates the HTML footer that will appear at the bottom of most pages generated for use in the administrative interface.
 java.lang.String generateHTMLHeader(RequestInfo requestInfo)
          Generates the HTML header that will be used for almost all pages generated by this administrative interface.
 java.lang.String generateHTMLHeaderWithoutSidebar(RequestInfo requestInfo)
          Generates the HTML header that will be used for special content that should not include either the header text or the navigation sidebar (e.g., help pages).
 java.lang.String generateLink(RequestInfo requestInfo, java.lang.String section, java.lang.String subsection, java.lang.String linkText)
          Generates the HTML for a link to the specified area of the SLAMD admin interface.
 java.lang.String generateLink(RequestInfo requestInfo, java.lang.String section, java.lang.String subsection, java.lang.String extraParamName, java.lang.String extraParamValue, java.lang.String linkText)
          Generates the HTML for a link to the specified area of the SLAMD admin interface.
 java.lang.String generateLink(RequestInfo requestInfo, java.lang.String section, java.lang.String subsection, java.lang.String extraName1, java.lang.String extraValue1, java.lang.String extraName2, java.lang.String extraValue2, java.lang.String linkText)
          Generates the HTML for a link to the specified area of the SLAMD admin interface.
 java.lang.String generateLink(RequestInfo requestInfo, java.lang.String section, java.lang.String subsection, java.lang.String extraName1, java.lang.String extraValue1, java.lang.String extraName2, java.lang.String extraValue2, java.lang.String extraName3, java.lang.String extraValue3, java.lang.String linkText)
          Generates the HTML for a link to the specified area of the SLAMD admin interface.
 java.lang.String generateNewWindowLink(RequestInfo requestInfo, java.lang.String section, java.lang.String subsection, java.lang.String extraParamName, java.lang.String extraParamValue, java.lang.String linkText)
          Generates the HTML for a link to the specified area of the SLAMD admin interface.
 java.lang.String generateNewWindowLink(RequestInfo requestInfo, java.lang.String section, java.lang.String subsection, java.lang.String extraParam1Name, java.lang.String extraParam1Value, java.lang.String extraParam2Name, java.lang.String extraParam2Value, java.lang.String linkText)
          Generates the HTML for a link to the specified area of the SLAMD admin interface.
 void generateOptimizeHelpPage(RequestInfo requestInfo)
          Generates an HTML page that may be used to display information that can help a user understand the kinds of information that should be provided when scheduling an optimizing job.
 void generateOptimizeJobForm(RequestInfo requestInfo, JobClass jobClass, OptimizationAlgorithm optimizationAlgorithm)
          Generates a form that allows the user to schedule a self-optimizing job.
 void generateOptimizeJobForm(RequestInfo requestInfo, Job job, OptimizationAlgorithm optimizationAlgorithm)
          Generates a form that allows the user to schedule a self-optimizing job.
 java.lang.String generatePageTitle(RequestInfo requestInfo)
          Generates an appropriate title for the page being displayed.
 void generateScheduleHelpPage(RequestInfo requestInfo)
          Generates an HTML page that may be used to display information that can help a user understand the kinds of information that should be provided when scheduling a new job for execution.
 void generateScheduleJobForm(RequestInfo requestInfo, JobClass jobClass, int numCopies, boolean makeInterDependent, int delayBetweenStarts, java.lang.String folderName, java.lang.String jobDescription, java.util.Date startTime, java.util.Date stopTime, int duration, int numClients, int threadsPerClient, int threadStartupDelay, java.lang.String[] clients, java.lang.String[] monitorClients, boolean monitorClientsIfAvailable, boolean waitForClients, java.lang.String[] dependencyIDs, java.lang.String[] notifyAddresses, int collectionInterval, java.lang.String comments, boolean jobDisabled, boolean displayInReadOnlyMode, ParameterList parameters)
          Generates the HTML form that may be used to specify all of the necessary information required to schedule a new job for execution.
 void generateSearchForm(RequestInfo requestInfo, JobClass jobClass, boolean searchParams, boolean searchStats)
          Generates a form that may be used to search for jobs based on various kinds of criteria.
 void generateServerConfigInputForm(RequestInfo requestInfo, ConfigSubscriber subscriber, Parameter param)
          Generates the HTML for a form that can be used to update the value of a SLAMD server configuration parameter.
 void generateServletConfigInputForm(RequestInfo requestInfo, Parameter param)
          Generates the HTML for a form that can be used to update the value of a servlet configuration parameter.
 java.lang.String generateSideBar(RequestInfo requestInfo)
          Generates the navigation sidebar that will appear on the left side of the page for pages generated in the administrative interface.
 void generateViewJobBody(RequestInfo requestInfo, Job job)
          Generate the HTML code that can be used to display detailed information about a particular job.
 void generateViewOptimizingJobBody(RequestInfo requestInfo, java.lang.String optimizingJobID)
          Generates a page that may be used to view information about an optimizing job.
 java.lang.String generateWarning(java.lang.String warningMessage)
          Generates the HTML for the informational/warning/error message that may appear at the top of generated pages that provides additional information that would otherwise not be included on that page.
 ParameterList getAccessControlParameters()
          Retrieves the set of configuration parameters used by the SLAMD servlet for access control management.
 AccessManager getAccessManager()
          Retrieves the access manager associated with this admin servlet.
 java.lang.String getClassPath()
          Retrieves the class path for this servlet.
 int getNextID()
          Retrieves the ID to use for the next request.
 ParameterList getServletParameters()
          Retrieves the set of configuration parameters used by the SLAMD servlet, excluding those parameters used for managing access control.
 java.lang.String getSubscriberName()
          Retrieves the name that the servlet uses to subscribe to the configuration handler in order to be notified of configuration changes.
 ParameterList getSubscriberParameters()
          Retrieves the set of configuration parameters associated with this configuration subscriber.
 void handleAccessControlConfig(RequestInfo requestInfo)
          Handle the various phases of viewing and updating the access control configuration parameters, including displaying the current values, allowing the user to change the values, and performing all necessary access control verification.
 void handleAddJobClass(RequestInfo requestInfo)
          Handles the work required to add a new job class definition to the SLAMD server.
 void handleAddToVirtualFolder(RequestInfo requestInfo)
          Handles the work of adding a set of jobs to a virtual job folder.
 void handleCancelAndDelete(RequestInfo requestInfo)
          Handles all processing necessary to cancel a pending job and remove it from SLAMD entirely, rather than cancelling it and moving it to the completed jobs page.
 void handleCancelJob(RequestInfo requestInfo)
          Handles all processing necessary to cancel a pending or running job, including first obtaining confirmation from the user so that a job is not inadvertently cancelled.
 void handleCancelOptimizingJob(RequestInfo requestInfo)
          Handles the work of cancelling an optimizing job in the SLAMD server.
 void handleCloneJob(RequestInfo requestInfo)
          Handles all processing required to be able to clone a job (i.e., schedule a new job using the settings taken from an existing job).
 void handleConfig(RequestInfo requestInfo)
          Generate the HTML content that may be used to allow the user to choose which SLAMD configuration information should be accessed.
 void handleCreateFilteredVirtualFolder(RequestInfo requestInfo)
          Handles the work of creating a filtered virtual folder.
 void handleCreateFolder(RequestInfo requestInfo)
          Handles all processing required to create a new job folder.
 void handleDataExport(RequestInfo requestInfo)
          Handles all processing required to export data from the SLAMD server.
 void handleDataImport(RequestInfo requestInfo)
          Handles all processing required to import data into the SLAMD server.
 void handleDebugDisableInstructionTrace(RequestInfo requestInfo)
          Handles the work of requesting that the JVM disable instruction tracing.
 void handleDebugDisableMethodTrace(RequestInfo requestInfo)
          Handles the work of requesting that the JVM disable method call tracing.
 void handleDebugEnableInstructionTrace(RequestInfo requestInfo)
          Handles the work of requesting that the JVM enable instruction tracing.
 void handleDebugEnableMethodTrace(RequestInfo requestInfo)
          Handles the work of requesting that the JVM enable method call tracing.
 void handleDebugGC(RequestInfo requestInfo)
          Handles the work of requesting that the JVM perform garbage collection.
 void handleDebugJobCache(RequestInfo requestInfo)
          Handles the work of generating debug information about the SLAMD job cache.
 void handleDebugRequest(RequestInfo requestInfo)
          Handles the work of generating debug information about the request information provided by the client.
 void handleDebugSystemProperties(RequestInfo requestInfo)
          Handles the work of generating debug information about all system properties defined in the JVM.
 void handleDebugThreads(RequestInfo requestInfo)
          Handles the work of generating debug information about all thread groups and threads defined in the JVM.
 void handleDeleteFolder(RequestInfo requestInfo)
          Handles all processing required to remove a job folder.
 void handleDeleteJob(RequestInfo requestInfo)
          Handles all processing necessary to delete information from the configuration directory about a job that has been completed.
 void handleDeleteJobClass(RequestInfo requestInfo)
          Handles the work required to remove a job class definition from the SLAMD server, including obtaining confirmation that the user really wants to remove the definition.
 void handleDeleteOptimizingJob(RequestInfo requestInfo)
          Handles the work of removing information about an optimizing job from the SLAMD server.
 void handleDisableJob(RequestInfo requestInfo)
          Handles all processing necessary to temporarily disable a pending job, including first obtaining confirmation from the user so that a job is not inadvertently disabled.
 void handleEditFolderDescription(RequestInfo requestInfo, boolean forOptimizing)
          Handles all processing related to editing the description of a real job folder.
 void handleEditJob(RequestInfo requestInfo)
          Handles the work necessary to edit a job that has been scheduled but not yet started.
 void handleEditJobComments(RequestInfo requestInfo)
          Handles the work necessary to edit the set of comments and/or description for a job.
 void handleEnableJob(RequestInfo requestInfo)
          Handles all processing necessary to re-enable a disabled job, including first obtaining confirmation from the user so that a job is not inadvertently re-enabled.
 void handleGenerateReport(RequestInfo requestInfo)
          Handles all processing necessary to generate a report of job results.
 void handleGraph(RequestInfo requestInfo)
          Handles the processing required to actually serve up the dynamically generated images depicting information gathered during job processing.
 void handleHTMLLicense(RequestInfo requestInfo)
          Generates an HTML-formatted page that can be used to view the SLAMD license.
 void handleImportPersistentStats(RequestInfo requestInfo)
          Handles all processing necessary to import persistent statistical data for a job into the SLAMD server.
 void handleInstallJobPack(RequestInfo requestInfo)
          Handles the work required to install an uploaded job pack.
 void handleListRealFolders(RequestInfo requestInfo)
          Writes the list of real job folders to the client as simple text output.
 void handleListVirtualFolders(RequestInfo requestInfo)
          Writes the list of virtual job folders to the client as simple text output.
 void handleMassCancel(RequestInfo requestInfo, java.lang.String[] jobIDs)
          Handles the work of cancelling multiple jobs.
 void handleMassCancelAndDelete(RequestInfo requestInfo, java.lang.String[] jobIDs)
          Handles the work of cancelling multiple jobs and removing them from SLAMD entirely.
 void handleMassClone(RequestInfo requestInfo, java.lang.String[] jobIDs)
          Handles the work of cloning multiple jobs.
 void handleMassCompare(RequestInfo requestInfo, java.lang.String[] jobIDs)
          Handles the work of comparing multiple jobs.
 void handleMassDelete(RequestInfo requestInfo, java.lang.String[] jobIDs)
          Handles the work of deleting multiple jobs.
 void handleMassDisable(RequestInfo requestInfo, java.lang.String[] jobIDs)
          Handles the work of disabling multiple jobs.
 void handleMassEnable(RequestInfo requestInfo, java.lang.String[] jobIDs)
          Handles the work of enabling multiple jobs.
 void handleMassExport(RequestInfo requestInfo, java.lang.String[] jobIDs)
          Handles the work of exporting information about multiple jobs.
 void handleMassOperation(RequestInfo requestInfo)
          Handles all processing necessary to perform operations on multiple jobs at the same time.
 void handleMassOptimizing(RequestInfo requestInfo)
          Handles the work of performing some operation on multiple optimizing jobs at the same time.
 void handleMassOptimizingDelete(RequestInfo requestInfo, java.lang.String[] optimizingJobIDs)
          Handles the work of deleting multiple optimizing jobs at the same time.
 void handleMassOptimizingDepublish(RequestInfo requestInfo, java.lang.String[] optimizingJobIDs)
          Handles the work of de-publishing information about multiple optimizing jobs.
 void handleMassOptimizingMove(RequestInfo requestInfo, java.lang.String[] optimizingJobIDs)
          Handles the work of moving multiple optimizing jobs.
 void handleMassOptimizingPublish(RequestInfo requestInfo, java.lang.String[] optimizingJobIDs)
          Handles the work of publishing information about multiple optimizing jobs.
 void handleMassPublish(RequestInfo requestInfo, boolean displayInReadOnlyMode)
          Handles the work of publishing or de-publishing one or more jobs for display in restricted read-only mode.
 void handleMonitorGraph(RequestInfo requestInfo)
          Handles the processing required to generate graphs from resource monitor statistics.
 void handleMoveJobs(RequestInfo requestInfo)
          Handles all processing required to move one or more jobs to a specified job folder.
 void handleMoveOptimizingJob(RequestInfo requestInfo)
          Handles the work of moving an optimizing job from one folder to another.
 void handleOptimizeJob(RequestInfo requestInfo)
          Handles all processing associated with scheduling a self-optimizing job.
 void handleOverlay(RequestInfo requestInfo)
          Handles the processing required to actually serve up the dynamically generated overlay graphs depicting information gathered during job processing.
 void handlePauseOptimizingJob(RequestInfo requestInfo)
          Handles the work of pausing an optimizing job in the SLAMD server.
 void handlePublishFolder(RequestInfo requestInfo, boolean forOptimizing)
          Handles the work of publishing or de-publishing a job folder (and optionally the jobs contained in it) for display in restricted read-only mode.
 void handleRealTimeGraph(RequestInfo requestInfo)
          Handles the processing required to actually serve up the dynamically generated images depicting information gathered in real-time.
 void handleSaveJobStatistics(RequestInfo requestInfo)
          Handles all processing related to saving job statistics to an external file.
 void handleScheduleJob(RequestInfo requestInfo)
          Handles all processing related to scheduling a new job for execution.
 void handleSearchForJobs(RequestInfo requestInfo)
          Handles all processing related to searching for job information.
 void handleServletConfig(RequestInfo requestInfo)
          Handle the various phases of viewing and updating the servlet configuration parameters, including displaying the current values, allowing the user to change the values, and performing all necessary access control verification.
 void handleSLAMDConfig(RequestInfo requestInfo)
          Handle the various phases of viewing and updating the SLAMD server configuration parameters, including displaying the current values, allowing # the user to change the values, and performing all necessary access control verification.
 void handleSLAMDLogo(RequestInfo requestInfo)
          Handles the work of sending the SLAMD logo to the client.
 void handleSLAMDUnavailable(RequestInfo requestInfo)
          Generate the HTML content that will be displayed when the SLAMD server is unavailable.
 void handleStatus(RequestInfo requestInfo)
          Handle all processing related to the operations that may be performed in the status section of the administrative interface.
 void handleTextLicense(RequestInfo requestInfo)
          Retrieves the contents of the SLAMD license in plain text form.
 void handleUnauthenticatedUser(RequestInfo requestInfo)
          Generate the HTML content that will be displayed when access control has been enabled, but it was not possible to determine the identity of the end user.
 void handleUnpauseOptimizingJob(RequestInfo requestInfo)
          Handles the work of unpausing an optimizing job in the SLAMD server.
 void handleUploadedFile(RequestInfo requestInfo)
          Handles the work of processing requests related to files that have been uploaded to the SLAMD server.
 void handleViewGraph(RequestInfo requestInfo)
          Handles the processing required to display graphs of statistical information gathered during job processing.
 void handleViewJob(RequestInfo requestInfo)
          Handle all processing related to viewing summary for information for a set of jobs in a particular category (pending, running, or completed), or for viewing detailed information about a specific job.
 void handleViewJob(RequestInfo requestInfo, java.lang.String subsection, java.lang.String folderName, java.lang.String jobID)
          Handle all processing related to viewing summary for information for a set of jobs in the specified category, or for viewing detailed information about a specific job.
 void handleViewJobAsText(RequestInfo requestInfo)
          Handles the work of retrieving information about the specified job as a plain text document.
 void handleViewJobClass(RequestInfo requestInfo)
          Handles all processing required to allow the user to view the set of job classes that have been defined in the SLAMD server, or to view detailed information about a particular job class.
 void handleViewJobLogMessages(RequestInfo requestInfo)
          Handles the work of viewing the full set of log messages associated with a given job.
 void handleViewJobStatistics(RequestInfo requestInfo)
          Handles all processing related to viewing detailed statistical information about a job.
 void handleViewLog(RequestInfo requestInfo)
          Handle all processing required to display information from the SLAMD log file to the user.
 void handleViewMonitorGraph(RequestInfo requestInfo)
          Handles the processing required to display graphs of resource monitor information gathered during job processing.
 void handleViewOptimizing(RequestInfo requestInfo, boolean showAll)
          Handles the work of viewing information about one or multiple optimizing jobs.
 void handleViewOptimizing(RequestInfo requestInfo, boolean showAll, java.lang.String folderName)
          Handles the work of viewing information about one or multiple optimizing jobs.
 void handleViewOptimizingJobAsText(RequestInfo requestInfo)
          Handles the work of retrieving information about the specified optimizing job as a plain text document.
 void handleViewOverlay(RequestInfo requestInfo)
          Handles the processing required to display graphs that overlay two different stat trackers.
 void handleViewRealFolderList(RequestInfo requestInfo)
          Handles all processing related to viewing the list of real job folders that have been defined in the configuration directory.
 void handleViewRealTimeGraph(RequestInfo requestInfo)
          Handles the processing required to display graphs of statistical information gathered in real time.
 void handleViewVirtualFolder(RequestInfo requestInfo, java.lang.String folderName)
          Handles all processing related to viewing the list of jobs contained in a virtual folder.
 void handleViewVirtualFolderList(RequestInfo requestInfo)
          Handles all processing related to viewing the list of virtual job folders that have been defined in the configuration directory.
 void handleVirtualJobFolders(RequestInfo requestInfo)
          Handles all processing related to viewing and managing virtual job folders.
 void init()
          Perform the one-time initialization for the servlet that is done when the servlet is first loaded.
 java.lang.String[] intToTrackerNames(int intValue, java.lang.String[] trackerNames)
          Converts the provided int value into a list of the stat tracker names to which that number should correspond.
 boolean isChecked(RequestInfo requestInfo, java.lang.String parameterName)
          Indicates whether the specified request parameter is that represents the value of a checkbox that has been checked.
 boolean isResourceDNParameter(java.lang.String name)
          Indicates whether the specified parameter name is the parameter for one of the resource DN parameters.
 void logMessage(RequestInfo requestInfo, java.lang.String message)
          Writes the specified message to the SLAMD server log with the appropriate admin interface log level.
 boolean mayAccess(RequestInfo requestInfo, java.lang.String resourceName)
          Indicate whether the currently authenticated user should be allowed to access the specified resource.
 boolean readOnlyMode()
          Indicates whether the SLAMD server is currently operating in read-only mode.
 boolean readServletConfig(javax.servlet.ServletConfig config)
          Read the servlet configuration information and instantiate the appropriate static instance variables.
 void refreshSubscriberConfiguration()
          Re-reads all configuration information used by the SLAMD Web interface.
 void refreshSubscriberConfiguration(java.lang.String parameterName)
          Re-reads all configuration information used by the SLAMD Web interface.
 void registerACL(RequestInfo requestInfo, java.lang.String resourceName, java.lang.String resourceDN, boolean flushUserCache)
          Registers the specified protected resource with the access control manager, if appropriate.
 boolean restrictedReadOnlyMode()
          Indicates whether the SLAMD server is currently operating in read-only mode and should restrict which jobs and folders should be published.
 void setAccessControlVariables(RequestInfo requestInfo)
          Sets the values of the non-static instance variables related to access control management.
 void updateServletConfiguration(RequestInfo requestInfo, java.lang.String name, java.lang.String value, boolean apply)
          Applies any changes to the specified parameter, if possible.
 void validateJobInfo(RequestInfo requestInfo)
          Parses the request parameters provided from submitting the "schedule a new job" form and verifies that all the necessary information has been provided and that it is valid.
 
Methods inherited from class javax.servlet.http.HttpServlet
doDelete, doHead, doOptions, doPut, doTrace, getLastModified, service, service
 
Methods inherited from class javax.servlet.GenericServlet
getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, getServletName, init, log, log
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CONFIG_SUBSCRIBER_NAME

public static final java.lang.String CONFIG_SUBSCRIBER_NAME
The name that will be used to identify the amin interface as a configuration subscriber.

See Also:
Constant Field Values

EOL

public static final java.lang.String EOL
The end of line character that will be used for the generated HTML content.

See Also:
Constant Field Values
Constructor Detail

AdminServlet

public AdminServlet()
Method Detail

init

public void init()
Perform the one-time initialization for the servlet that is done when the servlet is first loaded.


destroy

public void destroy()
Indicates that the servlet engine is shutting down and that the appropriate action should be taken to ensure that SLAMD is properly stopped.

Specified by:
destroy in interface javax.servlet.Servlet

doGet

public void doGet(javax.servlet.http.HttpServletRequest request,
                  javax.servlet.http.HttpServletResponse response)
           throws java.io.IOException
Receives an HTTP GET request from a client, interprets the request, and generates the appropriate response.

Parameters:
request - Information about the HTTP GET request issued by the client.
response - Information about the HTTP response that will be returned to the client.
Throws:
java.io.IOException - If a problem is encountered while reading from or writing to the client.

doPost

public void doPost(javax.servlet.http.HttpServletRequest request,
                   javax.servlet.http.HttpServletResponse response)
            throws java.io.IOException
Receives an HTTP POST request from a client, interprets the request, and generates the appropriate response.

Parameters:
request - Information about the HTTP POST request issued by the client.
response - Information about the HTTP response that will be returned to the client.
Throws:
java.io.IOException - If a problem is encountered while reading from or writing to the client.

readServletConfig

public boolean readServletConfig(javax.servlet.ServletConfig config)
                          throws java.io.IOException
Read the servlet configuration information and instantiate the appropriate static instance variables. The location of the configuration file will be read from the initialization parameters, but all other configuration will be read from the specified file.

Parameters:
config - The servlet configuration information.
Returns:
true if the configuration information could be read, or false if it could not.
Throws:
java.io.IOException - If a problem occurs while reading the configuration file.

registerACL

public void registerACL(RequestInfo requestInfo,
                        java.lang.String resourceName,
                        java.lang.String resourceDN,
                        boolean flushUserCache)
Registers the specified protected resource with the access control manager, if appropriate.

Parameters:
requestInfo - The state information for this request.
resourceName - The name to use for the protected resource.
resourceDN - The DN of the group or role that specifies which users have access to content associated with the resource name.
flushUserCache - Indicates whether the access manager's user info cache should be flushed after registering the new protected resource.

handleSLAMDUnavailable

public void handleSLAMDUnavailable(RequestInfo requestInfo)
Generate the HTML content that will be displayed when the SLAMD server is unavailable.

Parameters:
requestInfo - The state information for this request.

handleUnauthenticatedUser

public void handleUnauthenticatedUser(RequestInfo requestInfo)
Generate the HTML content that will be displayed when access control has been enabled, but it was not possible to determine the identity of the end user.

Parameters:
requestInfo - The state information for this request.

handleSLAMDLogo

public void handleSLAMDLogo(RequestInfo requestInfo)
                     throws java.io.IOException
Handles the work of sending the SLAMD logo to the client.

Parameters:
requestInfo - The state information for this request.
Throws:
java.io.IOException - If a problem occurs while sending the logo to the client.

handleHTMLLicense

public void handleHTMLLicense(RequestInfo requestInfo)
Generates an HTML-formatted page that can be used to view the SLAMD license.

Parameters:
requestInfo - The state information for this request.

handleTextLicense

public void handleTextLicense(RequestInfo requestInfo)
Retrieves the contents of the SLAMD license in plain text form.

Parameters:
requestInfo - The state information for this request.

handleConfig

public void handleConfig(RequestInfo requestInfo)
Generate the HTML content that may be used to allow the user to choose which SLAMD configuration information should be accessed.

Parameters:
requestInfo - The state information for this request.

handleServletConfig

public void handleServletConfig(RequestInfo requestInfo)
Handle the various phases of viewing and updating the servlet configuration parameters, including displaying the current values, allowing the user to change the values, and performing all necessary access control verification.

Parameters:
requestInfo - The state information for this request.

addSchemaDefinitions

public boolean addSchemaDefinitions(RequestInfo requestInfo,
                                    netscape.ldap.LDAPConnection conn)
Attempts to add schema information to the configuration directory server.

Parameters:
requestInfo - The state information for this request.
conn - The connection to the directory server to which the schema definitions are to be added.
Returns:
true if all schema was added successfully, or false if a problem occurred.

addSLAMDConfigToDirectory

public void addSLAMDConfigToDirectory(RequestInfo requestInfo,
                                      netscape.ldap.LDAPConnection conn)
Adds SLAMD configuration information to the configuration directory.

Parameters:
requestInfo - The state information for this request.
conn - The connection to the configuration directory.

handleAccessControlConfig

public void handleAccessControlConfig(RequestInfo requestInfo)
Handle the various phases of viewing and updating the access control configuration parameters, including displaying the current values, allowing the user to change the values, and performing all necessary access control verification.

Parameters:
requestInfo - The state information for this request.

generateServletConfigInputForm

public void generateServletConfigInputForm(RequestInfo requestInfo,
                                           Parameter param)
Generates the HTML for a form that can be used to update the value of a servlet configuration parameter.

Parameters:
requestInfo - The state information for this request.
param - The configuration parameter for which to generate the input form.

handleSLAMDConfig

public void handleSLAMDConfig(RequestInfo requestInfo)
Handle the various phases of viewing and updating the SLAMD server configuration parameters, including displaying the current values, allowing # the user to change the values, and performing all necessary access control verification.

Parameters:
requestInfo - The state information for this request.

generateServerConfigInputForm

public void generateServerConfigInputForm(RequestInfo requestInfo,
                                          ConfigSubscriber subscriber,
                                          Parameter param)
Generates the HTML for a form that can be used to update the value of a SLAMD server configuration parameter.

Parameters:
requestInfo - The state information for this request.
subscriber - The configuration subscriber with which the parameter is associated.
param - The configuration parameter for which to generate the input form.

handleStatus

public void handleStatus(RequestInfo requestInfo)
Handle all processing related to the operations that may be performed in the status section of the administrative interface.

Parameters:
requestInfo - The state information for this request.

handleViewLog

public void handleViewLog(RequestInfo requestInfo)
Handle all processing required to display information from the SLAMD log file to the user.

Parameters:
requestInfo - The state information for this request.

handleViewJob

public void handleViewJob(RequestInfo requestInfo)
Handle all processing related to viewing summary for information for a set of jobs in a particular category (pending, running, or completed), or for viewing detailed information about a specific job.

Parameters:
requestInfo - The state information for this request.

handleViewJob

public void handleViewJob(RequestInfo requestInfo,
                          java.lang.String subsection,
                          java.lang.String folderName,
                          java.lang.String jobID)
Handle all processing related to viewing summary for information for a set of jobs in the specified category, or for viewing detailed information about a specific job.

Parameters:
requestInfo - The state information for this request.
subsection - The subsection that specifies which category of jobs to view.
folderName - The name of the folder to display.
jobID - The job ID of the job to display.

handleViewJobAsText

public void handleViewJobAsText(RequestInfo requestInfo)
Handles the work of retrieving information about the specified job as a plain text document.

Parameters:
requestInfo - The state information for this request.

handleViewOptimizingJobAsText

public void handleViewOptimizingJobAsText(RequestInfo requestInfo)
Handles the work of retrieving information about the specified optimizing job as a plain text document.

Parameters:
requestInfo - The state information for this request.

handleUploadedFile

public void handleUploadedFile(RequestInfo requestInfo)
Handles the work of processing requests related to files that have been uploaded to the SLAMD server.

Parameters:
requestInfo - The state information for this request.

handlePublishFolder

public void handlePublishFolder(RequestInfo requestInfo,
                                boolean forOptimizing)
Handles the work of publishing or de-publishing a job folder (and optionally the jobs contained in it) for display in restricted read-only mode.

Parameters:
requestInfo - The state information for this request.
forOptimizing - Indicates whether the request was issued in the context of viewing optimizing jobs or regular jobs.

generateViewJobBody

public void generateViewJobBody(RequestInfo requestInfo,
                                Job job)
Generate the HTML code that can be used to display detailed information about a particular job.

Parameters:
requestInfo - The state information for this request.
job - The job whose information is to be displayed.

handleViewJobLogMessages

public void handleViewJobLogMessages(RequestInfo requestInfo)
Handles the work of viewing the full set of log messages associated with a given job.


handleEditFolderDescription

public void handleEditFolderDescription(RequestInfo requestInfo,
                                        boolean forOptimizing)
Handles all processing related to editing the description of a real job folder.

Parameters:
requestInfo - The state information for this request.
forOptimizing - Indicates whether the request was made when the user was viewing optimizing jobs rather than regular jobs.

handleSearchForJobs

public void handleSearchForJobs(RequestInfo requestInfo)
Handles all processing related to searching for job information.

Parameters:
requestInfo - The state information for this request.

generateSearchForm

public void generateSearchForm(RequestInfo requestInfo,
                               JobClass jobClass,
                               boolean searchParams,
                               boolean searchStats)
Generates a form that may be used to search for jobs based on various kinds of criteria.

Parameters:
requestInfo - The state information for this request.
jobClass - The class for which to obtain specific additional parameters to use in the search.
searchParams - Indicates whether the search form should include fields for searching job-specific parameters.
searchStats - Indicates whether the search form should include fields for searching job-specific statistics.

handleListRealFolders

public void handleListRealFolders(RequestInfo requestInfo)
Writes the list of real job folders to the client as simple text output.

Parameters:
requestInfo - The state information for this request.

handleListVirtualFolders

public void handleListVirtualFolders(RequestInfo requestInfo)
Writes the list of virtual job folders to the client as simple text output.

Parameters:
requestInfo - The state information for this request.

handleVirtualJobFolders

public void handleVirtualJobFolders(RequestInfo requestInfo)
Handles all processing related to viewing and managing virtual job folders.

Parameters:
requestInfo - The state information for this request.

handleViewRealFolderList

public void handleViewRealFolderList(RequestInfo requestInfo)
Handles all processing related to viewing the list of real job folders that have been defined in the configuration directory.

Parameters:
requestInfo - The state information for this request.

handleViewVirtualFolderList

public void handleViewVirtualFolderLi