public class Utils extends Object
Modifier and Type | Field and Description |
---|---|
static String |
CUSTOM_ATTRIBUTES_KEY |
static String |
CUSTOM_ENTITY_KEY |
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 org.apache.olingo.client.api.domain.ClientPrimitiveValue |
getPrimitiveValue(org.apache.olingo.client.api.domain.ClientObjectFactory objectFactory,
Object value) |
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) |
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 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)
public static org.apache.olingo.client.api.domain.ClientPrimitiveValue getPrimitiveValue(org.apache.olingo.client.api.domain.ClientObjectFactory objectFactory, Object value)
public 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–2017. All rights reserved.