Question implements QuestionIntf { public static Question fromJSON(String json) { Question question = null; if (json != null && !json.isEmpty()) { try { question = om.readValue(json, Question.class); } catch (Exception e) { log.severe(e.toString()); } } return question; } Question(); static Question fromURL(String url, String remoteId, Session session); static Question fromURL(String url, String remoteID, String ddrRecordId, Session session); static Question fromURL(String url, String remoteID, String fromID, String ddrRecordId, Session session,
        Map<String, String> extraParams); static Question fromJSON(String json); static Question getError(String language); @JsonIgnore String toJSON(); @JsonIgnore String toJSON(boolean expanded_texts); @JsonIgnore void generateIds(); Question answer(String responder, String answer_id, String answer_input, Session session); Question event(String eventType, String message, Object extras, String responder, Session session); @Override String getQuestion_id(); @Override String getQuestion_text(); @Override String getType(); @Override List<String> getUrl(); @Override String getRequester(); @Override @JsonIgnore HashMap<String, String> getExpandedRequester(Session session); @Override @JsonIgnore HashMap<String, String> getExpandedRequester(String language, Session session); @Override ArrayList<Answer> getAnswers(); @Override ArrayList<EventCallback> getEvent_callbacks(); @Override @JsonIgnore String getQuestion_expandedtext(Session session); @Override @JsonIgnore String getQuestion_expandedtext(String language, Session session); @Override void setQuestion_id(String question_id); @Override void setQuestion_text(String question_text); @Override void setType(String type); @Override void setUrl(Object url); @Override void setRequester(String requester); @Override void setAnswers(ArrayList<Answer> answers); @Override void setEvent_callbacks(ArrayList<EventCallback> event_callbacks); String getPreferred_language(); void setPreferred_language(String preferred_language); @Override String getData(); @Override void setData(String data); @Override String getTrackingToken(); @Override void setTrackingToken(String token); @JsonProperty("media_properties") Collection<MediaProperty> getMedia_properties(); @JsonProperty("media_properties") void setMedia_Properties(Collection<MediaProperty> media_properties); @JsonIgnore Map<MediaPropertyKey, String> getMediaPropertyByType(MediumType type); String getMediaPropertyValue(MediumType type, MediaPropertyKey key); static String getMediaPropertyValue(Collection<MediaProperty> media_properties, MediumType type,
                                               MediaPropertyKey key); @JsonIgnore static Map<MediaPropertyKey, String> getMediaPropertyByType(Collection<MediaProperty> media_properties,
                                                                       MediumType type); void addMedia_Properties(MediaProperty mediaProperty); EventCallback getEventCallback(String event); void addEventCallback(String eventId, String event, String callback); static Integer getRetryCount(String sessionKey); static void flushRetryCount(String sessionKey); static Integer updateRetryCount(String sessionKey); @JsonIgnore String getTextWithAnswerTexts(Session session); static String appendParentSessionKeyToURL(String sessionKey, String url); static HashMap<String, String> getAskFastRequestQueryParams(String requester, String responder,
        String sessionKey, String parentSessionKey); static final int DEFAULT_MAX_QUESTION_LOAD; static final String MEDIA_PROPERTIES; }
@Test public void parseEmptyQuestionJSON() { Question question; String json = ""; question = Question.fromJSON(json); assertNull(question); json = "{}"; question = Question.fromJSON(json); assertNotNull(question); }