org.apache.sling.superimposing.impl

## Class SuperimposingManagerImpl

- java.lang.Object
- - org.apache.sling.superimposing.impl.SuperimposingManagerImpl

All Implemented Interfaces:
  javax.jcr.observation.EventListener, SuperimposingManager

    @Service(value=SuperimposingManager.class)
    public class SuperimposingManagerImpl
    extends Object
    implements SuperimposingManager, javax.jcr.observation.EventListener

Manages the resource registrations for the `SuperimposingResourceProviderImpl`. Provides read-only access to all registered providers.

### Constructor Summary

Constructors
Constructor and Description
`SuperimposingManagerImpl()`

### Method Summary

Methods
`protected void` `activate(org.osgi.service.component.ComponentContext ctx)`
`protected void` `deactivate(org.osgi.service.component.ComponentContext ctx)`
`Iterator<SuperimposingResourceProvider>` `getRegisteredProviders()`
`boolean` `isEnabled()`
`void` `onEvent(javax.jcr.observation.EventIterator events)` Handle resource events to add or remove superimposing registrations

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Constructor Detail

#### SuperimposingManagerImpl

    public SuperimposingManagerImpl()

### Method Detail

#### activate

    @Activate
    protected void activate(org.osgi.service.component.ComponentContext ctx)
                     throws org.apache.sling.api.resource.LoginException,
                            javax.jcr.RepositoryException

Throws:
  `org.apache.sling.api.resource.LoginException`
  `javax.jcr.RepositoryException`

#### deactivate

    @Deactivate
    protected void deactivate(org.osgi.service.component.ComponentContext ctx)
                       throws javax.jcr.RepositoryException

Throws:
  `javax.jcr.RepositoryException`

#### onEvent

    public void onEvent(javax.jcr.observation.EventIterator events)

Handle resource events to add or remove superimposing registrations

Specified by:
  `onEvent` in interface `javax.jcr.observation.EventListener`

#### isEnabled

    public boolean isEnabled()

Specified by:
  `isEnabled` in interface `SuperimposingManager`
Returns:
  true if superimposing mode is enabled

#### getRegisteredProviders

    public Iterator<SuperimposingResourceProvider> getRegisteredProviders()

Specified by:
  `getRegisteredProviders` in interface `SuperimposingManager`
Returns:
  Iterator with all superimposing resource providers currently registered. Iterator is backed by a `ConcurrentHashMap` and is safe to access even if superimposing resource providers are registered or unregistered at the same time.