Class TranslationPageDAO
- java.lang.Object
-
- org.apache.avalon.framework.logger.AbstractLogEnabled
-
- org.ametys.plugins.translationflagging.TranslationPageDAO
-
- All Implemented Interfaces:
Component
,LogEnabled
,Serviceable
public class TranslationPageDAO extends AbstractLogEnabled implements Serviceable, Component
Translation page DAO
-
-
Constructor Summary
Constructors Constructor Description TranslationPageDAO()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
_cleanPage(ModifiablePage page)
Clean a page of its translations data.protected void
_setTranslations(ModifiablePage page, Map<String,Page> pages)
Set the translations of a page in its data.Map<String,Page>
getTranslations(Page page)
Get the translations of a given page.void
service(ServiceManager smanager)
List<String>
setTranslations(String pageId, Map<String,Page> pages)
Set the translations for a specific page-
Methods inherited from class org.apache.avalon.framework.logger.AbstractLogEnabled
enableLogging, getLogger, setupLogger, setupLogger, setupLogger
-
-
-
-
Constructor Detail
-
TranslationPageDAO
public TranslationPageDAO()
-
-
Method Detail
-
service
public void service(ServiceManager smanager) throws ServiceException
- Specified by:
service
in interfaceServiceable
- Throws:
ServiceException
-
setTranslations
public List<String> setTranslations(String pageId, Map<String,Page> pages)
Set the translations for a specific page- Parameters:
pageId
- The current page idpages
- the map of translated page- Returns:
- The list of updated pages.
-
getTranslations
public Map<String,Page> getTranslations(Page page)
Get the translations of a given page.- Parameters:
page
- the page.- Returns:
- the translated pages as a Map of pages, indexed by sitemap name (language).
-
_setTranslations
protected void _setTranslations(ModifiablePage page, Map<String,Page> pages)
Set the translations of a page in its data.- Parameters:
page
- the page.pages
- the translated pages to set.
-
_cleanPage
protected void _cleanPage(ModifiablePage page)
Clean a page of its translations data.- Parameters:
page
- the page to clean.
-
-