public class ClientUtils extends Object
| Modifier and Type | Method and Description |
|---|---|
static Login |
createStandardLoginObject(String username,
String passwrd)
Creates a Login Soap Request given the user credentials.
|
static String |
extractFromElement(String value,
Element el)
Auxiliary method for extracting information from DOM objects embedded in
SOAP responses
|
static String |
extractSimpleResponse(String responseString) |
static NameValueList |
generatePopulatedNameValueList(List<NameValue> namevalues)
Creates a NameValueList Soap Element given a List
|
static SelectFields |
generatePopulatedSelectFields(List<String> fieldnames)
Creates a SelectFields Soap Object given a List
|
static void |
logMarshalledObject(Object jibxObject)
This method marshals the contents of a JAXB Element and outputs the
results to the Logger.
|
static void |
logMarshalledObjectOsgi(PrintStream out,
Object jibxObject)
This method marshals the contents of a JAXB Element and outputs the
results to the Karaf output console.
|
static Map<String,String> |
mapFromElement(Element el)
Returns a Map containing SUgarCRM identifiers
|
static String |
md5(String value)
Encrypts a given String into a MD5 format.
|
static HashMap<String,HashMap<String,String>> |
responseFactory(String responseString) |
static String |
translateDsStatusDescription(String description)
Translates the description of a Dataset status to its stored value.
|
static String |
translateStatus(String sugarcrmStatusStr)
Translates the status code returned by SugarCRM into a human readable
form.
|
static String |
translateType(String provtype)
Translates the status code returned by SugarCRM into a human readable
form.
|
public static void logMarshalledObject(Object jibxObject)
jaxbObject - A JIBX representation of a SugarCRM SOAP Element.public static void logMarshalledObjectOsgi(PrintStream out, Object jibxObject)
out - the (Karaf console) printwriterjibxObject - public static String md5(String value)
value - The string to be encryptedpublic static Login createStandardLoginObject(String username, String passwrd)
username - passwrd - public static SelectFields generatePopulatedSelectFields(List<String> fieldnames)
fieldnames - public static NameValueList generatePopulatedNameValueList(List<NameValue> namevalues)
fieldnames - public static HashMap<String,HashMap<String,String>> responseFactory(String responseString) throws ParserConfigurationException, SAXException, IOException, XPathExpressionException
responseString - ParserConfigurationExceptionSAXExceptionIOExceptionXPathExpressionExceptionpublic static String extractSimpleResponse(String responseString)
responseString - public static String extractFromElement(String value, Element el)
value - The value to be extractedel - the DOM elementpublic static Map<String,String> mapFromElement(Element el)
el - public static String translateStatus(String sugarcrmStatusStr)
sugarcrmStatusStr - public static String translateDsStatusDescription(String description)
description - Copyright © 2015 Europeana Foundation. All rights reserved.