Package org.ametys.plugins.survey.dao
Class AbstractDAO
- java.lang.Object
- 
- org.ametys.runtime.plugin.component.AbstractLogEnabled
- 
- org.ametys.plugins.survey.dao.AbstractDAO
 
 
- 
- All Implemented Interfaces:
- LogEnabled,- Component,- Contextualizable,- Serviceable
 - Direct Known Subclasses:
- PageDAO,- QuestionDAO,- SurveyDAO
 
 public abstract class AbstractDAO extends AbstractLogEnabled implements Serviceable, Component, Contextualizable Abstract DAO for objects in the plugin survey.
- 
- 
Field SummaryFields Modifier and Type Field Description protected Context_cocoonContextThe cocoon contextprotected Context_contextThe Avalon contextprotected CurrentUserProvider_currentUserProviderThe current user provider.protected JSONUtils_jsonUtilsJSON helperprotected ObservationManager_observationManagerObserver manager.protected AmetysObjectResolver_resolverAmetys object resolver.protected SiteManager_siteManagerThe site managerprotected UploadManager_uploadManagerManager for retrieving uploaded files
 - 
Constructor SummaryConstructors Constructor Description AbstractDAO()
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description protected UserIdentity_getCurrentUser()Provides the current user.voidcontextualize(Context context)protected Map<String,Object>getPictureInfo(AbstractSurveyElement elmt)Get the information about pictureprotected ModifiableTraversableAmetysObjectgetSurveyRootNode(String siteName, String lang)Get the root node for surveysvoidservice(ServiceManager serviceManager)protected voidsetPicture(AbstractSurveyElement elmt, String valueAsStr)Set the pictureprotected voidupdateReferencesAfterCopy(Survey originalSurvey, Survey createdSurvey)Update references after a survey copyprotected voidupdateReferencesAfterCopy(Survey originalSurvey, Survey createdSurvey, SurveyPage createdPage)Update references after copyprotected voidupdateReferencesAfterCopy(Survey originalSurvey, Survey createdSurvey, SurveyQuestion createdQuestion)Update references after copy- 
Methods inherited from class org.ametys.runtime.plugin.component.AbstractLogEnabledgetLogger, setLogger
 
- 
 
- 
- 
- 
Field Detail- 
_resolverprotected AmetysObjectResolver _resolver Ametys object resolver.
 - 
_siteManagerprotected SiteManager _siteManager The site manager
 - 
_observationManagerprotected ObservationManager _observationManager Observer manager.
 - 
_currentUserProviderprotected CurrentUserProvider _currentUserProvider The current user provider.
 - 
_uploadManagerprotected UploadManager _uploadManager Manager for retrieving uploaded files
 - 
_jsonUtilsprotected JSONUtils _jsonUtils JSON helper
 - 
_cocoonContextprotected Context _cocoonContext The cocoon context
 
- 
 - 
Constructor Detail- 
AbstractDAOpublic AbstractDAO() 
 
- 
 - 
Method Detail- 
servicepublic void service(ServiceManager serviceManager) throws ServiceException - Specified by:
- servicein interface- Serviceable
- Throws:
- ServiceException
 
 - 
contextualizepublic void contextualize(Context context) throws ContextException - Specified by:
- contextualizein interface- Contextualizable
- Throws:
- ContextException
 
 - 
getSurveyRootNodeprotected ModifiableTraversableAmetysObject getSurveyRootNode(String siteName, String lang) throws RepositoryException Get the root node for surveys- Parameters:
- siteName- the site name
- lang- the language
- Returns:
- the root node
- Throws:
- RepositoryException- if an error occurs when manipulating the repository
 
 - 
_getCurrentUserprotected UserIdentity _getCurrentUser() Provides the current user.- Returns:
- the user which cannot be null.
 
 - 
updateReferencesAfterCopyprotected void updateReferencesAfterCopy(Survey originalSurvey, Survey createdSurvey) Update references after a survey copy- Parameters:
- originalSurvey- The original survey
- createdSurvey- The created survey
 
 - 
updateReferencesAfterCopyprotected void updateReferencesAfterCopy(Survey originalSurvey, Survey createdSurvey, SurveyPage createdPage) Update references after copy- Parameters:
- originalSurvey- The original survey
- createdSurvey- The created survey
- createdPage- The created survey page
 
 - 
updateReferencesAfterCopyprotected void updateReferencesAfterCopy(Survey originalSurvey, Survey createdSurvey, SurveyQuestion createdQuestion) Update references after copy- Parameters:
- originalSurvey- The original survey
- createdSurvey- The created survey
- createdQuestion- The created survey question
 
 - 
setPictureprotected void setPicture(AbstractSurveyElement elmt, String valueAsStr) Set the picture- Parameters:
- elmt- The survey element
- valueAsStr- The value as String
 
 - 
getPictureInfoprotected Map<String,Object> getPictureInfo(AbstractSurveyElement elmt) Get the information about picture- Parameters:
- elmt- The survey element
- Returns:
- The picture
 
 
- 
 
-