com.atlassian.confluence.pages
Interface TrashManager

All Known Implementing Classes:
DefaultTrashManager

public interface TrashManager

Operations on the Trash


Method Summary
 void emptyTrash(Space space)
          Purge all of the trash in a given space.
 int getNumberOfItemsInTrash(Space spaceKeypace)
          Retrieve the total number of items in the trash for a given space.
 java.util.List<ContentEntityObject> getTrashContents(Space space, int offset, int count)
          Retrieve a subset of the contents of the trash for a particular space.
 java.util.List<ContentEntityObject> getTrashContents(java.lang.String spaceKey)
          Deprecated. 
 boolean purge(java.lang.String spaceKey, long contentId)
          Remove one item from the trash.
 

Method Detail

getTrashContents

@Deprecated
java.util.List<ContentEntityObject> getTrashContents(java.lang.String spaceKey)
Deprecated. 

Deprecated since 3.5 - potentially expensive operation. Use getTrashContents(com.atlassian.confluence.spaces.Space, int, int)

Parameters:
spaceKey - the key of the space to retrieve trash for
Returns:
the complete contents of the trash for the given space

emptyTrash

void emptyTrash(Space space)
Purge all of the trash in a given space.

Parameters:
space -

getNumberOfItemsInTrash

int getNumberOfItemsInTrash(Space spaceKeypace)
Retrieve the total number of items in the trash for a given space.

Parameters:
spaceKeypace@return - the number of items in the trash for that space

purge

boolean purge(java.lang.String spaceKey,
              long contentId)
Remove one item from the trash. If no content exists with the given ID, nothing will be done. If the content exists but is not in the trash, or does not belong to the correct space, an exception will be thrown

Parameters:
spaceKey - the space to purge the trash from
contentId - the id of the item to remove from the trash @return true if content was purged, false if no content was found with that ID
Returns:
true if content was purged, false if no matching content was found
Throws:
java.lang.IllegalStateException - if the content is not in the trash, or is in the wrong space

getTrashContents

java.util.List<ContentEntityObject> getTrashContents(Space space,
                                                     int offset,
                                                     int count)
Retrieve a subset of the contents of the trash for a particular space.

Parameters:
space -
offset - the offset of the first item to retrieve (0-based)
count - the maximum number of items to retrieve
Returns:
the contents of the trash, up to the maximum number provided


Copyright © 2003-2014 Atlassian. All Rights Reserved.