Class RecommenderAction

java.lang.Object
org.apache.struts.action.Action
org.dlese.dpc.schemedit.action.DCSAction
org.dlese.dpc.services.dcs.action.RecommenderAction

public final class RecommenderAction extends DCSAction
An Action that handles DCS related web service requests.
Author:
Jonathan Ostwald
See Also:
  • Field Details

  • Constructor Details

    • RecommenderAction

      public RecommenderAction()
  • Method Details

    • execute

      public org.apache.struts.action.ActionForward execute(org.apache.struts.action.ActionMapping mapping, org.apache.struts.action.ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception
      Processes the DDS web service request by forwarding to the appropriate corresponding JSP page for rendering.
      Overrides:
      execute in class org.apache.struts.action.Action
      Parameters:
      mapping - The ActionMapping used to select this instance
      form - The ActionForm for the given page
      request - The HTTP request we are processing
      response - The HTTP response we are creating
      Returns:
      The ActionForward instance describing where and how control should be forwarded
      Throws:
      Exception - If error.
    • doRecommendResource

      protected org.apache.struts.action.ActionForward doRecommendResource(HttpServletRequest request, HttpServletResponse response, RecommenderForm recForm, org.apache.struts.action.ActionMapping mapping) throws Exception
      Handles a request to put a metadata record into the repository. Wraps RepositoryManager.putRecord and therefore requires the same arguments.

      Currently allows existing records to be overwritten.

      Arguments: recordXml, xmlFormat, collection, and id.

      Error Exception Conditions:
      badArgument - The request includes illegal arguments.

      Parameters:
      request - The HTTP request
      response - The HTTP response
      recForm - The Form bean
      mapping - ActionMapping used
      rm - The RepositoryManager used
      Returns:
      An ActionForward to the JSP page that will handle the response
      Throws:
      Exception - If error.
    • doRecommendCollection

      protected org.apache.struts.action.ActionForward doRecommendCollection(HttpServletRequest request, HttpServletResponse response, RecommenderForm recForm, org.apache.struts.action.ActionMapping mapping) throws Exception
      Throws:
      Exception
    • getDateStamp

      protected static final String getDateStamp()
      Return a string for the current time and date, sutiable for display in log files and output to standout:
      Returns:
      The dateStamp value
    • prtlnErr

      protected final void prtlnErr(String s)
      Output a line of text to error out, with datestamp.
      Parameters:
      s - The text that will be output to error out.
    • prtln

      protected final void prtln(String s)
      Output a line of text to standard out, with datestamp, if debug is set to true.
      Parameters:
      s - The String that will be output.
    • setDebug

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