public class RequestListParser extends Object
Constructor and Description |
---|
RequestListParser() |
Modifier and Type | Method and Description |
---|---|
static <T extends Enum<?>> |
convertToEnumList(Class<T> clazz,
List<String> strList)
Parses a String list to a enum list
|
static AttachmentResource[] |
getArrayAttachmentResource(List<String> strList)
Parses a AttachmentResource list to a AttachmentResource array.
|
static Boolean[] |
getArrayBoolean(List<String> strList,
String key)
Parses a String list to a Boolean array.
|
static Byte[] |
getArrayByte(List<String> strList,
String key)
Parses a String list to a Byte array.
|
static Date[] |
getArrayDate(List<String> strList,
String key)
Parses a String list to a Date array.
|
static Double[] |
getArrayDouble(List<String> strList,
String key)
Parses a String list to a Double array.
|
static Integer[] |
getArrayInteger(List<String> strList,
String key)
Parses a String list to a Integer array.
|
static Long[] |
getArrayLong(List<String> strList,
String key)
Parses a String list to a Long array.
|
static NoteResource[] |
getArrayNoteResource(List<String> strList)
Parses a NoteResource list to a NoteResource array.
|
static String[] |
getArrayString(List<String> strList,
String key)
Parses a String list to a String array.
|
static TagResource[] |
getArrayTagResource(List<String> strList)
Parses a TagResource list to a TagResource array.
|
static TagStoreTagListResource[] |
getArrayTagStoreTagListResource(List<String> strList)
Parses a TagStoreTagListResource list to a TagStoreTagListResource array.
|
static TagSuggestionListResource[] |
getArrayTagSuggestionListResource(List<String> strList)
Parses a TagSuggestionListResource list to a TagSuggestionListResource array.
|
static TimelineNoteResource[] |
getArrayTimelineNoteResource(List<String> strList)
Parses a TimelineNoteResource list to a TimelineNoteResource array.
|
static TimelineTagResource[] |
getArrayTimelineTagResource(List<String> strList)
Parses a TimelineTagResource list to a TimelineTagResource array.
|
static TimelineTopicResource[] |
getArrayTimelineTopicResource(List<String> strList)
Parses a TimelineTopicResource list to a TimelineTopicResource array.
|
static TimelineUserResource[] |
getArrayTimelineUserResource(List<String> strList)
Parses a TimelineUserResource list to a TimelineUserResource array.
|
static TopicResource[] |
getArrayTopicResource(List<String> strList)
Parses a TopicResource list to a TopicResource array.
|
static UserResource[] |
getArrayUserResource(List<String> strList)
Parses a UserResource list to a UserResource array.
|
static Boolean |
getBoolean(String value)
Converts a string value to a Boolean.
|
static Boolean |
getBoolean(String value,
Boolean fallback)
Converts a string value to a Boolean.
|
static Byte |
getByte(String value)
Converts a string value to a Byte.
|
static Date |
getDate(String value)
Converts a string value to a Date.
|
static Double |
getDouble(String value)
Converts a string value to a Double.
|
static Integer |
getInteger(String value)
Converts a string value to a Integer.
|
static Long |
getLong(String value)
Converts a string value to a Long.
|
static String |
getString(String value)
Passed through a string.
|
public static Date[] getArrayDate(List<String> strList, String key) throws RestApiIllegalRequestParameterException
strList
- - List with stringsRestApiIllegalRequestParameterException
public static Byte[] getArrayByte(List<String> strList, String key) throws RestApiIllegalRequestParameterException
strList
- - List with stringsRestApiIllegalRequestParameterException
public static Double[] getArrayDouble(List<String> strList, String key) throws RestApiIllegalRequestParameterException
strList
- - List with stringsRestApiIllegalRequestParameterException
public static Boolean[] getArrayBoolean(List<String> strList, String key) throws RestApiIllegalRequestParameterException
strList
- - List with stringsRestApiIllegalRequestParameterException
public static Integer[] getArrayInteger(List<String> strList, String key) throws RestApiIllegalRequestParameterException
strList
- - List with stringsRestApiIllegalRequestParameterException
public static Long[] getArrayLong(List<String> strList, String key) throws RestApiIllegalRequestParameterException
strList
- - List with stringsRestApiIllegalRequestParameterException
public static TopicResource[] getArrayTopicResource(List<String> strList)
value
- - List with stringspublic static UserResource[] getArrayUserResource(List<String> strList)
value
- - List with stringspublic static NoteResource[] getArrayNoteResource(List<String> strList)
value
- - List with stringspublic static AttachmentResource[] getArrayAttachmentResource(List<String> strList)
value
- - List with stringspublic static TimelineUserResource[] getArrayTimelineUserResource(List<String> strList)
value
- - List with stringspublic static TimelineTopicResource[] getArrayTimelineTopicResource(List<String> strList)
value
- - List with stringspublic static TimelineTagResource[] getArrayTimelineTagResource(List<String> strList)
value
- - List with stringspublic static TimelineNoteResource[] getArrayTimelineNoteResource(List<String> strList)
value
- - List with stringspublic static TagResource[] getArrayTagResource(List<String> strList)
value
- - List with stringspublic static TagStoreTagListResource[] getArrayTagStoreTagListResource(List<String> strList)
value
- - List with stringspublic static TagSuggestionListResource[] getArrayTagSuggestionListResource(List<String> strList)
value
- - List with stringspublic static <T extends Enum<?>> List<T> convertToEnumList(Class<T> clazz, List<String> strList)
clazz
- - Class of the TypestrList
- - List of Stringspublic static String[] getArrayString(List<String> strList, String key)
value
- - List with stringspublic static Long getLong(String value)
value
- - string value to convertpublic static Double getDouble(String value)
value
- - string value to convertpublic static Boolean getBoolean(String value)
value
- - string value to convertpublic static Boolean getBoolean(String value, Boolean fallback)
value
- - string value to convertfallback
- - the fallback if value is nullpublic static Date getDate(String value)
value
- - string value to convertpublic static Integer getInteger(String value)
value
- - string value to convertpublic static String getString(String value)
value
- - string value to pass throughCopyright © 2019 Communote team. All rights reserved.