Package com.opencloud.slee.rest.common
Class ApiConfiguration
- java.lang.Object
 - 
- com.opencloud.slee.rest.common.ApiConfiguration
 
 
- 
public final class ApiConfiguration extends java.lang.ObjectThe configuration to be used with a generated REST API. 
- 
- 
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ApiConfigurationbaseConfiguration()Create an ApiConfiguration suitable for custom/hand-written APIs.<T> Tget(ApiOption<T> option)Get the value of an option<T> booleanisSet(ApiOption<T> option)Check if an option has an associated value<T> voidset(ApiOption<T> option, T newValue)Set the value of an optionstatic ApiConfigurationstandardConfiguration()Create an ApiConfiguration suitable for generated APIs.java.lang.StringtoString()VerifyResultverify()Verify that all options, that have been set, have valid values.ApiConfigurationwithOption(ApiOption<?> option)Add a new option to the configuration (for custom API implementations). 
 - 
 
- 
- 
Method Detail
- 
standardConfiguration
public static ApiConfiguration standardConfiguration()
Create an ApiConfiguration suitable for generated APIs.- Returns:
 - an ApiConfiguration with additional properties to the base configuration
 
 
- 
baseConfiguration
public static ApiConfiguration baseConfiguration()
Create an ApiConfiguration suitable for custom/hand-written APIs. Populates the configuration with the minimum set of required options- Returns:
 - an ApiConfiguration with standard properties
 
 
- 
withOption
public ApiConfiguration withOption(ApiOption<?> option)
Add a new option to the configuration (for custom API implementations).- Parameters:
 option- the option to add- Returns:
 - the ApiConfiguration with the addition of a new option
 
 
- 
verify
public VerifyResult verify()
Verify that all options, that have been set, have valid values.- Returns:
 - A VerifyResult that represents the outcome of verifying all options that have been set.
 
 
- 
get
public <T> T get(ApiOption<T> option)
Get the value of an option- Type Parameters:
 T- the type of the option- Parameters:
 option- the option to fetch- Returns:
 - the associated option value
 
 
- 
set
public <T> void set(ApiOption<T> option, T newValue)
Set the value of an option- Type Parameters:
 T- the type of the option- Parameters:
 option- the option to setnewValue- the new option value
 
- 
isSet
public <T> boolean isSet(ApiOption<T> option)
Check if an option has an associated value- Type Parameters:
 T- the type of the option- Parameters:
 option- the option to check- Returns:
 - true iff there is a value associated with an option
 
 
- 
toString
public java.lang.String toString()
- Overrides:
 toStringin classjava.lang.Object
 
 - 
 
 -