Package net.shibboleth.idp.installer.plugin.impl

# Class PluginState

java.lang.Object
net.shibboleth.shared.component.AbstractInitializableComponent
net.shibboleth.idp.installer.plugin.impl.PluginState

All Implemented Interfaces:
  `Component`, `DestructableComponent`, `InitializableComponent`

public class PluginState extends AbstractInitializableComponent
A class which will answer questions about a plugin state as of now (by querying the information Resources for the current published state).

## Field Summary

Fields
Modifier and Type
Field
Description
`private org.apache.hc.client5.http.classic.HttpClient`
`httpClient`
The HttpClient to use.
`private HttpClientSecurityParameters`
`httpClientSecurityParameters`
The Injected security parameters.
`private final org.slf4j.Logger`
`log`
Class logger.
`private InstallableComponentInfo`
`myPluginInfo`
My Plugin Info.
`private final InstallableComponentVersion`
`myPluginVersion`
The version of this plugin.
`private final IdPPlugin`
`plugin`
The plug in in question.
`private final List<URL>`
`updateOverrideURLs`
If overridden these are the urls to us for update (rather than what the plguin asks for.

## Constructor Summary

Constructors
Constructor
Description
`PluginState(IdPPlugin description, List<URL> updateOverrides)`
Constructor.

## Method Summary

Modifier and Type
Method
Description
`protected void`
`doInitialize()`
/**
`HttpClientSecurityParameters`
`getHttpClientSecurityParameters()`
Gets `HttpClient` security parameters, if any.
`InstallableComponentInfo`
`getPluginInfo()`
get our PluginInfo.
`private boolean`
`populate(Resource propertyResource)`
(try to) populate the information about this plugin.
`void`
`setHttpClient(org.apache.hc.client5.http.classic.HttpClient what)`
Set the client.
`void`
`setHttpClientSecurityParameters(HttpClientSecurityParameters params)`
Sets `HttpClient` security parameters to use.

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

`checkComponentActive, checkSetterPreconditions, destroy, doDestroy, ifDestroyedThrowDestroyedComponentException, ifInitializedThrowUnmodifiabledComponentException, ifNotInitializedThrowUninitializedComponentException, initialize, isDestroyed, isInitialized`

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

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

## Field Details

### plugin

@Nonnull private final IdPPlugin plugin
The plug in in question.

### myPluginInfo

@NonnullAfterInit private InstallableComponentInfo myPluginInfo
My Plugin Info.

### myPluginVersion

@Nonnull private final InstallableComponentVersion myPluginVersion
The version of this plugin.

### log

@Nonnull private final org.slf4j.Logger log
Class logger.

### httpClient

@NonnullAfterInit private org.apache.hc.client5.http.classic.HttpClient httpClient
The HttpClient to use.

### httpClientSecurityParameters

@Nullable private HttpClientSecurityParameters httpClientSecurityParameters
The Injected security parameters.

### updateOverrideURLs

@Nonnull private final List<URL> updateOverrideURLs
If overridden these are the urls to us for update (rather than what the plguin asks for.

## Constructor Details

### PluginState

public PluginState(@Nonnull IdPPlugin description, List<URL> updateOverrides)
Constructor.

Parameters:
  `description` - what we are talking about.
  `updateOverrides` - override for update locations. An empty list signifies no overrride.

## Method Details

### getPluginInfo

@Nonnull public InstallableComponentInfo getPluginInfo()
get our PluginInfo.

Returns:
  our PluginInfo.

### populate

private boolean populate(@Nonnull Resource propertyResource)
(try to) populate the information about this plugin.

Parameters:
  `propertyResource` - where to start looking
Returns:
  whether it worked

### setHttpClient

public void setHttpClient(@Nonnull org.apache.hc.client5.http.classic.HttpClient what)
Set the client.

Parameters:
  `what` - what to set.

### getHttpClientSecurityParameters

@Nullable public HttpClientSecurityParameters getHttpClientSecurityParameters()
Gets `HttpClient` security parameters, if any.

Returns:
  HTTP client security parameters to use

### setHttpClientSecurityParameters

public void setHttpClientSecurityParameters(@Nullable HttpClientSecurityParameters params)
Sets `HttpClient` security parameters to use.

Parameters:
  `params` - security parameters

### doInitialize

protected void doInitialize() throws ComponentInitializationException
/**

Overrides:
  `doInitialize` in class `AbstractInitializableComponent`
Throws:
  `ComponentInitializationException`