|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.fcrepo.server.journal.helpers.ParameterHelper
public class ParameterHelper
A collection of utility methods to help the Journal classes to read parameter values.
| Field Summary |
|---|
| Method Summary | |
|---|---|
static boolean |
getOptionalBooleanParameter(Map<String,String> parameters,
String parameterName,
boolean defaultValue)
Get an optional boolean parameter. |
static String |
getOptionalStringParameter(Map<String,String> parameters,
String parameterName,
String defaultValue)
Get an optional String parameter, If not found, use the default value. |
static long |
parseParametersForAgeLimit(Map<String,String> parameters)
Get the age limit parameter (or let it default), and convert it to milliseconds. |
static String |
parseParametersForFilenamePrefix(Map<String,String> parameters)
Look for a string to use as a prefix for the names of the journal files. |
static long |
parseParametersForSizeLimit(Map<String,String> parameters)
Get the size limit parameter (or let it default), and convert it to bytes. |
static File |
parseParametersForWritableDirectory(Map<String,String> parameters,
String parameterName)
Look in the parameters for the path to a writable directory. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static String getOptionalStringParameter(Map<String,String> parameters,
String parameterName,
String defaultValue)
NullPointerException - if either 'parameters' or 'parameterName' is null.
public static boolean getOptionalBooleanParameter(Map<String,String> parameters,
String parameterName,
boolean defaultValue)
throws JournalException
JournalException - if a value is supplied that is neither "true" nor "false".
NullPointerException - if either 'parameters' or 'parameterName' is null.
public static File parseParametersForWritableDirectory(Map<String,String> parameters,
String parameterName)
throws JournalException
JournalExceptionpublic static String parseParametersForFilenamePrefix(Map<String,String> parameters)
public static long parseParametersForSizeLimit(Map<String,String> parameters)
throws JournalException
JournalException
public static long parseParametersForAgeLimit(Map<String,String> parameters)
throws JournalException
JournalException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||