public class ProgramDAO extends Object implements Serviceable, Component
Modifier and Type | Field and Description |
---|---|
protected ContentWorkflowHelper |
_contentWorkflowHelper
The content workflow helper
|
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 int |
getCopyActionId()
Get the workflow action id for copy.
|
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
protected ContentWorkflowHelper _contentWorkflowHelper
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
.protected int getCopyActionId()