Package net.shibboleth.profile.module

# Class ModuleContext

java.lang.Object
net.shibboleth.profile.module.ModuleContext

public class ModuleContext extends Object
Information required to perform some module operations.

Since:
  9.0.0

## Nested Class Summary

Nested Classes
Modifier and Type
Class
Description
`static enum`
`ModuleContext.OperationType`
What is the caller doing?

## Field Summary

Fields
Modifier and Type
Field
Description
`private org.apache.hc.client5.http.classic.HttpClient`
`httpClient`
HttpClient if needed.
`private HttpClientSecurityParameters`
`httpClientSecurityParams`
HTTP security parameters.
`private String`
`installationHome`
Installation root.
`private List<Locale.LanguageRange>`
`languageRanges`
Language expressions to use for i18n.
`private PrintStream`
`messageStream`
Output stream for sending output to the module consumer.
`private ModuleContext.OperationType`
`operationType`
What are we doing in this case.
`private String`
`pluginId`
PluginId if there is one.

## Constructor Summary

Constructors
Constructor
Description
`ModuleContext(String home)`
Constructor.

## Method Summary

Modifier and Type
Method
Description
`org.apache.hc.client5.http.classic.HttpClient`
`getHttpClient()`
Gets an `HttpClient` instance to use if available.
`HttpClientSecurityParameters`
`getHttpClientSecurityParameters()`
Gets `HttpClient` security parameters, if any.
`String`
`getInstallLocation()`
Gets software installation location.
`List<Locale.LanguageRange>`
`getLanguageRanges()`
Gets the language ranges to use for i18n.
`PrintStream`
`getMessageStream()`
Gets the output stream to receive any instructions or additional information after performing operations.
`ModuleContext.OperationType`
`getOperationType()`
Getter for `operationType`.
`String`
`getPluginId()`
Getter for `pluginId`.
`void`
`setHttpClient(org.apache.hc.client5.http.classic.HttpClient client)`
Sets an `HttpClient` instance to use.
`void`
`setHttpClientSecurityParameters(HttpClientSecurityParameters params)`
Sets `HttpClient` security parameters to use.
`void`
`setLanguageRanges(List<Locale.LanguageRange> ranges)`
Sets the language ranges to use for i18n.
`void`
`setMessageStream(PrintStream stream)`
Sets the output stream to receive any instructions or additional information after performing operations.
`void`
`setOperationType(ModuleContext.OperationType type)`
Setter for `operationType`.
`void`
`setPluginId(String id)`
Setter for `pluginId`.

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

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

## Field Details

### installationHome

@Nonnull private String installationHome
Installation root.

### httpClient

@Nullable private org.apache.hc.client5.http.classic.HttpClient httpClient
HttpClient if needed.

### httpClientSecurityParams

@Nullable private HttpClientSecurityParameters httpClientSecurityParams
HTTP security parameters.

### languageRanges

@Nonnull private List<Locale.LanguageRange> languageRanges
Language expressions to use for i18n.

### messageStream

@Nullable private PrintStream messageStream
Output stream for sending output to the module consumer.

### pluginId

@Nullable private String pluginId
PluginId if there is one.

### operationType

@Nonnull private ModuleContext.OperationType operationType
What are we doing in this case.

## Constructor Details

### ModuleContext

public ModuleContext(@Nonnull @NotEmpty String home)
Constructor.

Parameters:
  `home` - location of IdP install

## Method Details

### getInstallLocation

@Nonnull @NotEmpty public String getInstallLocation()
Gets software installation location.

Returns:
  install path
Since:
  4.2.0

### getHttpClient

@Nullable public org.apache.hc.client5.http.classic.HttpClient getHttpClient()
Gets an `HttpClient` instance to use if available.

Returns:
  HTTP client instance

### setHttpClient

public void setHttpClient(@Nullable org.apache.hc.client5.http.classic.HttpClient client)
Sets an `HttpClient` instance to use.

Parameters:
  `client` - client to use

### 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

### getLanguageRanges

@Nonnull @Unmodifiable @NotLive public List<Locale.LanguageRange> getLanguageRanges()
Gets the language ranges to use for i18n.

Returns:
  language ranges

### setLanguageRanges

public void setLanguageRanges(@Nullable List<Locale.LanguageRange> ranges)
Sets the language ranges to use for i18n.

Parameters:
  `ranges` - language ranges

### getMessageStream

@Nullable public PrintStream getMessageStream()
Gets the output stream to receive any instructions or additional information after performing operations.

Returns:
  output stream, or null

### setMessageStream

public void setMessageStream(@Nullable PrintStream stream)
Sets the output stream to receive any instructions or additional information after performing operations.

Parameters:
  `stream` - output stream

### setPluginId

public void setPluginId(String id)
Setter for `pluginId`.

Parameters:
  `id` - what to set.

### getPluginId

@Nullable public String getPluginId()
Getter for `pluginId`.

Returns:
  Returns the pluginId.

### getOperationType

@Nullable public ModuleContext.OperationType getOperationType()
Getter for `operationType`.

Returns:
  Returns the current operation type.

### setOperationType

public void setOperationType(@Nonnull ModuleContext.OperationType type)
Setter for `operationType`.

Parameters:
  `type` - what we are about to do.