Package org.ametys.odf.observation.skill
Class UpdateProgramSkillStep2Observer
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.UpdateProgramSkillStep2Observer
- All Implemented Interfaces:
Observer
,LogEnabled
,Prioritizable
,Supporter<Event>
,Contextualizable
,Serviceable
Observer to remove tranvsersal skills from children courses if they have been removed from the parent Program.
When the modified content is a Program, remove the tranvsersal macro skills, that got removed from the program, from the children courses
-
Field Summary
FieldsFields 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
Modifier and TypeMethodDescriptionprotected String
Get the supported event idvoid
Observes an event.void
service
(ServiceManager manager) protected boolean
supportsContent
(Content content) Check if the content is supportedMethods 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, supports
Methods inherited from class org.ametys.runtime.plugin.component.AbstractLogEnabled
getLogger, setLogger
-
Field Details
-
_odfHelper
The ODF helper
-
-
Constructor Details
-
UpdateProgramSkillStep2Observer
public UpdateProgramSkillStep2Observer()
-
-
Method Details
-
service
- Specified by:
service
in interfaceServiceable
- Overrides:
service
in classAbstractSkillsObserver
- Throws:
ServiceException
-
getSupportedEventId
Description copied from class:AbstractSkillsObserver
Get the supported event id- Specified by:
getSupportedEventId
in classAbstractSkillsObserver
- Returns:
- the event id
-
supportsContent
Description copied from class:AbstractSkillsObserver
Check if the content is supported- Overrides:
supportsContent
in classAbstractSkillsObserver
- Parameters:
content
- The content- Returns:
- a
Boolean
,true
if the content is supported,false
otherwise
-
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.
-