# Class TapServiceParams

java.lang.Object
uk.ac.starlink.ttools.task.TapServiceParams

public class TapServiceParams extends Object
Manages a collection of parameters used to generate a TapService.

Since:
  9 Aug 2016
Author:
  Mark Taylor

## Constructor Summary

Constructors
Constructor
Description
`TapServiceParams(String baseParamName, boolean readCapabilitiesDflt)`
Constructor.

## Method Summary

Modifier and Type
Method
Description
`uk.ac.starlink.task.Parameter<Boolean>`
`getAuthParameter()`
Note this is also included in `getInterfaceParameters()`
`uk.ac.starlink.task.URLParameter`
`getBaseParameter()`
Returns the parameter that supplies the base TAP service URL.
`List<uk.ac.starlink.task.Parameter<?>>`
`getInterfaceParameters()`
Returns the parameters used to select the TAP interface, including authentication options.
`List<uk.ac.starlink.task.URLParameter>`
`getOtherParameters()`
Returns a list of other parameters managed by this object that specify endpoints for TAP-related services.
`uk.ac.starlink.util.IOSupplier<uk.ac.starlink.vo.TapService>`
`getServiceSupplier(uk.ac.starlink.task.Environment env)`
Manages acquisition of a TapService instance from the environment using the parameters managed by this object.
`uk.ac.starlink.task.Parameter<String>`
`getTapInterfaceParameter()`
Note this is also included in `getInterfaceParameters()`

### Methods inherited from class Object

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

## Constructor Details

### TapServiceParams

public TapServiceParams(String baseParamName, boolean readCapabilitiesDflt)
Constructor.

Parameters:
  `baseParamName` - name of the parameter that specifies the base TAP URL
  `readCapabilitiesDflt` - if true, the default behaviour involves reading the service's capabilities document; if false, the default behaviour assumes standard endpoints

## Method Details

### getBaseParameter

public uk.ac.starlink.task.URLParameter getBaseParameter()
Returns the parameter that supplies the base TAP service URL.

Returns:
  service URL parameter

### getInterfaceParameters

public List<uk.ac.starlink.task.Parameter<?>> getInterfaceParameters()
Returns the parameters used to select the TAP interface, including authentication options.

Returns:
  TAP interface parameters

### getOtherParameters

public List<uk.ac.starlink.task.URLParameter> getOtherParameters()
Returns a list of other parameters managed by this object that specify endpoints for TAP-related services.

Returns:
  list of parameters excluding the service URL

### getAuthParameter

public uk.ac.starlink.task.Parameter<Boolean> getAuthParameter()
Note this is also included in `getInterfaceParameters()`

### getTapInterfaceParameter

public uk.ac.starlink.task.Parameter<String> getTapInterfaceParameter()
Note this is also included in `getInterfaceParameters()`

### getServiceSupplier

public uk.ac.starlink.util.IOSupplier<uk.ac.starlink.vo.TapService> getServiceSupplier(uk.ac.starlink.task.Environment env) throws uk.ac.starlink.task.TaskException
Manages acquisition of a TapService instance from the environment using the parameters managed by this object.

The idea is that all the environment interaction is done by this method, and all the service interaction is done when using the supplier's `get` method. This may not be perfectly true because of difficulties in arranging dynamic parameter defaulting based on contacting the service.

Parameters:
  `env` - execution environment
Returns:
  supplier for a TAP service description
Throws:
  `uk.ac.starlink.task.TaskException`