I want to collect all attachments of a space using the method of the AttachmentManager:
java.util.List<<a href="https://docs.atlassian.com/atlassian-confluence/latest/com/atlassian/confluence/pages/Attachment.html" title="class in com.atlassian.confluence.pages" rel="nofollow noopener noreferrer">Attachment</a>> | <strong><a href="https://docs.atlassian.com/atlassian-confluence/latest/com/atlassian/confluence/pages/AttachmentManager.html#getLatestVersionsOfAttachments%28com.atlassian.confluence.core.ContentEntityObject%29" rel="nofollow noopener noreferrer">getLatestVersionsOfAttachments</a></strong>(<a href="https://docs.atlassian.com/atlassian-confluence/latest/com/atlassian/confluence/core/ContentEntityObject.html" title="class in com.atlassian.confluence.core" rel="nofollow noopener noreferrer">ContentEntityObject</a> content) |
BHow can I define the content entitiy object (here the space?) to run the method?
My approach is this:
# @noparams
#set( $allSpaces = $spaceManager.getAllSpaces() )
#foreach( $s in $allSpaces )
<li>$attachmentManager.getLatestVersionsOfAttachments $s )
#end
BBut this doesn't work.