stable

Clone or download

Read-only

Get the size of a folder

part of: story #12404 download folder as zip How to test: In the API Explorer, call GET /docman_items/{ id } | with_size=true --> Throws I18N Rest exception when the provided id does not belong to a folder --> Returns the size of the folder and the number of files in the representation as 'folder_properties' Change-Id: Ib1c2564ec400cf5e2d6d7539981b6293fd40db99

Modified Files

Name
M plugins/docman/include/Docman_Version.class.php +6 −4 Go to diff View file
M plugins/docman/include/REST/v1/DocmanItemsResource.php +25 −2 Go to diff View file
A plugins/docman/include/REST/v1/Folders/ComputeFolderSizeVisitor.php +97 −0 Go to diff View file
A plugins/docman/include/REST/v1/Folders/FolderPropertiesRepresentation.php +47 −0 Go to diff View file
A plugins/docman/include/REST/v1/Folders/FolderSizeCollector.php +57 −0 Go to diff View file
M plugins/docman/include/REST/v1/ItemRepresentation.php +9 −1 Go to diff View file
M plugins/docman/include/REST/v1/ItemRepresentationBuilder.php +5 −2 Go to diff View file
M plugins/docman/include/REST/v1/ItemRepresentationVisitor.php +22 −1 Go to diff View file
M plugins/docman/site-content/fr_FR/LC_MESSAGES/tuleap-docman.po +4 −1 Go to diff View file
M plugins/docman/tests/rest/Docman/DocmanItemsTest.php +25 −0 Go to diff View file
M plugins/docman/tests/rest/DocmanDataBuilder.php +10 −7 Go to diff View file
M plugins/docman/tests/rest/Helper/DocmanFolderDataBuild.php +48 −0 Go to diff View file
M plugins/docman/tests/unit/REST/v1/ItemRepresentationCollectionBuilderTest.php +13 −8 Go to diff View file
M plugins/docman/tests/unit/REST/v1/ItemRepresentationVisitorTest.php +25 −0 Go to diff View file