com.atlassian.confluence.pages
Class DefaultTrashManager

java.lang.Object
  extended by com.atlassian.confluence.pages.DefaultTrashManager
All Implemented Interfaces:
TrashManager

public class DefaultTrashManager
extends java.lang.Object
implements TrashManager

This class provides utility methods for operating on the Trash


Constructor Summary
DefaultTrashManager()
           
 
Method Summary
 void emptyTrash(Space space)
          Purge all of the trash in a given space.
 int getNumberOfItemsInTrash(Space space)
          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 since 3.5 - potentially expensive operation.
 boolean purge(java.lang.String spaceKey, long contentId)
          Remove one item from the trash.
 void setContentEntityManager(ContentEntityManager contentEntityManager)
           
 void setContentEntityObjectDao(ContentEntityObjectDao contentEntityObjectDao)
           
 void setEventPublisher(com.atlassian.event.api.EventPublisher eventPublisher)
           
 void setPageManager(PageManager pageManager)
           
 void setTransactionManager(org.springframework.transaction.PlatformTransactionManager transactionManager)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultTrashManager

public DefaultTrashManager()
Method Detail

getTrashContents

public java.util.List<ContentEntityObject> getTrashContents(java.lang.String spaceKey)
Description copied from interface: TrashManager
Deprecated since 3.5 - potentially expensive operation. Use TrashManager.getTrashContents(com.atlassian.confluence.spaces.Space, int, int)

Specified by:
getTrashContents in interface TrashManager
Parameters:
spaceKey - the key of the space to retrieve trash for
Returns:
the complete contents of the trash for the given space

emptyTrash

public void emptyTrash(Space space)
Description copied from interface: TrashManager
Purge all of the trash in a given space.

Specified by:
emptyTrash in interface TrashManager

getNumberOfItemsInTrash

public int getNumberOfItemsInTrash(Space space)
Description copied from interface: TrashManager
Retrieve the total number of items in the trash for a given space.

Specified by:
getNumberOfItemsInTrash in interface TrashManager

purge

public boolean purge(java.lang.String spaceKey,
                     long contentId)
Description copied from interface: TrashManager
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

Specified by:
purge in interface TrashManager
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

getTrashContents

public java.util.List<ContentEntityObject> getTrashContents(Space space,
                                                            int offset,
                                                            int count)
Description copied from interface: TrashManager
Retrieve a subset of the contents of the trash for a particular space.

Specified by:
getTrashContents in interface TrashManager
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

setContentEntityObjectDao

public void setContentEntityObjectDao(ContentEntityObjectDao contentEntityObjectDao)

setContentEntityManager

public void setContentEntityManager(ContentEntityManager contentEntityManager)

setTransactionManager

public void setTransactionManager(org.springframework.transaction.PlatformTransactionManager transactionManager)

setPageManager

public void setPageManager(PageManager pageManager)

setEventPublisher

public void setEventPublisher(com.atlassian.event.api.EventPublisher eventPublisher)


Copyright © 2003-2014 Atlassian. All Rights Reserved.