Package com.carfey.ops.api.embedded
Class SystemParameterManager
- java.lang.Object
-
- com.carfey.ops.api.embedded.AbstractAPIManager
-
- com.carfey.ops.api.embedded.SystemParameterManager
-
public class SystemParameterManager extends AbstractAPIManager
Class to manage system parameter settings using the Obsidian public embedded API. SeeAbstractAPIManagerfor details on how transactions are managed within all requests.Example:
SystemParameterListing listing = new SystemParameterManager().listParameters(); System.out.println("Parameters: " + listing);- Since:
- 3.0
- See Also:
- Embedded API Wiki, REST API Wiki
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.carfey.ops.api.embedded.AbstractAPIManager
AbstractAPIManager.ActionCallable
-
-
Constructor Summary
Constructors Constructor Description SystemParameterManager()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description SystemParametergetParameter(java.lang.String name)Describe the system parameter for the given name.SystemParameterListinglistParameters()List all system parameters and their values.SystemParameterupdateParameter(java.lang.String name, java.lang.String value, java.lang.String auditUser)Updates a given system parameter to the requested value.-
Methods inherited from class com.carfey.ops.api.embedded.AbstractAPIManager
addParameter, runApiTarget, validateRequired, withTransaction
-
-
-
-
Method Detail
-
listParameters
public SystemParameterListing listParameters() throws java.lang.Exception
List all system parameters and their values.- Returns:
- the
SystemParameterListingcontaining all existing system parameters - Throws:
java.lang.Exception- any type of unexpected exception.
-
getParameter
public SystemParameter getParameter(java.lang.String name) throws MissingEntityException, java.lang.Exception
Describe the system parameter for the given name.- Parameters:
name- parameter's name- Returns:
- the
SystemParametercorresponding to the supplied name. - Throws:
MissingEntityException- If the parameter with the requested name does not exist.java.lang.Exception- Any other type of unexpected exception.
-
updateParameter
public SystemParameter updateParameter(java.lang.String name, java.lang.String value, java.lang.String auditUser) throws MissingEntityException, ValidationException, java.lang.Exception
Updates a given system parameter to the requested value.- Parameters:
name- system parameter namevalue- value for the system parameter (value must have proper representation for type - e.g. true/false for Boolean, numeric values, etc.)auditUser- Optional user that is marked in audit columns. Defaults to "embeddedAPI".- Returns:
- the updated
SystemParameter - Throws:
MissingEntityException- If the parameter with the requested name does not exist.ValidationException- A validation error which prevents the action from succeeding.java.lang.Exception- Any other type of unexpected exception.
-
-