public class CommonsUtils extends Object
| Modifier and Type | Field and Description |
|---|---|
static String |
CONFIGURED_DOMAIN_URL_KEY |
static String |
CONFIGURED_TENANT_MASTER_HOST_KEY |
static String |
DEFAULT_SITE |
| Constructor and Description |
|---|
CommonsUtils() |
| Modifier and Type | Method and Description |
|---|---|
static void |
endRequest(Object service) |
static org.exoplatform.services.security.ConversationRegistry |
getConversationRegistry() |
static org.exoplatform.services.security.ConversationState |
getConversationState(String userId)
Get the last added ConversationState of a given user.
|
static String |
getCurrentDomain()
Get the current domain name by configuration
|
static String |
getCurrentPortalOwner()
Get current portal owner
|
static org.exoplatform.portal.mop.SiteKey |
getCurrentSite()
Get
SiteKey of current site |
static Collection<String> |
getGroupsOfUser(String userId)
Gets groups of user from ConversationRegistry, if not found,
get it from OrgnizationService
|
static org.exoplatform.services.organization.OrganizationService |
getOrganizationService() |
static org.exoplatform.services.jcr.core.ManageableRepository |
getRepository()
Get the current repository
|
static String |
getRestContextName() |
static <T> T |
getService(Class<T> clazz)
Gets the service.
|
static <T> T |
getService(Class<T> clazz,
String containerName)
Gets the service.
|
static org.exoplatform.services.jcr.ext.common.SessionProvider |
getSystemSessionProvider()
Gets the system session provider.
|
static org.exoplatform.services.organization.User |
getUser(String userId)
Get the last
User instance added in ConversationState of a given user |
static org.exoplatform.services.jcr.ext.common.SessionProvider |
getUserSessionProvider()
Gets the session provider.
|
static boolean |
isFeatureActive(String featureName) |
static boolean |
isFeatureActive(String featureName,
String username) |
static boolean |
isUserEnabled(String userId)
Gets the user state enabled/disabled from ConversationRegistry, if not found,
get it from OrgnizationService
|
static void |
startRequest(Object service) |
public static final String CONFIGURED_TENANT_MASTER_HOST_KEY
public static final String CONFIGURED_DOMAIN_URL_KEY
public static final String DEFAULT_SITE
public static org.exoplatform.services.organization.OrganizationService getOrganizationService()
public static org.exoplatform.services.security.ConversationRegistry getConversationRegistry()
public static boolean isUserEnabled(String userId) throws Exception
userId - usernameException - if an error occured during requesting the user from OrganizationServicepublic static org.exoplatform.services.security.ConversationState getConversationState(String userId)
userId - usernamepublic static org.exoplatform.services.organization.User getUser(String userId) throws Exception
User instance added in ConversationState of a given useruserId - UserException - thrown when an exception occurs while getting user from IDM storepublic static Collection<String> getGroupsOfUser(String userId) throws Exception
userId - usernameException - if an error occured during requesting the user from OrganizationServicepublic static org.exoplatform.services.jcr.ext.common.SessionProvider getSystemSessionProvider()
public static org.exoplatform.services.jcr.ext.common.SessionProvider getUserSessionProvider()
public static <T> T getService(Class<T> clazz)
clazz - the clazzpublic static <T> T getService(Class<T> clazz, String containerName)
clazz - the classcontainerName - the container's namepublic static org.exoplatform.services.jcr.core.ManageableRepository getRepository()
public static String getRestContextName()
public static boolean isFeatureActive(String featureName)
public static String getCurrentDomain()
public static String getCurrentPortalOwner()
public static org.exoplatform.portal.mop.SiteKey getCurrentSite()
SiteKey of current sitepublic static void startRequest(Object service)
public static void endRequest(Object service)
Copyright © 2003–2019 eXo Platform SAS. All rights reserved.