Package net.shibboleth.idp.installer.impl

# Class UpdateIdPCLI

java.lang.Object
net.shibboleth.shared.cli.AbstractCommandLine<T>
net.shibboleth.idp.cli.AbstractIdPHomeAwareCommandLine<UpdateIdPArguments>
net.shibboleth.idp.installer.impl.UpdateIdPCLI

public class UpdateIdPCLI extends AbstractIdPHomeAwareCommandLine<UpdateIdPArguments>
Command line update cheker.

## Nested Class Summary

## Nested classes/interfaces inherited from class net.shibboleth.shared.cli.AbstractCommandLine

`AbstractCommandLine.TerminalCodes`

## Field Summary

Fields
Modifier and Type
Field
Description
`private org.slf4j.Logger`
`log`
Logger.
`static final String`
`SHIBBOLETH_SIGNING_KEYS`
The place we publish our keys.

### Fields inherited from class net.shibboleth.shared.cli.AbstractCommandLine

`ARGS_PROPERTY, RC_INIT, RC_IO, RC_MODULE, RC_OK, RC_UNKNOWN`

## Constructor Summary

Constructors
Constructor
Description
`UpdateIdPCLI()`

## Method Summary

Modifier and Type
Method
Description
`private int`
`checkSignature(UpdateIdPArguments args, String fileName)`
Check the signature of the downloaded distribution.
`private int`
`checkUpdate(UpdateIdPArguments args, InstallableComponentInfo info, boolean doDownload)`
Check for a potential upgrade, then download if that was requested.
`protected int`
`doRun(UpdateIdPArguments args)`
`private int`
`download(UpdateIdPArguments args, InstallableComponentVersion version, InstallableComponentInfo info)`
Download the provided or inferred version.
`protected List<Resource>`
`getAdditionalSpringResources()`
`protected Class<UpdateIdPArguments>`
`getArgumentClass()`
`protected org.slf4j.Logger`
`getLogger()`
`protected String`
`getVersion()`
`private int`
`list(UpdateIdPArguments args, InstallableComponentInfo info)`
List all available versions.
`static void`
`main(String[] args)`
CLI entry point.
`static int`
`runMain(String[] args)`
Shim for CLI entry point: Allows the code to be run from a test.

### Methods inherited from class net.shibboleth.idp.cli.AbstractIdPHomeAwareCommandLine

`getHttpClient, getHttpClientSecurityParameters`

### Methods inherited from class net.shibboleth.shared.cli.AbstractCommandLine

`getApplicationContext, initLogging, run, setCaseSensitiveOptions, setContextInitializer`

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

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

## Field Details

### SHIBBOLETH_SIGNING_KEYS

@Nonnull public static final String SHIBBOLETH_SIGNING_KEYS
The place we publish our keys.

See Also:
  - Constant Field Values

### log

@Nullable private org.slf4j.Logger log
Logger.

## Constructor Details

### UpdateIdPCLI

public UpdateIdPCLI()

## Method Details

### getArgumentClass

@Nonnull protected Class<UpdateIdPArguments> getArgumentClass()

Specified by:
  `getArgumentClass` in class `AbstractCommandLine<UpdateIdPArguments>`

### getVersion

@Nonnull protected String getVersion()

Specified by:
  `getVersion` in class `AbstractCommandLine<UpdateIdPArguments>`

### getLogger

@Nonnull protected org.slf4j.Logger getLogger()

Specified by:
  `getLogger` in class `AbstractCommandLine<UpdateIdPArguments>`

### getAdditionalSpringResources

@Nonnull protected List<Resource> getAdditionalSpringResources()

Overrides:
  `getAdditionalSpringResources` in class `AbstractCommandLine<UpdateIdPArguments>`

### doRun

protected int doRun(@Nonnull UpdateIdPArguments args)

Overrides:
  `doRun` in class `AbstractIdPHomeAwareCommandLine<UpdateIdPArguments>`

### checkUpdate

private int checkUpdate(@Nonnull UpdateIdPArguments args, @Nonnull InstallableComponentInfo info, boolean doDownload)
Check for a potential upgrade, then download if that was requested.

Parameters:
  `args` - The command line
  `info` - information about the IdP update states, digested from "plugin.properties"
  `doDownload` - whether to download the distribution
Returns:
  a "return status"

### list

private int list(@Nonnull UpdateIdPArguments args, @Nonnull InstallableComponentInfo info)
List all available versions.

Parameters:
  `args` - The command line
  `info` - information about the IdP update states, digested from "plugin.properties"
Returns:
  a "return status"

### download

private int download(@Nonnull UpdateIdPArguments args, @Nonnull InstallableComponentVersion version, @Nonnull InstallableComponentInfo info)
Download the provided or inferred version.

Parameters:
  `args` - the command line
  `version` - the idp version to download
  `info` - version about all IdP release
Returns:
  a "return status"

### checkSignature

private int checkSignature(@Nonnull UpdateIdPArguments args, @Nonnull String fileName)
Check the signature of the downloaded distribution.

Parameters:
  `args` - the command line
  `fileName` - the name.
Returns:
  "status" from the operation

### runMain

public static int runMain(@Nonnull String[] args)
Shim for CLI entry point: Allows the code to be run from a test.

Parameters:
  `args` - arguments
Returns:
  one of the predefines `AbstractCommandLine.RC_INIT`, `AbstractCommandLine.RC_IO`, `AbstractCommandLine.RC_OK` or `AbstractCommandLine.RC_UNKNOWN`

### main

public static void main(@Nonnull String[] args)
CLI entry point.

Parameters:
  `args` - arguments