Package org.ametys.runtime.parameter
Class ParameterHelper
java.lang.Object
org.ametys.runtime.parameter.ParameterHelper
Deprecated.
All of this helper methods are now in the new Parameter API classes
This class handles all needed to use typed parameters
- 
Nested Class SummaryNested Classes
- 
Method SummaryModifier and TypeMethodDescriptionstatic ObjectcastValue(String value, ParameterHelper.ParameterType type) Deprecated.Cast a untyped value (string) to an object of the typestatic DateTimeFormatterDeprecated.Get the ISO date-time formatter that formats or parses a date-time with an offset, such as '2011-12-03T10:15:30.000+01:00'.stringToType(String type) Deprecated.Convert a string containing a type to its valueDeprecated.Convert the parameter in a JSON mapstatic voidtoSAXEnumerator(ContentHandler handler, Enumerator enumerator) Deprecated.SAX parameter enumeratorstatic voidtoSAXParameter(ContentHandler handler, Parameter parameter, Object value) Deprecated.SAX a parameterstatic voidtoSAXParameterInternal(ContentHandler handler, Parameter parameter, Object value) Deprecated.SAX a parameter except the root tagstatic voidtoSAXValidator(ContentHandler handler, Validator validator) Deprecated.SAX parameter validatorstatic StringDeprecated.Return the readable name of a typestatic StringvalueToString(Object value) Deprecated.Converts known types to string
- 
Method Details- 
getISODateTimeFormatterDeprecated.Get the ISO date-time formatter that formats or parses a date-time with an offset, such as '2011-12-03T10:15:30.000+01:00'. This formatter is similar toDateTimeFormatter.ISO_OFFSET_DATE_TIMEbut force 3-digits milliseconds.- Returns:
- ISO date-time formatter
 
- 
typeToStringDeprecated.Return the readable name of a type- Parameters:
- type- Type to convert
- Returns:
- Returns the name of the type
- Throws:
- IllegalArgumentException- If the type is unknwon
 
- 
stringToTypeDeprecated.Convert a string containing a type to its value- Parameters:
- type- Name of the type
- Returns:
- Type
- Throws:
- IllegalArgumentException- if the type is unknown
 
- 
castValueDeprecated.Cast a untyped value (string) to an object of the type- Parameters:
- value- Value to cast
- type- Type to cast value in
- Returns:
- An object of the type 'type' with value 'value', or null if type is unknown or value cannot be cast
 
- 
valueToStringDeprecated.Converts known types to string- Parameters:
- value- Typed value
- Returns:
- String readable by the config bean
- Throws:
- IllegalArgumentException- if the object is a InputStream
 
- 
toSAXParameterpublic static void toSAXParameter(ContentHandler handler, Parameter parameter, Object value) throws SAXException, ProcessingException Deprecated.SAX a parameter- Parameters:
- handler- The content handler where to SAX
- parameter- The parameter to SAX
- value- The parameter value. Can be null.
- Throws:
- SAXException- If an error occurred while SAXing
- ProcessingException- If an error occurred
 
- 
toSAXParameterInternalpublic static void toSAXParameterInternal(ContentHandler handler, Parameter parameter, Object value) throws SAXException, ProcessingException Deprecated.SAX a parameter except the root tag- Parameters:
- handler- The content handler where to SAX
- parameter- The parameter to SAX
- value- The parameter value. Can be null.
- Throws:
- SAXException- If an error occurred while SAXing
- ProcessingException- If an error occurred
 
- 
toSAXEnumeratorpublic static void toSAXEnumerator(ContentHandler handler, Enumerator enumerator) throws SAXException, ProcessingException Deprecated.SAX parameter enumerator- Parameters:
- handler- The content handler where to SAX
- enumerator- The enumerator to SAX
- Throws:
- SAXException- If an error occurred to SAX
- ProcessingException- If an error occurred
 
- 
toSAXValidatorDeprecated.SAX parameter validator- Parameters:
- handler- The content handler where to SAX
- validator- The validator to SAX
- Throws:
- SAXException- If an error occurred while SAXing
 
- 
toJSONDeprecated.Convert the parameter in a JSON map- Parameters:
- parameter- The parameter to convert
- Returns:
- The Parameter as a map
- Throws:
- ProcessingException- If an error occurred when converting the parameter
 
 
-