Package com.carfey.ops.job.param
Interface ListProvider
-
- All Known Implementing Classes:
FileListProvider,StaticListProvider
public interface ListProviderWhen used withParameter.listProvider()andParameter.listArgs(), this interface allows you to define an implementation which will retrieve a list of values that are valid for a defined parameter. Valid values are enumerated in APIs and the web application job edit screen, and during updates and before execution, values are validated against the valid values.Implementations must have a publicly accessible no-argument constructor.
- Since:
- 3.3
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interfaceListProvider.DynamicListProvider
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.util.List<java.lang.String>getValidValues(java.util.List<java.lang.String> arguments, boolean beforeExecute)Return a list of valid values for this parameter.
-
-
-
Method Detail
-
getValidValues
java.util.List<java.lang.String> getValidValues(java.util.List<java.lang.String> arguments, boolean beforeExecute) throws java.lang.ExceptionReturn a list of valid values for this parameter.- Parameters:
arguments- values supplied inParameter.listArgs()(never null)beforeExecute- indicates if this check is happening right before the job is being executed. This allows implementations to only validate valid values at configuration time by returning null when beforeExecute is true. If you wish to enforce values at all times, simply ignore this flag.- Returns:
- a list of all valid values (includes empty lists), or null, which means any value may be configured
- Throws:
java.lang.Exception- if enumeration of valid values fails
-
-