edu.ucsb.nceas.metacat.harvesterClient

## Class HarvesterRegistration

- java.lang.Object
- - javax.servlet.GenericServlet
  - - javax.servlet.http.HttpServlet
    - - edu.ucsb.nceas.metacat.harvesterClient.HarvesterRegistration

- All Implemented Interfaces:
    java.io.Serializable, javax.servlet.Servlet, javax.servlet.ServletConfig

      public class HarvesterRegistration
      extends javax.servlet.http.HttpServlet

  HarvesterRegistration is a servlet that implements harvester registration. The servlet reads parameters that were entered in a harvester registration form, checks the validity of the values, stores the values in the database by either inserting, updating, or removing a record in the HARVEST_SITE_SCHEDULE table.
  Author:
    costa
  See Also:
    Serialized Form

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `HarvesterRegistration()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `doGet(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse res)` Handles GET method requests.
    `void` | `doPost(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse res)` Handles POST method requests.
    `void` | `init(javax.servlet.ServletConfig config)` Initializes the servlet.

    - ### Methods inherited from class javax.servlet.http.HttpServlet

      `doDelete, doHead, doOptions, doPut, doTrace, getLastModified, service, service`

    - ### Methods inherited from class javax.servlet.GenericServlet

      `destroy, 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`

- - ### Constructor Detail

    - #### HarvesterRegistration

          public HarvesterRegistration()

  - ### Method Detail

    - #### doGet

          public void doGet(javax.servlet.http.HttpServletRequest req,
                            javax.servlet.http.HttpServletResponse res)
                     throws javax.servlet.ServletException,
                            java.io.IOException

      Handles GET method requests. Displays the current registration info for this user (if any), then allows the user to make changes and register or unregister.
      Overrides:
        `doGet` in class `javax.servlet.http.HttpServlet`
      Parameters:
        `req` - the request
        `res` - the response
      Throws:
        `javax.servlet.ServletException`
        `java.io.IOException`

    - #### doPost

          public void doPost(javax.servlet.http.HttpServletRequest req,
                             javax.servlet.http.HttpServletResponse res)
                      throws javax.servlet.ServletException,
                             java.io.IOException

      Handles POST method requests. Reads values as entered by the user in the harvester registration form and checks them for validity. Then either inserts, updates, or removes a record in the HARVEST_SITE_SCHEDULE table.
      Overrides:
        `doPost` in class `javax.servlet.http.HttpServlet`
      Parameters:
        `req` - the request
        `res` - the response
      Throws:
        `javax.servlet.ServletException`
        `java.io.IOException`

    - #### init

          public void init(javax.servlet.ServletConfig config)
                    throws javax.servlet.ServletException

      Initializes the servlet. Reads properties and initializes object fields.
      Specified by:
        `init` in interface `javax.servlet.Servlet`
      Overrides:
        `init` in class `javax.servlet.GenericServlet`
      Throws:
        `javax.servlet.ServletException`

Copyright © 2020 Regents of the University of California. All Rights Reserved.