public class MapiTypeConverter extends Object
Constructor and Description |
---|
MapiTypeConverter() |
Modifier and Type | Method and Description |
---|---|
static Object |
changeType(MapiPropertyType mapiType,
Object value)
Change value to a value of compatible type.
|
static String |
convertToString(MapiPropertyType mapiPropType,
Object value)
Converts a value to a string.
|
static List<Object> |
convertToValue(MapiPropertyType mapiPropType,
Iterator<String> strings)
Converts the string list to array.
|
static Object |
convertToValue(MapiPropertyType mapiPropType,
String stringValue)
Converts a string to value consistent with MAPI type.
|
static Map<MapiPropertyType,MapiTypeConverterMapEntry> |
getMapiTypeConverterMap()
Gets the MAPI type converter map.
|
static boolean |
isArrayType(MapiPropertyType mapiType)
Determines whether MapiPropertyType is an array type.
|
protected static Object |
parseMapiIntegerValue(String s)
Converts a MAPI Integer value.
|
public MapiTypeConverter()
public static List<Object> convertToValue(MapiPropertyType mapiPropType, Iterator<String> strings) throws Exception
mapiPropType
- Type of the MAPI property.strings
- the stringsException
- the exceptionpublic static Object convertToValue(MapiPropertyType mapiPropType, String stringValue) throws ServiceXmlDeserializationException, FormatException
mapiPropType
- the mapi prop typestringValue
- the string valueServiceXmlDeserializationException
- the service xml deserialization exceptionFormatException
- the format exceptionpublic static String convertToString(MapiPropertyType mapiPropType, Object value)
mapiPropType
- the mapi prop typevalue
- the valuepublic static Object changeType(MapiPropertyType mapiType, Object value) throws Exception
mapiType
- the mapi typevalue
- the valueException
- the exceptionprotected static Object parseMapiIntegerValue(String s)
s
- The string value.public static boolean isArrayType(MapiPropertyType mapiType)
mapiType
- the mapi typepublic static Map<MapiPropertyType,MapiTypeConverterMapEntry> getMapiTypeConverterMap()
Copyright © 2012–2015 Microsoft. All rights reserved.