public class Utils extends Object
Modifier and Type | Field and Description |
---|---|
static String |
CUSTOM_ATTRIBUTES_KEY |
static String |
CUSTOM_ENTITY_KEY |
static String |
DATE_FORMAT_YYYY_MM_DD |
static String |
DATETIME_FORMAT_YYYY_MM_DD_T_HH_MM_SS |
static String |
EDM_DATETIME_OFFSET_SUFFIX |
Modifier and Type | Method and Description |
---|---|
static <T> org.mule.common.bulk.BulkOperationResult<T> |
createBulkOperationResult(DynamicsBulkResult<T> dynamicsResult) |
static Map<String,String> |
getHeadersMap(org.apache.http.Header[] allHeaders) |
static <T> T |
getMappedObject(InputStream inputStream,
Class<T> response) |
static <T> T |
getMappedObject(String json,
Class<T> response) |
static String |
getStringFromInputStream(InputStream stream) |
static URI |
getURI(String stringURI)
This method also encodes the query parameters.
|
static UUID |
getUUID(String uuid) |
static void |
handleException(Exception e) |
static String |
parseEntityIdFromURI(String uri) |
static void |
populateEntity(org.apache.olingo.client.api.domain.ClientObjectFactory objectFactory,
List<org.apache.olingo.client.api.domain.ClientProperty> properties,
Map<String,Object> attributes)
Populate an Olingo entity properties from a Map.
|
static <T> T |
validateAttributes(Map<String,Object> entityDetails,
Class<T> clazz) |
static boolean |
validateBoundedAction(String boundedEntityType,
String boundedEntityId) |
static List<String> |
validateDeleteListForSingleTransaction(List<String> ids) |
static String |
validateEntityId(Map<String,Object> attributes) |
public static final String DATE_FORMAT_YYYY_MM_DD
public static final String DATETIME_FORMAT_YYYY_MM_DD_T_HH_MM_SS
public static final String EDM_DATETIME_OFFSET_SUFFIX
public static final String CUSTOM_ENTITY_KEY
public static final String CUSTOM_ATTRIBUTES_KEY
public static <T> org.mule.common.bulk.BulkOperationResult<T> createBulkOperationResult(DynamicsBulkResult<T> dynamicsResult)
public static String validateEntityId(Map<String,Object> attributes) throws DynamicsException
DynamicsException
public static <T> T validateAttributes(Map<String,Object> entityDetails, Class<T> clazz) throws DynamicsException
DynamicsException
public static UUID getUUID(String uuid) throws DynamicsException
DynamicsException
public static <T> T getMappedObject(String json, Class<T> response) throws DynamicsException
DynamicsException
public static <T> T getMappedObject(InputStream inputStream, Class<T> response) throws DynamicsException
DynamicsException
public static boolean validateBoundedAction(String boundedEntityType, String boundedEntityId) throws DynamicsException
DynamicsException
public static void handleException(Exception e) throws DynamicsException, org.mule.api.ConnectionException
DynamicsException
org.mule.api.ConnectionException
public static void populateEntity(org.apache.olingo.client.api.domain.ClientObjectFactory objectFactory, List<org.apache.olingo.client.api.domain.ClientProperty> properties, Map<String,Object> attributes)
objectFactory
- Factory of Olingo entities, properties and values.properties
- Target, List where the entity properties will be populatedattributes
- Source, Map of attributes to add to the entitypublic static List<String> validateDeleteListForSingleTransaction(List<String> ids)
public static String getStringFromInputStream(InputStream stream) throws DynamicsException
DynamicsException
public static URI getURI(String stringURI) throws DynamicsException
stringURI
- String representation of the URIDynamicsException
- when the String cannot be parsedCopyright © 2010–2020. All rights reserved.