Class SuggestResourceAction

java.lang.Object
org.apache.struts.action.Action
org.dlese.dpc.suggest.action.SuggestAction
org.dlese.dpc.suggest.action.SuggestResourceAction

public final class SuggestResourceAction extends SuggestAction
* Action controller for the Suggest a Resource servlet
Version:
$Id: SuggestResourceAction.java,v 1.7 2009/03/20 23:34:00 jweather Exp $
Author:
ostwald

$Id $

  • Field Summary

    Fields inherited from class org.apache.struts.action.Action

    defaultLocale, servlet
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    protected ResourceRecord
    createRecord(org.apache.struts.action.ActionForm form)
    Update the SuggestionRecord (managed by SuggestResourceHelper) with values from the form bean
    Gets the suggestResourceHelper attribute of the SuggestResourceAction object
    protected org.apache.struts.action.ActionForward
    handleCancelCommand(org.apache.struts.action.ActionMapping mapping, org.apache.struts.action.ActionForm form, HttpServletRequest request, HttpServletResponse response)
    NOT YET DOCUMENTED
    protected org.apache.struts.action.ActionForward
    handleDoneCommand(org.apache.struts.action.ActionMapping mapping, org.apache.struts.action.ActionForm form, HttpServletRequest request, HttpServletResponse response)
    NOT YET DOCUMENTED
    protected org.apache.struts.action.ActionForward
    handleEditCommand(org.apache.struts.action.ActionMapping mapping, org.apache.struts.action.ActionForm form, HttpServletRequest request, HttpServletResponse response)
    NOT YET DOCUMENTED
    protected org.apache.struts.action.ActionForward
    handleSubmitCommand(org.apache.struts.action.ActionMapping mapping, org.apache.struts.action.ActionForm form, HttpServletRequest request, HttpServletResponse response)
    NOT YET DOCUMENTED
    protected org.apache.struts.action.ActionForward
    initializeSuggestor(org.apache.struts.action.ActionMapping mapping, org.apache.struts.action.ActionForm form, HttpServletRequest request, HttpServletResponse response)
    NOT YET DOCUMENTED
    static void
    setDebug(boolean db)
    Sets the debug attribute of the SuggestResourceAction class
    protected org.apache.struts.action.ActionErrors
    validateSuggestForm(org.apache.struts.action.ActionForm form, org.apache.struts.action.ActionMapping mapping, HttpServletRequest request)
    The required fields for suggest-a-url are: url, nameFirst, nameLast, emailPrimary, instName
    protected org.apache.struts.action.ActionErrors
    validateUrl(org.apache.struts.action.ActionForm form, org.apache.struts.action.ActionMapping mapping, HttpServletRequest request)
    Validate a URL for proper syntax and then process it with the UrlValidator to enforce rules for accepting a new suggestion.

    Methods inherited from class org.dlese.dpc.suggest.action.SuggestAction

    execute, getSchemaHelper, handleOtherCommands, handleStaleData

    Methods inherited from class org.apache.struts.action.Action

    addErrors, addMessages, execute, generateToken, getDataSource, getDataSource, getErrors, getLocale, getMessages, getResources, getResources, getServlet, isCancelled, isTokenValid, isTokenValid, resetToken, saveErrors, saveErrors, saveErrors, saveMessages, saveMessages, saveToken, setLocale, setServlet

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • SuggestResourceAction

      public SuggestResourceAction()
  • Method Details

    • getSuggestHelper

      protected SuggestResourceHelper getSuggestHelper() throws ServletException
      Gets the suggestResourceHelper attribute of the SuggestResourceAction object
      Specified by:
      getSuggestHelper in class SuggestAction
      Returns:
      The suggestResourceHelper value
      Throws:
      ServletException - NOT YET DOCUMENTED
    • initializeSuggestor

      protected org.apache.struts.action.ActionForward initializeSuggestor(org.apache.struts.action.ActionMapping mapping, org.apache.struts.action.ActionForm form, HttpServletRequest request, HttpServletResponse response) throws ServletException
      NOT YET DOCUMENTED
      Specified by:
      initializeSuggestor in class SuggestAction
      Parameters:
      mapping - NOT YET DOCUMENTED
      form - NOT YET DOCUMENTED
      request - NOT YET DOCUMENTED
      response - NOT YET DOCUMENTED
      Returns:
      NOT YET DOCUMENTED
      Throws:
      ServletException - NOT YET DOCUMENTED
    • handleEditCommand

      protected org.apache.struts.action.ActionForward handleEditCommand(org.apache.struts.action.ActionMapping mapping, org.apache.struts.action.ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception
      NOT YET DOCUMENTED
      Specified by:
      handleEditCommand in class SuggestAction
      Parameters:
      mapping - NOT YET DOCUMENTED
      form - NOT YET DOCUMENTED
      request - NOT YET DOCUMENTED
      response - NOT YET DOCUMENTED
      Returns:
      NOT YET DOCUMENTED
      Throws:
      Exception - NOT YET DOCUMENTED
    • handleCancelCommand

      protected org.apache.struts.action.ActionForward handleCancelCommand(org.apache.struts.action.ActionMapping mapping, org.apache.struts.action.ActionForm form, HttpServletRequest request, HttpServletResponse response)
      NOT YET DOCUMENTED
      Specified by:
      handleCancelCommand in class SuggestAction
      Parameters:
      mapping - NOT YET DOCUMENTED
      form - NOT YET DOCUMENTED
      request - NOT YET DOCUMENTED
      response - NOT YET DOCUMENTED
      Returns:
      NOT YET DOCUMENTED
    • handleDoneCommand

      protected org.apache.struts.action.ActionForward handleDoneCommand(org.apache.struts.action.ActionMapping mapping, org.apache.struts.action.ActionForm form, HttpServletRequest request, HttpServletResponse response)
      NOT YET DOCUMENTED
      Specified by:
      handleDoneCommand in class SuggestAction
      Parameters:
      mapping - NOT YET DOCUMENTED
      form - NOT YET DOCUMENTED
      request - NOT YET DOCUMENTED
      response - NOT YET DOCUMENTED
      Returns:
      NOT YET DOCUMENTED
    • handleSubmitCommand

      protected org.apache.struts.action.ActionForward handleSubmitCommand(org.apache.struts.action.ActionMapping mapping, org.apache.struts.action.ActionForm form, HttpServletRequest request, HttpServletResponse response)
      NOT YET DOCUMENTED
      Specified by:
      handleSubmitCommand in class SuggestAction
      Parameters:
      mapping - NOT YET DOCUMENTED
      form - NOT YET DOCUMENTED
      request - NOT YET DOCUMENTED
      response - NOT YET DOCUMENTED
      Returns:
      NOT YET DOCUMENTED
    • validateSuggestForm

      protected org.apache.struts.action.ActionErrors validateSuggestForm(org.apache.struts.action.ActionForm form, org.apache.struts.action.ActionMapping mapping, HttpServletRequest request)
      The required fields for suggest-a-url are: url, nameFirst, nameLast, emailPrimary, instName
      Specified by:
      validateSuggestForm in class SuggestAction
      Parameters:
      form - NOT YET DOCUMENTED
      mapping - Description of the Parameter
      request - Description of the Parameter
      Returns:
      Description of the Return Value
    • validateUrl

      protected org.apache.struts.action.ActionErrors validateUrl(org.apache.struts.action.ActionForm form, org.apache.struts.action.ActionMapping mapping, HttpServletRequest request)
      Validate a URL for proper syntax and then process it with the UrlValidator to enforce rules for accepting a new suggestion. Validation results are stored in the ActionForm, errors are returned to caller as ActionErrors.

      Verify that a URL is unique within the destination collection using the configured searchService stored in the ServiceHelper. If either of these parameters are not specified, then urls are validated by default (no errors are returned).

      Parameters:
      form - NOT YET DOCUMENTED
      mapping - Description of the Parameter
      request - Description of the Parameter
      Returns:
      errors that tell why a url is not valid, or no errors if the url is valid.
    • createRecord

      protected ResourceRecord createRecord(org.apache.struts.action.ActionForm form) throws Exception
      Update the SuggestionRecord (managed by SuggestResourceHelper) with values from the form bean
      Specified by:
      createRecord in class SuggestAction
      Parameters:
      form - NOT YET DOCUMENTED
      Throws:
      Exception - Description of the Exception
    • setDebug

      public static void setDebug(boolean db)
      Sets the debug attribute of the SuggestResourceAction class
      Parameters:
      db - The new debug value