public class SetReadAccessOnSiteAddedObserver extends AbstractLogEnabled implements Observer, Serviceable
Observer
for observing site creation in order to assign the READER profile to anonymous or root contents and resources.Modifier and Type | Field and Description |
---|---|
private CurrentUserProvider |
_currentUserProvider |
private ObservationManager |
_observationManager |
protected ProfileAssignmentStorageExtensionPoint |
_profileAssignmentStorageEP
The right manager
|
private SiteTypesExtensionPoint |
_siteTypesEP |
MAX_PRIORITY, MIN_PRIORITY
Constructor and Description |
---|
SetReadAccessOnSiteAddedObserver() |
Modifier and Type | Method and Description |
---|---|
int |
getPriority(Event event)
Retrieves the priority to observe this event.
This can be used to process a supported event before others observers. |
void |
observe(Event event,
Map<String,Object> transientVars)
Observes an event.
|
void |
service(ServiceManager manager) |
boolean |
supports(Event event)
Checks if the event is supported.
|
enableLogging, getLogger, setupLogger, setupLogger, setupLogger
protected ProfileAssignmentStorageExtensionPoint _profileAssignmentStorageEP
private ObservationManager _observationManager
private CurrentUserProvider _currentUserProvider
private SiteTypesExtensionPoint _siteTypesEP
public SetReadAccessOnSiteAddedObserver()
public void service(ServiceManager manager) throws ServiceException
service
in interface Serviceable
ServiceException
public boolean supports(Event event)
Observer
public int getPriority(Event event)
Observer
getPriority
in interface Observer
event
- the event.public void observe(Event event, Map<String,Object> transientVars) throws Exception
Observer
observe
in interface Observer
event
- the event.transientVars
- transientVars passed from one Observer to another when processing a single Event.
This may allow optimizations between observers.Exception
- if an error occurs.
All exceptions will be logged but not propagated, as the observation mechanism should never fail.