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 
- 
- 
Field Summary
Fields Modifier and Type Field Description private CurrentUserProvider_currentUserProviderprivate ObservationManager_observationManagerprivate AmetysObjectResolver_resolverstatic StringROLEAvalon Role 
- 
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.voidservice(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 
 - 
 
 - 
 
- 
- 
Field Detail
- 
_resolver
private AmetysObjectResolver _resolver
 
- 
_currentUserProvider
private CurrentUserProvider _currentUserProvider
 
- 
_observationManager
private ObservationManager _observationManager
 
 - 
 
- 
Constructor Detail
- 
TranslationPageDAO
public TranslationPageDAO()
 
 - 
 
- 
Method Detail
- 
service
public void service(ServiceManager smanager) throws ServiceException
- Specified by:
 servicein 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.
 
 - 
 
 -