Method: ActiveCMIS::Folder#allowed_object_types

Defined in:
lib/active_cmis/folder.rb

#allowed_object_typesObject



12
13
14
15
16
17
18
19
20
21
22
23
24
# File 'lib/active_cmis/folder.rb', line 12

def allowed_object_types
  if attributes["cmis:allowedChildObjectTypeIds"].empty?
    repository.types.select { |type| type.fileable }
  else
    # TODO: it is repository specific if subtypes of the allowed types MAY be filed (line 976)
    #
    # There is as far as I can see no other mention of this possibility in the spec, no way to
    # check if this is so for any specific repository. In addition there is in a few places a
    # requirement that an error is thrown if the cmis:objectTypeId is not in the list of allowed
    # values. So for now this is not supported at all.
    attributes["cmis:allowedChildObjectTypeIds"].map { |type_id| repository.type_by_id(type_id) }
  end
end