Class Utils
java.lang.Object
org.exoplatform.webconferencing.Utils
Created by The eXo Platform SAS.
- Version:
- $Id: Utils.java 00000 Mar 30, 2017 pnedonosko $
- Author:
- Peter Nedonosko
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic StringFormat specified object to JSON string.static StringBuild client URL using given parameters.static StringformatISODate(Date date) Format date as ISO-8601 string with UTC time zone.static ContextInfogetCurrentContext(String userId, String spaceId, Locale locale) Gets the current context.static ContextInfogetCurrentContext(String userId, Locale locale) Gets the current context.static StringgetResourceMessage(String bundleName, Locale locale, String messageKey) Gets the resource message.getResourceMessages(String bundleName, Locale locale) Gets the resource messages.static org.exoplatform.social.core.space.model.SpaceGets the space by context.static StringGets the space name by context.static DateparseISODate(String date) Parses the date from a ISO-8601 formatted string.static StringspaceRoomName(String spacePrettyName) Generate a space room name.
-
Constructor Details
-
Utils
public Utils()
-
-
Method Details
-
spaceRoomName
-
getSpaceByContext
public static org.exoplatform.social.core.space.model.Space getSpaceByContext()Gets the space by context.- Returns:
- the space by context
-
getSpaceNameByContext
Gets the space name by context.- Returns:
- the space name in portal context
-
getCurrentContext
Gets the current context.- Parameters:
userId- the user idlocale- the locale- Returns:
- the current context
-
getCurrentContext
Gets the current context.- Parameters:
userId- the user idspaceId- the current space idlocale- the locale- Returns:
- the current context
-
getResourceMessages
-
getResourceMessage
-
asJSON
-
parseISODate
Parses the date from a ISO-8601 formatted string.- Parameters:
date- the date- Returns:
- the date
- Throws:
ParseException- the parse exception
-
formatISODate
-
buildUrl
public static String buildUrl(String protocol, String hostname, int port, String path) throws MalformedURLException Build client URL using given parameters.- Parameters:
protocol- the schemehostname- the host nameport- the portpath- the path- Returns:
- the string
- Throws:
MalformedURLException- if the protocol hasn't a handled
-