org.riotfamily.pages.dao
Interface PageDao

All Known Implementing Classes:
AbstractPageDao, HibernatePageDao

public interface PageDao

DAO interface for pages and aliases.

Implementors should extend AbstractPageDao instead of implementing this interface directly.

Since:
6.5
Author:
Felix Gnass [fgnass at neteye dot de]

Method Summary
 Page addTranslation(PageNode node, Site site, String pathComponent)
           
 Page addTranslation(Page page, Site site)
           
 void deleteAlias(Page page)
           
 void deletePage(Page page)
           
 void deleteSite(Site site)
           
 void discardPageProperties(Page page)
           
 PageNode findNodeOfType(String pageType)
          Returns the PageNode with the given pageType, or null if no such node exists.
 Page findPage(Site site, String path)
          Returns the Page with the given site and path, or null if no such page exists.
 PageAlias findPageAlias(Site site, String path)
          Returns the PageAlias with the given site and path, or null if no such alias exists.
 Page findPageOfType(String pageType, Site site)
          Returns the Page with the given pageType and site, or null if no such page exists.
 List<Page> findPagesOfType(String pageType, Site site)
          Returns all pages with the given pageType and site, or an empty list if no page is found.
 Site findSite(String hostName, String path)
           
 Site findSiteByLocale(Locale locale)
           
 Site findSiteWithProperty(String name, Object value)
           
 Site getDefaultSite()
          Returns the first site returned by listSites().
 PageNode getRootNode()
          Returns the root node.
 List<String> getWildcardPaths(Site site)
           
 List<Site> listSites()
          Returns all sites.
 Page loadPage(Long id)
          Loads the Page with the given id.
 PageNode loadPageNode(Long id)
          Loads the PageNode with the given id.
 Site loadSite(Long id)
           
 Object mergePage(Page page)
           
 Site mergeSite(Site site)
           
 void moveNode(PageNode node, PageNode newParent)
           
 void publishPage(Page page)
           
 void publishPageProperties(Page page)
           
 void refreshPageIfDetached(Page page)
           
 void refreshSiteIfDetached(Site site)
           
 void saveNode(PageNode node)
           
 void savePage(Page parent, Page child)
           
 void savePage(Site site, Page page)
           
 void saveSite(Site site)
           
 void unpublishPage(Page page)
           
 void updateNode(PageNode node)
           
 void updatePage(Page page)
           
 void updateSite(Site site)
           
 

Method Detail

loadPage

Page loadPage(Long id)
Loads the Page with the given id.


loadPageNode

PageNode loadPageNode(Long id)
Loads the PageNode with the given id.


findSiteByLocale

Site findSiteByLocale(Locale locale)

findSite

Site findSite(String hostName,
              String path)

findSiteWithProperty

Site findSiteWithProperty(String name,
                          Object value)

findPage

Page findPage(Site site,
              String path)
Returns the Page with the given site and path, or null if no such page exists.


findPageAlias

PageAlias findPageAlias(Site site,
                        String path)
Returns the PageAlias with the given site and path, or null if no such alias exists.


findNodeOfType

PageNode findNodeOfType(String pageType)
Returns the PageNode with the given pageType, or null if no such node exists.

Throws:
IncorrectResultSizeDataAccessException - if more than one node exists with the given pageType

findPageOfType

Page findPageOfType(String pageType,
                    Site site)
Returns the Page with the given pageType and site, or null if no such page exists.

Throws:
IncorrectResultSizeDataAccessException - if more than one page exists with the given pageType

findPagesOfType

List<Page> findPagesOfType(String pageType,
                           Site site)
Returns all pages with the given pageType and site, or an empty list if no page is found.


getWildcardPaths

List<String> getWildcardPaths(Site site)

getRootNode

PageNode getRootNode()
Returns the root node.


saveNode

void saveNode(PageNode node)

savePage

void savePage(Site site,
              Page page)

savePage

void savePage(Page parent,
              Page child)

addTranslation

Page addTranslation(Page page,
                    Site site)

addTranslation

Page addTranslation(PageNode node,
                    Site site,
                    String pathComponent)

refreshPageIfDetached

void refreshPageIfDetached(Page page)

mergePage

Object mergePage(Page page)

updatePage

void updatePage(Page page)

publishPage

void publishPage(Page page)

unpublishPage

void unpublishPage(Page page)

publishPageProperties

void publishPageProperties(Page page)

discardPageProperties

void discardPageProperties(Page page)

deletePage

void deletePage(Page page)

deleteAlias

void deleteAlias(Page page)

updateNode

void updateNode(PageNode node)

moveNode

void moveNode(PageNode node,
              PageNode newParent)

loadSite

Site loadSite(Long id)

getDefaultSite

Site getDefaultSite()
Returns the first site returned by listSites().


listSites

List<Site> listSites()
Returns all sites.


saveSite

void saveSite(Site site)

refreshSiteIfDetached

void refreshSiteIfDetached(Site site)

mergeSite

Site mergeSite(Site site)

updateSite

void updateSite(Site site)

deleteSite

void deleteSite(Site site)