Class UpdateThematicRulesStep2Observer
java.lang.Object
org.ametys.runtime.plugin.component.AbstractLogEnabled
org.ametys.plugins.odfpilotage.rule.observations.AbstractRulesStepObserver
org.ametys.plugins.odfpilotage.rule.observations.AbstractThematicRulesObserver
org.ametys.plugins.odfpilotage.rule.observations.UpdateThematicRulesStep2Observer
- All Implemented Interfaces:
Observer
,LogEnabled
,Contextualizable
,Serviceable
Observer to remove derogation and additional rule if the thematic is modified.
-
Field Summary
Fields inherited from class org.ametys.plugins.odfpilotage.rule.observations.AbstractThematicRulesObserver
_contentTypesHelper, _resolver
Fields inherited from class org.ametys.plugins.odfpilotage.rule.observations.AbstractRulesStepObserver
_context, _pilotageHelper, _rulesManager
Fields inherited from interface org.ametys.core.observation.Observer
MAX_PRIORITY, MIN_PRIORITY
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptiongetRulePositionsToDelete
(ModifiableContent content, String catalog, String thematicCode, List<? extends ModifiableIndexableRepeaterEntry> ruleEntries) Get the position of rule to delete by containerprotected String
Get the supported event idvoid
service
(ServiceManager manager) Methods inherited from class org.ametys.plugins.odfpilotage.rule.observations.AbstractThematicRulesObserver
_getContainerRulePositions, observe, supportsContent
Methods inherited from class org.ametys.plugins.odfpilotage.rule.observations.AbstractRulesStepObserver
_addOldChildContainers, _addOldDegreeIds, _addOldModifiedRuleCodes, _addOldNbSessions, _addOldRegimeIds, _getChildContainerOfTypeYear, _getOldChildContainers, _getOldDegreeIds, _getOldModifiedRuleCodes, _getOldNumberOfSessions, _getOldRegimeIds, contextualize, getPriority, supports
Methods inherited from class org.ametys.runtime.plugin.component.AbstractLogEnabled
getLogger, setLogger
-
Field Details
-
_thematicsHelper
The thematics helper
-
-
Constructor Details
-
UpdateThematicRulesStep2Observer
public UpdateThematicRulesStep2Observer()
-
-
Method Details
-
service
- Specified by:
service
in interfaceServiceable
- Overrides:
service
in classAbstractThematicRulesObserver
- Throws:
ServiceException
-
getSupportedEventId
Description copied from class:AbstractRulesStepObserver
Get the supported event id- Specified by:
getSupportedEventId
in classAbstractRulesStepObserver
- Returns:
- the event id
-
getRulePositionsToDelete
protected Map<Container,Set<Integer>> getRulePositionsToDelete(ModifiableContent content, String catalog, String thematicCode, List<? extends ModifiableIndexableRepeaterEntry> ruleEntries) throws javax.jcr.RepositoryException Description copied from class:AbstractThematicRulesObserver
Get the position of rule to delete by container- Specified by:
getRulePositionsToDelete
in classAbstractThematicRulesObserver
- Parameters:
content
- the thematic contentcatalog
- the catalogthematicCode
- the thematic coderuleEntries
- the rule entries- Returns:
- the rule to delete by container
- Throws:
javax.jcr.RepositoryException
- if an error occurred
-