edu.ucsb.nceas.metacat.util

## Class ResponseUtil

- java.lang.Object
- - edu.ucsb.nceas.metacat.util.ResponseUtil

-     public class ResponseUtil
      extends java.lang.Object

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static java.lang.Long` | `DELETE_SCHEDULED_WORKFLOW_ERROR`
    `static java.lang.Long` | `GENERAL_UTILITY_ERROR`
    `static java.lang.Long` | `GET_SCHEDULED_WORKFLOW_ERROR`
    `static java.lang.Long` | `METACAT_UTILITY_ERROR`
    `static java.lang.Long` | `NO_READ_PERMISSION`
    `static java.lang.Long` | `PROPERTY_NOT_FOUND`
    `static java.lang.Long` | `RESCHEDULE_WORKFLOW_ERROR`
    `static java.lang.Long` | `SCHEDULE_WORKFLOW_ERROR`
    `static java.lang.Long` | `UNSCHEDULE_WORKFLOW_ERROR`

  - ### Method Summary

    All Methods Static Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static boolean` | `isSuccessXML(java.lang.String message)`
    `static void` | `redirectResponse(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, java.lang.String destination)` Redirect a response.
    `static void` | `send(javax.servlet.http.HttpServletResponse response, java.lang.String content)`
    `static void` | `sendErrorXML(javax.servlet.http.HttpServletResponse response, java.lang.Long errorCode, BaseException be)`
    `static void` | `sendErrorXML(javax.servlet.http.HttpServletResponse response, java.lang.Long errorCode, java.lang.String message)`
    `static void` | `sendSuccessXML(javax.servlet.http.HttpServletResponse response, java.lang.String message)`
    `static void` | `writeFileToOutput(javax.servlet.http.HttpServletResponse response, java.lang.String fileDir, java.lang.String fileName)`
    `static void` | `writeFileToOutput(javax.servlet.http.HttpServletResponse response, java.lang.String fileDir, java.lang.String fileName, int bufferSize)`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### GENERAL_UTILITY_ERROR

          public static java.lang.Long GENERAL_UTILITY_ERROR

    - #### METACAT_UTILITY_ERROR

          public static java.lang.Long METACAT_UTILITY_ERROR

    - #### PROPERTY_NOT_FOUND

          public static java.lang.Long PROPERTY_NOT_FOUND

    - #### NO_READ_PERMISSION

          public static java.lang.Long NO_READ_PERMISSION

    - #### SCHEDULE_WORKFLOW_ERROR

          public static java.lang.Long SCHEDULE_WORKFLOW_ERROR

    - #### UNSCHEDULE_WORKFLOW_ERROR

          public static java.lang.Long UNSCHEDULE_WORKFLOW_ERROR

    - #### RESCHEDULE_WORKFLOW_ERROR

          public static java.lang.Long RESCHEDULE_WORKFLOW_ERROR

    - #### GET_SCHEDULED_WORKFLOW_ERROR

          public static java.lang.Long GET_SCHEDULED_WORKFLOW_ERROR

    - #### DELETE_SCHEDULED_WORKFLOW_ERROR

          public static java.lang.Long DELETE_SCHEDULED_WORKFLOW_ERROR

  - ### Method Detail

    - #### redirectResponse

          public static void redirectResponse(javax.servlet.http.HttpServletRequest request,
                                              javax.servlet.http.HttpServletResponse response,
                                              java.lang.String destination)
                                       throws MetacatUtilException

      Redirect a response.
      Parameters:
        `response` - that is to be redirected
        `destination` - the context-relative URL to which the request is forwarded
      Throws:
        `MetacatUtilException`

    - #### writeFileToOutput

          public static void writeFileToOutput(javax.servlet.http.HttpServletResponse response,
                                               java.lang.String fileDir,
                                               java.lang.String fileName)
                                        throws MetacatUtilException

      Throws:
        `MetacatUtilException`

    - #### writeFileToOutput

          public static void writeFileToOutput(javax.servlet.http.HttpServletResponse response,
                                               java.lang.String fileDir,
                                               java.lang.String fileName,
                                               int bufferSize)
                                        throws MetacatUtilException

      Throws:
        `MetacatUtilException`

    - #### send

          public static void send(javax.servlet.http.HttpServletResponse response,
                                  java.lang.String content)
                           throws ErrorSendingErrorException

      Throws:
        `ErrorSendingErrorException`

    - #### sendErrorXML

          public static void sendErrorXML(javax.servlet.http.HttpServletResponse response,
                                          java.lang.Long errorCode,
                                          BaseException be)
                                   throws ErrorSendingErrorException

      Throws:
        `ErrorSendingErrorException`

    - #### sendErrorXML

          public static void sendErrorXML(javax.servlet.http.HttpServletResponse response,
                                          java.lang.Long errorCode,
                                          java.lang.String message)
                                   throws ErrorSendingErrorException

      Throws:
        `ErrorSendingErrorException`

    - #### sendSuccessXML

          public static void sendSuccessXML(javax.servlet.http.HttpServletResponse response,
                                            java.lang.String message)
                                     throws ErrorSendingErrorException

      Throws:
        `ErrorSendingErrorException`

    - #### isSuccessXML

          public static boolean isSuccessXML(java.lang.String message)

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