@DefaultKey(value="communoteTool") public class CommunoteTool extends Object
Modifier and Type | Class and Description |
---|---|
class |
CommunoteTool.AuthenticationTool
Authentication specific tool.
|
Constructor and Description |
---|
CommunoteTool() |
public String convertToJsonString(Map<String,Object> mapping, boolean xmlEscape)
mapping
- the mapping to convert. The mapping should only contain simple types (numbers,
strings, booleans and arrays of these types) as values.xmlEscape
- whether to StringEscapeHelper.escapeXml(String)
before returning the
result. When using the serialized JSON as content of an HTML attribute, this
parameter should be true.public Long getActiveUserCount()
public String getAllUserPreferencesAsJson()
public ApplicationInformation getApplicationInformation()
public CommunoteTool.AuthenticationTool getAuth()
@Deprecated public TopicTool getBlogs()
getTopics()
instead.public ClientTool getClient()
public String getConfigurationProperty(ClientConfigurationPropertyConstant key)
key
- the key of the propertyClientConfigurationProperties.getProperty(ClientConfigurationPropertyConstant)
public int getConfigurationProperty(ClientConfigurationPropertyConstant key, int fallback)
key
- the key of the propertyfallback
- the fallbackAbstractConfigurationProperties.getProperty(com.communote.server.api.core.config.ConfigurationPropertyConstant,
int)
public String getConfigurationPropertyAsString(ClientConfigurationPropertyConstant key, String fallback)
key
- the key of the propertyfallback
- the fallback as StringAbstractConfigurationProperties.getProperty(com.communote.server.api.core.config.ConfigurationPropertyConstant,
String)
public List<Country> getCountries(javax.servlet.http.HttpServletRequest request)
MasterDataManagement.getCountries(Locale)
request
- the http servlet requestpublic String getCurrentClientId()
ClientHelper.getCurrentClientId()
public String getCurrentClientName()
ClientHelper.getCurrentClient()
public int getCurrentOffsetOfEffectiveUserTimeZone()
public String getCurrentUserAlias()
SecurityHelper.getCurrentUserAlias()
public TimeZone getCurrentUserEffectiveTimeZone()
public Long getCurrentUserId()
SecurityHelper.getCurrentUserId()
public Locale getCurrentUserLocale(javax.servlet.http.HttpServletRequest request)
request
- the current requestpublic UserProfileVO getCurrentUserProfile()
public String getCurrentUserSignature(UserNameFormat format)
format
- the format of the user signaturepublic String getDisplayNameForExternalObject(javax.servlet.http.HttpServletRequest request, String externalSystemId)
request
- the repuestexternalSystemId
- the external system id of the external objectpublic Collection<Language> getLanguages()
MasterDataManagement.getLanguages()
public MessageTool getMessages()
public TagTool getTags()
public List<SimplifiedTimeZone> getTimeZones()
MasterDataManagement.getTimeZones()
public TopicTool getTopics()
public Collection<Language> getUsedLanguages()
MasterDataManagement.getUsedLanguages()
public UserData getUser(Number id)
id
- the ID of the userpublic UserPreference getUserPreferences(String className)
className
- FQCN of the user preferences.public String getUserPreferencesAsJson(String className)
className
- FQCN of the user preferences.public String getUserSignature(User user, UserNameFormat format)
user
- the user to useformat
- the format of the user signaturepublic String getUserSignature(UserData userListItem, UserNameFormat format)
userListItem
- the user list item to useformat
- the format of the user signaturepublic String getUserSignature(UserProfileDetailListItem listItem, UserNameFormat format)
listItem
- the user list item to useformat
- the format of the user signaturepublic boolean isCompressCss()
public boolean isCompressJavaScript()
public boolean isCurrentUserClientManager()
public boolean isDevelopment()
public boolean isForceSsl(ChannelType type)
ChannelManagement.isForceSsl(ChannelType)
type
- the channel typepublic boolean isPackCss()
public boolean isPackJavaScript()
public boolean isStandalone()
Copyright © 2019 Communote team. All rights reserved.