com.atlassian.confluence.pages.persistence.dao
Interface DraftDao

All Known Implementing Classes:
HibernateDraftDao, SessionDraftDao

public interface DraftDao


Method Summary
 java.util.List findAll()
           
 java.util.List findByCreatorName(java.lang.String creatorName)
           
 Draft getDraft(long draftId)
           
 Draft getDraft(java.lang.String pageId, java.lang.String owner, java.lang.String type)
          Finds and returns a draft object with all the specified properties or null if none is found.
 void remove(Draft draft)
          remove a draft by matching its key (pageId, owner and type)
 void remove(long id)
          remove a draft by its id.
 void removeAll()
          Removes all drafts from the data repository associated with this dao
 void saveOrUpdate(Draft draft)
           
 void updateSpaceKey(java.lang.String newSpaceKey, java.lang.String oldSpaceKey)
           
 

Method Detail

saveOrUpdate

void saveOrUpdate(Draft draft)

getDraft

Draft getDraft(java.lang.String pageId,
               java.lang.String owner,
               java.lang.String type)
Finds and returns a draft object with all the specified properties or null if none is found.

Parameters:
pageId - the id of the page which this draft is associated with
owner - the owner of the draft
type - the type of draft (check the CONTENT_TYPE constant for the relevant ContentEntityObject being drafted)
Returns:
a draft object with all the specified properties or null if no valid draft could be found

getDraft

Draft getDraft(long draftId)

remove

void remove(Draft draft)
remove a draft by matching its key (pageId, owner and type)

Parameters:
draft -

remove

void remove(long id)
remove a draft by its id.

Parameters:
id -

findByCreatorName

java.util.List findByCreatorName(java.lang.String creatorName)

updateSpaceKey

void updateSpaceKey(java.lang.String newSpaceKey,
                    java.lang.String oldSpaceKey)

removeAll

void removeAll()
Removes all drafts from the data repository associated with this dao


findAll

java.util.List findAll()
Returns:
all drafts


Copyright © 2003-2008 Atlassian Pty Ltd. All Rights Reserved.