Class InvalidateCacheOnDisplayedContentValidationObserver
java.lang.Object
org.ametys.runtime.plugin.component.AbstractLogEnabled
org.ametys.plugins.userdirectory.observation.InvalidateCacheOnDisplayedContentValidationObserver
- All Implemented Interfaces:
Observer,LogEnabled,Prioritizable,Supporter<Event>,Serviceable
public class InvalidateCacheOnDisplayedContentValidationObserver
extends AbstractLogEnabled
implements Observer, Serviceable
Observer for observing user content validation, for content that are displayed, in order to invalidate cache on front-office.-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected CacheInvalidationPolicyCache invalidation policyprotected ContentTypesHelperThe content types helperprotected AmetysObjectResolverThe Ametys object resolverFields inherited from interface org.ametys.core.observation.Observer
MAX_PRIORITY, MIN_PRIORITY -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription_getSitesWhereUserContentIsDisplayed(String contentId) Get the sites where the user is displayedintGet the priority for the component.voidObserves an event.voidservice(ServiceManager manager) booleanCheck if an element is supportedMethods inherited from class org.ametys.runtime.plugin.component.AbstractLogEnabled
getLogger, setLogger
-
Field Details
-
_cachePolicy
Cache invalidation policy -
_contentTypesHelper
The content types helper -
_resolver
The Ametys object resolver
-
-
Constructor Details
-
InvalidateCacheOnDisplayedContentValidationObserver
-
-
Method Details
-
service
- Specified by:
servicein interfaceServiceable- Throws:
ServiceException
-
supports
Description copied from interface:SupporterCheck if an element is supported -
_getSitesWhereUserContentIsDisplayed
Get the sites where the user is displayed- Parameters:
contentId- The Id of the user content- Returns:
- The list of sites
-
getPriority
Description copied from interface:PrioritizableGet the priority for the component. On components usingPrioritizableinterface, each implementation define the order. In most cases, less is the number, more prior is the component.- Specified by:
getPriorityin interfacePrioritizable- Returns:
- the priority
-
observe
Description copied from interface:ObserverObserves an event.
-