Package org.ametys.odf.observation.skill
Class AbstractSkillsStepObserver
java.lang.Object
org.ametys.runtime.plugin.component.AbstractLogEnabled
org.ametys.odf.observation.skill.AbstractSkillsObserver
org.ametys.odf.observation.skill.AbstractSkillsStepObserver
- All Implemented Interfaces:
Observer
,LogEnabled
,Prioritizable
,Supporter<Event>
,Contextualizable
,Serviceable
- Direct Known Subclasses:
UpdateContentSkillStep1Observer
,UpdateContentSkillStep2Observer
public abstract class AbstractSkillsStepObserver
extends AbstractSkillsObserver
implements Contextualizable
Abstract observer to prepare skills step observer when a content is updated
-
Field Summary
FieldsFields 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 <T> T
_getRequestAttribute
(String attributeName, Content content) Get request attribute for a contentprotected <T> void
_setRequestAttribute
(String attributeName, Content content, T value) Set a request attribute for a contentvoid
contextualize
(Context context) protected ContentValue[]
getSkillsToDelete
(ContentValue[] previousSkills, ContentValue[] currentSkills) Get the skills to deleteMethods inherited from class org.ametys.odf.observation.skill.AbstractSkillsObserver
_getSkills, getPriority, getSkillsAttributeName, getSupportedEventId, service, supports, supportsContent
Methods inherited from class org.ametys.runtime.plugin.component.AbstractLogEnabled
getLogger, setLogger
-
Field Details
-
_context
The context
-
-
Constructor Details
-
AbstractSkillsStepObserver
public AbstractSkillsStepObserver()
-
-
Method Details
-
contextualize
- Specified by:
contextualize
in interfaceContextualizable
- Throws:
ContextException
-
getSkillsToDelete
protected ContentValue[] getSkillsToDelete(ContentValue[] previousSkills, ContentValue[] currentSkills) Get the skills to delete- Parameters:
previousSkills
- The previous skillscurrentSkills
- The current skills- Returns:
- The skills to delete
-
_getRequestAttribute
Get request attribute for a content- Type Parameters:
T
- The type of results- Parameters:
attributeName
- The name of the attributecontent
- The content- Returns:
- The value found in request or default value
-
_setRequestAttribute
Set a request attribute for a content- Type Parameters:
T
- The type of the attribute- Parameters:
attributeName
- The name of the attributecontent
- The contentvalue
- The value
-