public class TAPDestructionTimeController extends java.lang.Object implements InputParamController
Let controlling the destruction time of all jobs managed by a TAP service. The maximum and default values are provided by the service connection.
Note: By default, the destruction time can be modified by anyone without any limitation. There is no default value (that means jobs may stay forever).
The logic of the destruction time is set in this class. Here it is:
Modifier and Type | Field and Description |
---|---|
protected boolean |
allowModification
Indicates whether the execution duration of jobs can be modified.
|
protected ServiceConnection |
service
Connection to the service which knows the maximum and default value of this parameter.
|
Constructor and Description |
---|
TAPDestructionTimeController(ServiceConnection service)
Build a controller for the Destruction parameter.
|
Modifier and Type | Method and Description |
---|---|
boolean |
allowModification()
Tells whether the controlled parameter may be modified after initialization.
|
void |
allowModification(boolean allowModif)
Let indicate whether the destruction time of any managed job can be modified.
|
java.lang.Object |
check(java.lang.Object value)
Checks the value of the controlled parameter and builds a new object from this value.
|
java.lang.Object |
getDefault()
Returns the default value of the controlled parameter.
|
int |
getDefaultRetentionPeriod()
Get the default period during which a job is kept.
|
java.util.Date |
getMaxDestructionTime()
Gets the maximum destruction time: either computed with an interval of time or obtained directly by a maximum destruction time.
|
int |
getMaxRetentionPeriod()
Get the maximum period during which a job is kept.
|
protected final ServiceConnection service
protected boolean allowModification
public TAPDestructionTimeController(ServiceConnection service)
service
- Connection to the TAP service.public final boolean allowModification()
InputParamController
allowModification
in interface InputParamController
public final void allowModification(boolean allowModif)
allowModif
- true if the destruction time can be modified, false otherwise.public final int getDefaultRetentionPeriod()
public final java.lang.Object getDefault()
InputParamController
getDefault
in interface InputParamController
public final int getMaxRetentionPeriod()
public final java.util.Date getMaxDestructionTime()
public java.lang.Object check(java.lang.Object value) throws UWSException
InputParamController
Checks the value of the controlled parameter and builds a new object from this value.
check
in interface InputParamController
value
- Parameter value to check.UWSException
- If the given value is strongly incorrect.