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:
AbstractContentSkillStep1Observer,DeleteContentSkillStep2Observer,UpdateContentSkillStep2Observer,UpdateProgramSkillStep1Observer,UpdateProgramSkillStep2Observer
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, _contentTypesHelperFields 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, String contentId) Get request attribute for a contentprotected <T> void_setRequestAttribute(String attributeName, String contentId, T value) Set a request attribute for a contentvoidcontextualize(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, supportsContentMethods 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:
contextualizein 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 attributecontentId- The content identifier- 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 attributecontentId- The content identifiervalue- The value
-