Interface AttachmentService.AttachmentFinder
-
- All Superinterfaces:
ManyFetcher<Content>
,SingleFetcher<Content>
- Enclosing interface:
- AttachmentService
public static interface AttachmentService.AttachmentFinder extends SingleFetcher<Content>, ManyFetcher<Content>
A finder for locating attachments.In general calls to withX() apply restrictions on the attachments to be returned by fetchX() methods
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description AttachmentService.AttachmentFinder
withContainerId(ContentId parentId)
Restrict the attachments returned to those with the given parent.AttachmentService.AttachmentFinder
withFilename(String filename)
Restrict the attachments fetched to those with the given filename.SingleFetcher<Content>
withId(ContentId attachmentId)
Restrict the attachment returned by the fetch methods to those with the given attachmentIdAttachmentService.AttachmentFinder
withMediaType(String type)
Restrict the attachments fetched to those with the given file type, these file types should match the string representation of a type in javax.ws.rs.core.MediaType-
Methods inherited from interface com.atlassian.confluence.api.service.finder.ManyFetcher
fetchMany
-
Methods inherited from interface com.atlassian.confluence.api.service.finder.SingleFetcher
fetch, fetchOne, fetchOneOrNull, fetchOrNull
-
-
-
-
Method Detail
-
withId
SingleFetcher<Content> withId(ContentId attachmentId)
Restrict the attachment returned by the fetch methods to those with the given attachmentId- Parameters:
attachmentId
- - the id of the attachment to look up- Returns:
- a SingleFetcher that will return an attachment that has the given ID if it exists
-
withContainerId
AttachmentService.AttachmentFinder withContainerId(ContentId parentId)
Restrict the attachments returned to those with the given parent. Unless the attachment is being looked up by ID via the withId method, this method is compulsory.- Parameters:
parentId
- - the id of a Content container that contains the attachments to be found- Returns:
- this AttachmentFinder with the restriction applied
-
withFilename
AttachmentService.AttachmentFinder withFilename(String filename)
Restrict the attachments fetched to those with the given filename.- Parameters:
filename
- - the filename to match- Returns:
- this AttachmentFinder with the restriction applied
-
withMediaType
AttachmentService.AttachmentFinder withMediaType(String type)
Restrict the attachments fetched to those with the given file type, these file types should match the string representation of a type in javax.ws.rs.core.MediaType- Parameters:
type
- - the media to match- Returns:
- this AttachmentFinder with the restriction applied
-
-