public class Utils extends Object
| Constructor and Description |
|---|
Utils() |
| Modifier and Type | Method and Description |
|---|---|
static String |
asJSON(Object obj)
As JSON.
|
static String |
buildUrl(String protocol,
String hostname,
int port,
String path)
Build client URL using given parameters.
|
static ContextInfo |
getCurrentContext(String userId,
Locale locale)
Gets the current context.
|
static String |
getResourceMessage(String bundleName,
Locale locale,
String messageKey)
Gets the resource message.
|
static Map<String,String> |
getResourceMessages(String bundleName,
Locale locale)
Gets the resource messages.
|
static org.exoplatform.social.core.space.model.Space |
getSpaceByContext()
Gets the space by context.
|
static String |
getSpaceNameByContext()
Gets the space name by context.
|
static String |
spaceRoomName(String spacePrettyName)
Generate a space room name.
|
public static String spaceRoomName(String spacePrettyName)
spacePrettyName - the space pretty namepublic static org.exoplatform.social.core.space.model.Space getSpaceByContext()
public static String getSpaceNameByContext()
public static ContextInfo getCurrentContext(String userId, Locale locale)
userId - the user idlocale - the localepublic static Map<String,String> getResourceMessages(String bundleName, Locale locale)
bundleName - the bundle namelocale - the localepublic static String getResourceMessage(String bundleName, Locale locale, String messageKey)
bundleName - the bundle namelocale - the localemessageKey - the message keypublic static String asJSON(Object obj) throws org.exoplatform.ws.frameworks.json.impl.JsonException
obj - the objorg.exoplatform.ws.frameworks.json.impl.JsonException - the json exceptionpublic static String buildUrl(String protocol, String hostname, int port, String path) throws MalformedURLException
protocol - the schemehostname - the host nameport - the portpath - the pathMalformedURLException - if the protocol hasn't a handledCopyright © 2003–2018 eXo Platform SAS. All rights reserved.