public static ObjectData getObjectData(TypeDefinition typeDef, StoredObject so, String filter, String user,
Boolean includeAllowableActions, IncludeRelationships includeRelationships, String renditionFilter,
Boolean includePolicyIds, Boolean includeACL, ExtensionsData extension) {
ObjectDataImpl od = new ObjectDataImpl();
if (so == null) {
throw new CmisObjectNotFoundException("Illegal object id: null");
}
// build properties collection
List<String> requestedIds = FilterParser.getRequestedIdsFromFilter(filter);
Properties props = getPropertiesFromObject(so, typeDef, requestedIds, true);
// fill output object
if (null != includeAllowableActions && includeAllowableActions) {
AllowableActions allowableActions = DataObjectCreator.fillAllowableActions(so, user);
od.setAllowableActions(allowableActions);
}
if (null != includeACL && includeACL) {
od.setAcl(null);
}
od.setIsExactAcl(true);
if (null != includePolicyIds && includePolicyIds) {
od.setPolicyIds(DataObjectCreator.fillPolicyIds(so));
}
if (null != includeRelationships && includeRelationships != IncludeRelationships.NONE) {
od.setRelationships(DataObjectCreator.fillRelationships(includeRelationships, so));
}
if (renditionFilter != null && renditionFilter.length() > 0) {
od.setRenditions(DataObjectCreator.fillRenditions(so));
}
od.setProperties(props);
// Note: do not set change event info for this call
return od;
}