001package Torello.Java.JSON; 002 003import javax.json.*; 004 005/** 006 * Used to indicate that therw was a property within a {@link JsonObject} that wasn't actually 007 * identified during the Json Parse. 008 * 009 * <EMBED CLASS=globalDefs DATA-STRUCT=JsonObject> 010 * <EMBED CLASS='external-html' DATA-FILE-ID=JE_FIELD_OBJ> 011 * <EMBED CLASS='external-html' DATA-FILE-ID=JE_MSG> 012 * <EMBED CLASS='external-html' DATA-FILE-ID=JE_MSG_JPMEX> 013 */ 014@Torello.JavaDoc.JDHeaderBackgroundImg(EmbedTagFileID="JE_PM_UL") 015@Torello.JavaDoc.CSSLinks(FileNames="JSONExceptions.css") 016public class JsonPropMissingException extends JsonBindingObjException 017{ 018 /** <EMBED CLASS='external-html' DATA-FILE-ID=SVUIDEX> */ 019 public static final long serialVersionUID = 1; 020 021 /** 022 * Constructs a {@code JsonPropMissingException} with no specified detail messsage, 023 * and the user-provided convenience-field values. 024 * 025 * @param errorSourceJsonObject <EMBED CLASS='external-html' DATA-FILE-ID=JBEX_ESJO> 026 * @param propertyName <EMBED CLASS='external-html' DATA-FILE-ID=JBEX_PN> 027 * @param expectedJsonType <EMBED CLASS='external-html' DATA-FILE-ID=JBEX_EJT> 028 * @param methodReturnJavaType <EMBED CLASS='external-html' DATA-FILE-ID=JBEX_MRJT> 029 */ 030 public JsonPropMissingException( 031 JsonObject errorSourceJsonObject, 032 String propertyName, 033 JsonValue.ValueType expectedJsonType, 034 Class<?> methodReturnJavaType 035 ) 036 { 037 super( 038 errorSourceJsonObject, propertyName, expectedJsonType, null, methodReturnJavaType, 039 "A JsonObject did not have any entry for the Property-Name requested" 040 ); 041 } 042 043 /** 044 * Constructs a {@code JsonPropMissingException} with the specified detail message, and 045 * user-provided convenience-field values. 046 * 047 * @param message the detail message. 048 * @param errorSourceJsonObject <EMBED CLASS='external-html' DATA-FILE-ID=JBEX_ESJO> 049 * @param propertyName <EMBED CLASS='external-html' DATA-FILE-ID=JBEX_PN> 050 * @param expectedJsonType <EMBED CLASS='external-html' DATA-FILE-ID=JBEX_EJT> 051 * @param methodReturnJavaType <EMBED CLASS='external-html' DATA-FILE-ID=JBEX_MRJT> 052 */ 053 public JsonPropMissingException( 054 String message, 055 JsonObject errorSourceJsonObject, 056 String propertyName, 057 JsonValue.ValueType expectedJsonType, 058 Class<?> methodReturnJavaType 059 ) 060 { 061 super( 062 message, errorSourceJsonObject, propertyName, expectedJsonType, null, 063 methodReturnJavaType 064 ); 065 } 066 067}