Package org.ametys.odf.observation.skill
Class AbstractSkillsObserver
java.lang.Object
org.ametys.runtime.plugin.component.AbstractLogEnabled
org.ametys.odf.observation.skill.AbstractSkillsObserver
- All Implemented Interfaces:
Observer
,LogEnabled
,Prioritizable
,Supporter<Event>
,Serviceable
- Direct Known Subclasses:
AbstractSkillsStepObserver
,DeleteContentSkillObserver
public abstract class AbstractSkillsObserver
extends AbstractLogEnabled
implements Observer, Serviceable
Abstract observer to prepare skills observer when a content is updated
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected ContentDAO
The content daoprotected ContentTypesHelper
The content types helperFields inherited from interface org.ametys.core.observation.Observer
MAX_PRIORITY, MIN_PRIORITY
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected ContentValue[]
_getSkills
(Content content) Retrieve the skill from a contentint
Get the priority for the component.protected String
getSkillsAttributeName
(Content content) Get the skills attribute nameprotected abstract String
Get the supported event idvoid
service
(ServiceManager manager) boolean
Check if an element is supportedprotected boolean
supportsContent
(Content content) Check if the content is supportedMethods inherited from class org.ametys.runtime.plugin.component.AbstractLogEnabled
getLogger, setLogger
-
Field Details
-
_contentDAO
The content dao -
_contentTypesHelper
The content types helper
-
-
Constructor Details
-
AbstractSkillsObserver
public AbstractSkillsObserver()
-
-
Method Details
-
service
- Specified by:
service
in interfaceServiceable
- Throws:
ServiceException
-
getPriority
Description copied from interface:Prioritizable
Get the priority for the component. On components usingPrioritizable
interface, each implementation define the order. In most cases, less is the number, more prior is the component.- Specified by:
getPriority
in interfacePrioritizable
- Returns:
- the priority
-
supports
Description copied from interface:Supporter
Check if an element is supported -
getSupportedEventId
Get the supported event id- Returns:
- the event id
-
supportsContent
Check if the content is supported- Parameters:
content
- The content- Returns:
- a
Boolean
,true
if the content is supported,false
otherwise
-
_getSkills
Retrieve the skill from a content- Parameters:
content
- The content- Returns:
- The skills
-
getSkillsAttributeName
Get the skills attribute name- Parameters:
content
- The content- Returns:
- The attribute name for the skills
-