public class ProgramDAO extends Object implements Serviceable, Component
Modifier and Type | Field and Description |
---|---|
protected CurrentUserProvider |
_currentUserProvider
The current user provider.
|
protected ObservationManager |
_observationManager
Observer manager.
|
protected ODFHelper |
_odfHelper
ODF helper
|
protected AmetysObjectResolver |
_resolver
The ametys object resolver
|
static String |
ROLE
The Avalon role
|
Constructor and Description |
---|
ProgramDAO() |
Modifier and Type | Method and Description |
---|---|
protected UserIdentity |
_getCurrentUser()
Provides the current user.
|
protected void |
linkTranslations(Map<String,String> translatedContents)
Store links to the other translations for all copied contents
|
protected void |
linkTranslations(ModifiableContent originalContent,
ModifiableContent translatedContent)
Store links to the other translations in all the translated objects.
|
void |
service(ServiceManager manager) |
Map<String,String> |
translateProgram(String contentId,
String language,
boolean fullCopy)
Translates a given program in a language
|
protected AmetysObjectResolver _resolver
protected ObservationManager _observationManager
protected CurrentUserProvider _currentUserProvider
protected ODFHelper _odfHelper
public ProgramDAO()
public void service(ServiceManager manager) throws ServiceException
service
in interface Serviceable
ServiceException
public Map<String,String> translateProgram(String contentId, String language, boolean fullCopy) throws Exception
contentId
- The program idlanguage
- The language in which to translatefullCopy
- True if full copyException
- if an error occursprotected void linkTranslations(Map<String,String> translatedContents)
translatedContents
- The translated contentsprotected void linkTranslations(ModifiableContent originalContent, ModifiableContent translatedContent)
originalContent
- The original contenttranslatedContent
- The translated contentprotected UserIdentity _getCurrentUser()
null
.