Package org.ametys.odf.observation.skill
Class UpdateContentSkillStep2Observer
java.lang.Object
org.ametys.runtime.plugin.component.AbstractLogEnabled
org.ametys.odf.observation.skill.AbstractSkillsObserver
org.ametys.odf.observation.skill.AbstractSkillsStepObserver
org.ametys.odf.observation.skill.UpdateContentSkillStep2Observer
- All Implemented Interfaces:
Observer
,LogEnabled
,Prioritizable
,Supporter<Event>
,Contextualizable
,Serviceable
Observer to delete skills that became orphans after being unlinked from their parent.
We compute the skills to delete by comparing the previous skills with the current ones.
When the modified content is a Program, delete the linked macro skills that became orphans
The deletion of macro skills will trigger the deletion of its micro skills
When the modified content is a Macro skill, delete the linked micro skills that became orphans
-
Field Summary
Fields inherited from class org.ametys.odf.observation.skill.AbstractSkillsStepObserver
_context
Fields inherited from class org.ametys.odf.observation.skill.AbstractSkillsObserver
_contentDAO, _contentTypesHelper
Fields inherited from interface org.ametys.core.observation.Observer
MAX_PRIORITY, MIN_PRIORITY
-
Constructor Summary
Constructors -
Method Summary
Methods inherited from class org.ametys.odf.observation.skill.AbstractSkillsStepObserver
_getRequestAttribute, _setRequestAttribute, contextualize, getSkillsToDelete
Methods inherited from class org.ametys.odf.observation.skill.AbstractSkillsObserver
_getSkills, getPriority, getSkillsAttributeName, service, supports, supportsContent
Methods inherited from class org.ametys.runtime.plugin.component.AbstractLogEnabled
getLogger, setLogger
-
Constructor Details
-
UpdateContentSkillStep2Observer
public UpdateContentSkillStep2Observer()
-
-
Method Details
-
getSupportedEventId
Description copied from class:AbstractSkillsObserver
Get the supported event id- Specified by:
getSupportedEventId
in classAbstractSkillsObserver
- Returns:
- the event id
-
observe
Description copied from interface:Observer
Observes an event.- Parameters:
event
- the event.transientVars
- transientVars passed from one Observer to another when processing a single Event. This may allow optimizations between observers.- Throws:
Exception
- if an error occurs. All exceptions will be logged but not propagated, as the observation mechanism should never fail.
-