ParameterRepositoryService

Name ParameterRepository
Version
Included Services  
Java Package org.kuali.rice.coreservice.api.parameter

Service for interacting with {@link Parameter Parameters}.

Operations
Main Message Structures

Method createParameter
Description This will create a {@link Parameter} exactly like the parameter passed in.
Parameters Parameter parameter the parameter to create
Return Parameter the parameter that was created
Errors RiceIllegalArgumentException if the parameter is null
RiceIllegalStateException if the parameter is already existing in the system

Back to Operations

Method updateParameter
Description This will update a {@link Parameter}.


If the parameter does not exist under the application
code passed, then this method will check if the parameter
exists under the default rice application id and
will update that parameter.

Parameters Parameter parameter the parameter to update
Return Parameter the parameter that was updated
Errors RiceIllegalArgumentException if the parameter is null
RiceIllegalStateException if the parameter does not exist in the system under the
specific application id or default rice application id

Back to Operations

Method getParameter
Description Gets a {@link Parameter} from a {@link ParameterKey}.


If the parameter does not exist under the application
code passed, then this method will check if the parameter
exists under the default rice application id and
will return that parameter.




This method will return null if the parameter does not exist.

Parameters ParameterKey key the key to retrieve the parameter by. cannot be null.
Return Parameter a {@link Parameter} or null
Errors RiceIllegalArgumentException if the key is null

Back to Operations

Method getParameterValueAsString
Description Gets a {@link ParameterContract#getValue()} from a {@link ParameterKey}.


If the parameter does not exist under the application
code passed, then this method will check if the parameter
exists under the default rice application id and
will return that parameter.




This method will return null if the parameter does not exist.

Parameters ParameterKey key the key to retrieve the parameter by. cannot be null.
Return String a string value or null
Errors RiceIllegalArgumentException if the key is null

Back to Operations

Method getParameterValueAsBoolean
Description Gets a {@link ParameterContract#getValue()} as a Boolean from a {@link ParameterKey}.


If the parameter does not exist under the application
code passed, then this method will check if the parameter
exists under the default rice application id and
will return that parameter.




This method will return null if the parameter does not exist or is not a valid truth value.



valid true values (case insensitive):

  • Y

  • true

  • on

  • 1

  • t

  • enabled



valid false values (case insensitive):

  • N

  • false

  • off

  • 0

  • f

  • disabled

Parameters ParameterKey key the key to retrieve the parameter by. cannot be null.
Return Boolean a boolean value or null
Errors RiceIllegalArgumentException if the key is null

Back to Operations

Method getParameterValuesAsString
Description Gets a {@link ParameterContract#getValue()} from a {@link ParameterKey}
where the value is split on a semi-colon delimeter and each token is trimmed
of white space.

for example: param_name=foo; bar; baz

will yield a collection containing foo, bar, baz


If the parameter does not exist under the application
code passed, then this method will check if the parameter
exists under the default rice application id and
will return that parameter.




This method will always return an immutable Collection
even when no values exist.

Parameters ParameterKey key the key to retrieve the parameter by. cannot be null.
Return StringList an immutable collection of strings
Errors RiceIllegalArgumentException if the key is null

Back to Operations

Method getSubParameterValueAsString
Description Gets a {@link ParameterContract#getValue()} from a {@link ParameterKey}
where the value is split on a semi-colon delimeter and each token is trimmed
of white space. Those values are themselves keyvalue pairs which are searched
for the sub parameter name.

for example:

param_name=foo=f1; bar=b1; baz=z1
subParameterName=bar

will yield b1

if multiple subparameters are contained in the parameter value the first one is returned




If the parameter does not exist under the application
code passed, then this method will check if the parameter
exists under the default rice application id and
will return that parameter.




This method will always return null when the subparameter does not
exist or if the parameter value does not conform to the following format(s):


  1. subparameter_name=subparameter_value;


Parameters ParameterKey key the key to retrieve the parameter by. cannot be null.
String subParameterName the sub parameter to search for
Return String a string value or null
Errors RiceIllegalArgumentException if the key is null or if the subParameterName is blank

Back to Operations

Method getSubParameterValuesAsString
Description Gets a {@link ParameterContract#getValue()} from a {@link ParameterKey}
where the value is split on a semi-colon delimeter and each token is trimmed
of white space. Those values are themselves keyvalue pairs which are searched
for the sub parameter name. After the sub parameter is found it is split on a comma
and trimmed or whitespace before adding it to the final collection for return.

for example:

param_name=foo=f1,f2,f3; bar=b1,b2; baz=z1
subParameterName=bar

will yield a collection containing b1, b2

if multiple subparameters are contained in the parameter value the first one is returned




If the parameter does not exist under the application
code passed, then this method will check if the parameter
exists under the default rice application id and
will return that parameter.




This method will always return an immutable Collection
even when no values exist.




This method will always return an empty immutable Collection when
the subparameter does not exist or if the parameter value does not
conform to the following format(s):


  1. subparameter_name=subparameter_value;

  2. subparameter_name=subparameter_value1, subparameter_value2;

  3. subparameter_name=subparameter_value1, subparameter_value2,;


Parameters ParameterKey key the key to retrieve the parameter by. cannot be null.
String subParameterName the sub parameter to search for
Return StringList an immutable collection of strings
Errors RiceIllegalArgumentException if the key is null or if the subParameterName is blank

Back to Operations

Method findParameters
Description ???
Parameters QueryByCriteria queryByCriteria ???
Return ParameterQueryResults ???
Errors RiceIllegalArgumentException ???

Back to Operations