Interface AttachmentManagerInternal
- All Superinterfaces:
AttachmentManager
- All Known Implementing Classes:
DefaultAttachmentManager
,DelegatorAttachmentManager
,ReadThroughCachingAttachmentManager
DMZ version of the
AttachmentManager
interface; see the package-info.java for rationale.- Since:
- 9.0
-
Method Summary
Modifier and TypeMethodDescriptionlong
countAttachmentsBySpaceAndStatuses
(Space space, List<ContentStatus> statuses) This method only count the latest versions of attachments by statuses in a spacelong
countAttachmentsByStatuses
(List<ContentStatus> statuses) This method only count the latest versions of attachments by statusesDeprecated.since 7.5getCopier
(AttachmentManagerInternal destination) Retrieves a AttachmentDao.AttachmentCopier that will allow the attachments from one data store to be copied across to another.getFilteredAttachments
(ContentEntityObject content, LimitedRequest pageRequest, Predicate<? super Attachment> filterPredicate) Returns the current attachments under the CEO.getLatestVersionsOfAttachmentsWithAnyStatusForContainers
(Iterable<? extends ContentEntityObject> contentEntityObjects) Returns a list of all the latest versions of attachments for all the CEOs provided (including trashed)void
moveAttachment
(Attachment attachment, ContentEntityObject newContainer) Moves an attachment to a differentContentEntityObject
container.@NonNull PageResponse<Attachment>
scanFilteredAttachments
(Space space, List<ContentStatus> statuses, LimitedRequest pageRequest, Predicate<? super Attachment>... filter) Retrieves all the existing attachments associated with the instance of Confluence, while applying the specified pagination parameters to limit the number of results returned in each request.@NonNull PageResponse<Attachment>
scanFilteredAttachments
(List<ContentStatus> statuses, LimitedRequest pageRequest, Predicate<? super Attachment>... filter) Retrieves all the current attachments within the specified space, with the results limited according to the provided pagination parameters.Methods inherited from interface com.atlassian.confluence.pages.AttachmentManager
copyAttachment, copyAttachments, copyAttachments, countLatestVersionsOfAttachments, countLatestVersionsOfAttachmentsOnPageSince, countLatestVersionsOfAttachmentsWithAnyStatus, deepAttachmentDelete, findAttachmentForDownloadPath, getAllVersions, getAllVersionsOfAttachments, getAttachment, getAttachment, getAttachment, getAttachmentData, getAttachmentData, getAttachmentDownloadPath, getAttachments, getAttachmentStatistics, getBackingStorageType, getLastAddedVersionsOf, getLatestVersionsOfAttachments, getLatestVersionsOfAttachmentsForMultipleCeos, getLatestVersionsOfAttachmentsWithAnyStatus, getPreviousVersions, getRemappedAttachmentIds, moveAttachment, removeAttachmentFromServer, removeAttachments, removeAttachmentVersionFromServer, removeAttachmentVersionFromServerWithoutNotifications, removeAttachmentWithoutNotifications, restore, saveAttachment, saveAttachment, saveAttachments, saveAttachments, setAttachmentData, trash
-
Method Details
-
getFilteredAttachments
@Transactional(readOnly=true) PageResponse<Attachment> getFilteredAttachments(ContentEntityObject content, LimitedRequest pageRequest, Predicate<? super Attachment> filterPredicate) Returns the current attachments under the CEO.- Parameters:
content
- the content to return attachments forpageRequest
- the pagination requestedfilterPredicate
- the predicate for filtering found attachments- Returns:
- the paginated response of Page entities
- Since:
- 7.0.1
-
moveAttachment
Moves an attachment to a differentContentEntityObject
container.- Parameters:
attachment
- The attachment to be movednewContainer
- The new ContentEntiityObject which will be parent to the attachment
-
getLatestVersionsOfAttachmentsWithAnyStatusForContainers
@Transactional(readOnly=true) List<Attachment> getLatestVersionsOfAttachmentsWithAnyStatusForContainers(Iterable<? extends ContentEntityObject> contentEntityObjects) Returns a list of all the latest versions of attachments for all the CEOs provided (including trashed)- Parameters:
contentEntityObjects
-- Since:
- 6.12.0
-
getAttachmentDao
Deprecated.since 7.5Provides a back door to the underlyingAttachmentDao
. Obviously it's better access the DAO directly, so this is deprecated. -
getCopier
@Transactional(readOnly=true) AttachmentDao.AttachmentCopier getCopier(AttachmentManagerInternal destination) Retrieves a AttachmentDao.AttachmentCopier that will allow the attachments from one data store to be copied across to another.- Parameters:
destination
- the AttachmentManager the data is being copied to- Returns:
- an AttachmentCopier object
-
countAttachmentsByStatuses
This method only count the latest versions of attachments by statuses- Parameters:
statuses
- list ofContentStatus
- Returns:
- since 9.2.5
-
countAttachmentsBySpaceAndStatuses
@Transactional(readOnly=true) long countAttachmentsBySpaceAndStatuses(Space space, List<ContentStatus> statuses) This method only count the latest versions of attachments by statuses in a space- Parameters:
space
- the space which the attachments belong tostatuses
- list ofContentStatus
- Returns:
- since 9.2.5
-
scanFilteredAttachments
@NonNull PageResponse<Attachment> scanFilteredAttachments(Space space, List<ContentStatus> statuses, LimitedRequest pageRequest, Predicate<? super Attachment>... filter) Retrieves all the existing attachments associated with the instance of Confluence, while applying the specified pagination parameters to limit the number of results returned in each request.- Parameters:
space
- the space to locate attachments instatuses
- list of content status which we are interested to fetchpageRequest
- the pagination requestedfilter
- a Predicate to apply to the results before returning- Returns:
- the paginated response of Attachment entities in the given space
- Since:
- 9.2.5
-
scanFilteredAttachments
@NonNull PageResponse<Attachment> scanFilteredAttachments(List<ContentStatus> statuses, LimitedRequest pageRequest, Predicate<? super Attachment>... filter) Retrieves all the current attachments within the specified space, with the results limited according to the provided pagination parameters.- Parameters:
statuses
- list of content status which we are interested to fetchpageRequest
- the pagination requestedfilter
- a Predicate to apply to the results before returning- Returns:
- the paginated response of Attachment entities in any space
- Since:
- 9.2.5
-