@JsonMapper.JsonMappingCompleted void convertExpires() { if (rawExpires != null) { expires = new Date().getTime() + 1000L * rawExpires; } }
@JsonMapper.JsonMappingCompleted private void convertTime() { if (rawCreatedTime != null) { createdTime = new Date(); createdTime.setTime(rawCreatedTime * 1000); } }
@JsonMappingCompleted private void convertDate() { if (rawTime != null) { time.setTime(rawTime * 1000); } }
@JsonMapper.JsonMappingCompleted void convertRule() { rule = RuleFactory.createRuleFromJson(ruleJson); }
@JsonMappingCompleted protected void convertPicture(JsonMapper jsonMapper) { MappingUtils mappingUtils = new MappingUtils(jsonMapper); picture = mappingUtils.convertPicture(rawPicture); }
@JsonMapper.JsonMappingCompleted protected void convertPicture(JsonMapper jsonMapper) { MappingUtils mappingUtils = new MappingUtils(jsonMapper); picture = mappingUtils.convertPicture(rawPicture); }
@JsonMappingCompleted void convertTags() { if (rawTags != null) { JsonValue parsedObject = Json.parse(rawTags); if (parsedObject.isObject() && parsedObject.asObject().get("data").isArray()) { for (JsonValue tagObject : parsedObject.asObject().get("data").asArray()) { tags.add(tagObject.asObject().get("name").asString()); } } } }
@JsonMapper.JsonMappingCompleted private void provideFallback() { if (getType() == null && source != null) { setType(source); } if (getType() != null && source == null) { setSource(getType()); } }
@JsonMappingCompleted protected void graphApi26LikesFallback() { if (getFanCount() != null && getLikesCount() == null) { likesCount = fanCount; } if (getFanCount() == null && getLikesCount() != null) { fanCount = likesCount; } }
@JsonMapper.JsonMappingCompleted private void convertVerb() { if (verbAsString != null) { verb = Verb.valueOf(verbAsString.toUpperCase()); } }
@JsonMapper.JsonMappingCompleted protected void fillProfilePicture(JsonMapper jsonMapper) { MappingUtils mappingUtils = new MappingUtils(jsonMapper); picture = mappingUtils.convertPicture(rawPicture); }
@JsonMapper.JsonMappingCompleted void convertData(JsonMapper mapper) { if (data != null) { metaData = mapper.toJavaObject(data, MetaData.class); } }
@JsonMapper.JsonMappingCompleted protected void check() { if (id != null) { success = true; } }
@JsonMappingCompleted protected void fillPicture(JsonMapper jsonMapper) { MappingUtils mappingUtils = new MappingUtils(jsonMapper); picture = mappingUtils.convertPicture(rawPicture); }
@JsonMapper.JsonMappingCompleted void convertTime() { startDate = toDateFromShortFormat(rawStartDate); endDate = toDateFromShortFormat(rawEndDate); }
@JsonMapper.JsonMappingCompleted private void convertChangeValue(JsonMapper mapper) { if (rawValue != null) { ChangeValueFactory factory = new ChangeValueFactory().setField(field).setUserObjectVerb(userObjectVerb).setValue(rawValue); value = factory.buildWithMapper(mapper); if (value instanceof UserVerbValue && userObjectVerb != null) { ((UserVerbValue) value).setVerb(userObjectVerb); } } }
@JsonMappingCompleted private void fillFields() { JsonObject summaryObject = null; if (summary != null) { summaryObject = Json.parse(summary).asObject(); } fillTotalCount(summaryObject); fillHasLiked(summaryObject); fillCanLike(summaryObject); }
@JsonMapper.JsonMappingCompleted protected void convertTimezone() { if (timezoneAsString != null) { try { timeZone = TimeZone.getTimeZone(timezoneAsString); } catch (Exception e) { } } // exception during timezone detection is ignored here }
@JsonMappingCompleted protected void convertHours() { if (!rawHours.isEmpty()) { Hours hoursObj = new Hours(); for (JsonObject entry : rawHours) { hoursObj.addHour(entry.getString("key", ""), entry.getString("value", "")); } hours = hoursObj; } }
@JsonMapper.JsonMappingCompleted void convertTime() { startDate = toDateFromShortFormat(rawStartDate); endDate = toDateFromShortFormat(rawEndDate); }