Package org.xwiki.properties.converter
Class AbstractCollectionConverter
- java.lang.Object
-
- org.xwiki.properties.converter.AbstractConverter
-
- org.xwiki.properties.converter.AbstractCollectionConverter
-
- All Implemented Interfaces:
Converter
@Deprecated public abstract class AbstractCollectionConverter extends AbstractConverter
Deprecated.Base class for allCollection
converters.- Since:
- 3.0M1
- Version:
- $Id: 1b11aae2fd6b31491be176b653cad7a45b1e148c $
-
-
Field Summary
Fields Modifier and Type Field Description protected static char
QUOTECHAR
Deprecated.Quote char.protected static String
QUOTESTRING
Deprecated.Quote string.
-
Constructor Summary
Constructors Constructor Description AbstractCollectionConverter()
Deprecated.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description protected String
convertToString(Object value)
Deprecated.protected Object
convertToType(Type targetType, Object value)
Deprecated.protected StreamTokenizer
createStreamTokenizer(String value)
Deprecated.Create and initializer aStreamTokenizer
to parse the value.ConverterManager
getConverterManager()
Deprecated.char
getDelimiter()
Deprecated.since 3.2M3 usegetDelimiters()
insteadString
getDelimiters()
Deprecated.protected Collection
newCollection()
Deprecated.protected Collection
parseElements(String value, Type genericType)
Deprecated.Parse an incoming String of the form similar to an array initializer in the Java language into aList
individual Strings for each element, according to the following rules.void
setAllowedChars(char[] allowedChars)
Deprecated.since 3.2M3 usesetDelimiters(String)
insteadvoid
setDelimiter(char delimiter)
Deprecated.since 3.2M3 usesetDelimiters(String)
insteadvoid
setDelimiters(String delimiter)
Deprecated.Set the delimiter to be used for parsing a delimited String.-
Methods inherited from class org.xwiki.properties.converter.AbstractConverter
convert, convertToType
-
-
-
-
Field Detail
-
QUOTECHAR
protected static final char QUOTECHAR
Deprecated.Quote char.- See Also:
- Constant Field Values
-
QUOTESTRING
protected static final String QUOTESTRING
Deprecated.Quote string.- See Also:
- Constant Field Values
-
-
Method Detail
-
getConverterManager
public ConverterManager getConverterManager()
Deprecated.- Returns:
- the converter manager.
-
setDelimiters
public void setDelimiters(String delimiter)
Deprecated.Set the delimiter to be used for parsing a delimited String.- Parameters:
delimiter
- The delimiter [default ", "] since 3.2M3
-
getDelimiters
public String getDelimiters()
Deprecated.- Returns:
- the delimiters
- Since:
- 3.2M3
-
convertToType
protected Object convertToType(Type targetType, Object value)
Deprecated.- Overrides:
convertToType
in classAbstractConverter
-
parseElements
protected Collection parseElements(String value, Type genericType)
Deprecated.Parse an incoming String of the form similar to an array initializer in the Java language into a
List
individual Strings for each element, according to the following rules.- The string is expected to be a comma-separated list of values.
- The string may optionally have matching '{' and '}' delimiters around the list.
- Whitespace before and after each element is stripped.
- Elements in the list may be delimited by single or double quotes. Within a quoted elements, the normal Java escape sequences are valid.
- Parameters:
value
- String value to be parsedgenericType
- the generic type- Returns:
- List of parsed elements.
- Throws:
ConversionException
- if the syntax ofvalue
is not syntactically validNullPointerException
- ifvalue
isnull
-
newCollection
protected Collection newCollection()
Deprecated.- Returns:
- the modifiable
Collection
to fill
-
createStreamTokenizer
protected StreamTokenizer createStreamTokenizer(String value)
Deprecated.Create and initializer aStreamTokenizer
to parse the value.- Parameters:
value
- the string to parse- Returns:
- the
StreamTokenizer
used to parse the string
-
convertToString
protected String convertToString(Object value)
Deprecated.- Overrides:
convertToString
in classAbstractConverter
-
getDelimiter
@Deprecated public char getDelimiter()
Deprecated.since 3.2M3 usegetDelimiters()
instead- Returns:
- the delimiter
-
setAllowedChars
@Deprecated public void setAllowedChars(char[] allowedChars)
Deprecated.since 3.2M3 usesetDelimiters(String)
instead- Parameters:
allowedChars
- allowed characters
-
setDelimiter
@Deprecated public void setDelimiter(char delimiter)
Deprecated.since 3.2M3 usesetDelimiters(String)
instead- Parameters:
delimiter
- the delimiter
-
-