Class MissingRequiredParameterException

java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
javax.ws.rs.WebApplicationException
com.onenetwork.platform.integ.rest.MissingRequiredParameterException
All Implemented Interfaces:
java.io.Serializable

public class MissingRequiredParameterException
extends javax.ws.rs.WebApplicationException
Since JAX-RS cannot enforce requiredness for http parameters, this exception can used to represent a missing parameter to a REST resource method.
See Also:
Serialized Form
  • Constructor Summary

    Constructors 
    Constructor Description
    MissingRequiredParameterException​(java.lang.String paramName)  
  • Method Summary

    Modifier and Type Method Description
    static void requireParam​(java.lang.String paramName, java.lang.Object paramVal)
    If given paramVal is non null, exits quietly, else throws MissingRequiredParameterException

    Methods inherited from class javax.ws.rs.WebApplicationException

    getResponse

    Methods inherited from class java.lang.Throwable

    addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString

    Methods inherited from class java.lang.Object

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

  • Method Details

    • requireParam

      public static void requireParam​(java.lang.String paramName, java.lang.Object paramVal)
      If given paramVal is non null, exits quietly, else throws MissingRequiredParameterException
      Parameters:
      paramName - parameter name
      paramVal - parameter value