public static ObjectData convertObject(Map<String, Object> json) {
if (json == null) {
return null;
}
ObjectDataImpl result = new ObjectDataImpl();
result.setAcl(convertAcl(getMap(json.get(JSON_OBJECT_ACL)), getBoolean(json, JSON_OBJECT_EXACT_ACL)));
result.setAllowableActions(convertAllowableActions(getMap(json.get(JSON_OBJECT_ALLOWABLE_ACTIONS))));
Map<String, Object> jsonChangeEventInfo = getMap(json.get(JSON_OBJECT_CHANGE_EVENT_INFO));
if (jsonChangeEventInfo != null) {
ChangeEventInfoDataImpl changeEventInfo = new ChangeEventInfoDataImpl();
changeEventInfo.setChangeTime(getDateTime(jsonChangeEventInfo, JSON_CHANGE_EVENT_TIME));
changeEventInfo.setChangeType(getEnum(jsonChangeEventInfo, JSON_CHANGE_EVENT_TYPE, ChangeType.class));
convertExtension(json, result, CHANGE_EVENT_KEYS);
result.setChangeEventInfo(changeEventInfo);
}
result.setIsExactAcl(getBoolean(json, JSON_OBJECT_EXACT_ACL));
result.setPolicyIds(convertPolicyIds(getList(json.get(JSON_OBJECT_POLICY_IDS))));
result.setProperties(convertProperties(getMap(json.get(JSON_OBJECT_PROPERTIES))));
List<Object> jsonRelationships = getList(json.get(JSON_OBJECT_RELATIONSHIPS));
if (jsonRelationships != null) {
result.setRelationships(convertObjects(jsonRelationships));
}
List<Object> jsonRenditions = getList(json.get(JSON_OBJECT_RENDITIONS));
if (jsonRenditions != null) {
result.setRenditions(convertRenditions(jsonRenditions));
}
convertExtension(json, result, OBJECT_KEYS);
return result;