result.put(JSON_OBJECT_ALLOWABLE_ACTIONS, convert(object.getAllowableActions()));
}
// relationships
if (object.getRelationships() != null) {
JSONArray relationships = new JSONArray();
for (ObjectData relationship : object.getRelationships()) {
relationships.add(convert(relationship, typeCache));
}
result.put(JSON_OBJECT_RELATIONSHIPS, relationships);
}
// change event info
if (object.getChangeEventInfo() != null) {
JSONObject changeEventInfo = new JSONObject();
ChangeEventInfo cei = object.getChangeEventInfo();
changeEventInfo.put(JSON_CHANGE_EVENT_TYPE, getJSONStringValue(cei.getChangeType().value()));
changeEventInfo.put(JSON_CHANGE_EVENT_TIME, getJSONValue(cei.getChangeTime()));
result.put(JSON_OBJECT_CHANGE_EVENT_INFO, changeEventInfo);
}
// ACL
if ((object.getAcl() != null) && (object.getAcl().getAces() != null)) {
result.put(JSON_OBJECT_ACL, convert(object.getAcl()));
result.put(JSON_OBJECT_EXACT_ACL, object.isExactAcl());
}
// policy ids
if ((object.getPolicyIds() != null) && (object.getPolicyIds().getPolicyIds() != null)) {
JSONArray policyIds = new JSONArray();
for (String pi : object.getPolicyIds().getPolicyIds()) {
policyIds.add(pi);
}
result.put(JSON_OBJECT_POLICY_IDS, policyIds);
}
// renditions
if (object.getRenditions() != null) {
JSONArray renditions = new JSONArray();
for (RenditionData rendition : object.getRenditions()) {
renditions.add(convert(rendition));
}
result.put(JSON_OBJECT_RENDITIONS, renditions);
}