public class TranslationPageDAO extends AbstractLogEnabled implements Serviceable, Component
Modifier and Type | Field and Description |
---|---|
private CurrentUserProvider |
_currentUserProvider |
private ObservationManager |
_observationManager |
private AmetysObjectResolver |
_resolver |
static String |
ROLE
Avalon Role
|
Constructor and Description |
---|
TranslationPageDAO() |
Modifier and Type | Method and Description |
---|---|
protected void |
_cleanPage(ModifiablePage page)
Clean a page of its translations metadata.
|
protected void |
_setTranslations(ModifiablePage page,
Map<String,Page> pages)
Set the translations of a page in its metadata.
|
Map<String,Page> |
getTranslations(Page page)
Get the translation of a given page.
|
void |
service(ServiceManager smanager) |
List<String> |
setTranslations(String pageId,
Map<String,Page> pages)
Set the translations for a specific page
|
enableLogging, getLogger, setupLogger, setupLogger, setupLogger
private AmetysObjectResolver _resolver
private CurrentUserProvider _currentUserProvider
private ObservationManager _observationManager
public TranslationPageDAO()
public void service(ServiceManager smanager) throws ServiceException
service
in interface Serviceable
ServiceException
public List<String> setTranslations(String pageId, Map<String,Page> pages)
pageId
- The current page idpages
- the map of translated pagepublic Map<String,Page> getTranslations(Page page)
page
- the page.protected void _setTranslations(ModifiablePage page, Map<String,Page> pages)
page
- the page.pages
- the translated pages to set.protected void _cleanPage(ModifiablePage page)
page
- the page to clean.