Package net.shibboleth.shared.service.security.impl

# Class ServiceableAccessControlService

java.lang.Object
net.shibboleth.shared.component.AbstractInitializableComponent
net.shibboleth.shared.component.AbstractIdentifiedInitializableComponent
net.shibboleth.shared.component.AbstractIdentifiableInitializableComponent
net.shibboleth.shared.spring.service.AbstractServiceableComponent<AccessControlService>
net.shibboleth.shared.service.security.impl.ServiceableAccessControlService

All Implemented Interfaces:
  `AutoCloseable`, `Component`, `DestructableComponent`, `IdentifiableComponent`, `IdentifiedComponent`, `InitializableComponent`, `UnmodifiableComponent`, `AccessControlService`, `ServiceableComponent<AccessControlService>`, `Aware`, `ApplicationContextAware`

public class ServiceableAccessControlService extends AbstractServiceableComponent<AccessControlService> implements AccessControlService
This class wraps an `AccessControlService` in a `ServiceableComponent`.

## Field Summary

Fields
Modifier and Type
Field
Description
`private final AccessControlService`
`service`
The embedded service.

## Constructor Summary

Constructors
Constructor
Description
`ServiceableAccessControlService(AccessControlService svc)`
Constructor.

## Method Summary

Modifier and Type
Method
Description
`protected void`
`doInitialize()`
This method checks to ensure that the component ID is not null.
`AccessControlService`
`getComponent()`
Extract the component that does the actual work.
`AccessControl`
`getInstance(String name)`
Get an `AccessControl` instance matching a given name.

### Methods inherited from class net.shibboleth.shared.spring.service.AbstractServiceableComponent

`close, doDestroy, getApplicationContext, pinComponent, setApplicationContext, unloadComponent, unpinComponent`

### Methods inherited from class net.shibboleth.shared.component.AbstractIdentifiableInitializableComponent

`setId`

### Methods inherited from class net.shibboleth.shared.component.AbstractIdentifiedInitializableComponent

`ensureId, getId, ifDestroyedThrowDestroyedComponentException, ifInitializedThrowUnmodifiabledComponentException, ifNotInitializedThrowUninitializedComponentException`

### Methods inherited from class net.shibboleth.shared.component.AbstractInitializableComponent

`checkComponentActive, checkSetterPreconditions, destroy, initialize, isDestroyed, isInitialized`

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

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

### Methods inherited from interface net.shibboleth.shared.component.IdentifiedComponent

`getId`

### Methods inherited from interface net.shibboleth.shared.component.InitializableComponent

`initialize, isInitialized`

## Field Details

### service

@Nonnull private final AccessControlService service
The embedded service.

## Constructor Details

### ServiceableAccessControlService

public ServiceableAccessControlService(@Nonnull @ParameterName(name="svc") AccessControlService svc)
Constructor.

Parameters:
  `svc` - the embedded service

## Method Details

### doInitialize

protected void doInitialize() throws ComponentInitializationException
This method checks to ensure that the component ID is not null. Performs the initialization of the component. This method is executed within the lock on the object being initialized. The default implementation of this method is a no-op.

Overrides:
  `doInitialize` in class `AbstractServiceableComponent<AccessControlService>`
Throws:
  `ComponentInitializationException` - thrown if there is a problem initializing the component

### getInstance

@Nonnull public AccessControl getInstance(@Nonnull String name)
Get an `AccessControl` instance matching a given name.

In the absence of a matching instance, a default policy that denies access is returned.

Specified by:
  `getInstance` in interface `AccessControlService`
Parameters:
  `name` - policy name
Returns:
  the matching instance, or a default

### getComponent

@Nonnull public AccessControlService getComponent()
Extract the component that does the actual work. Callers MUST have the ServiceableComponent pinned at this stage.

Specified by:
  `getComponent` in interface `ServiceableComponent<AccessControlService>`
Specified by:
  `getComponent` in class `AbstractServiceableComponent<AccessControlService>`
Returns:
  the component.