public class WebConferencingService extends Object implements org.picocontainer.Startable
| Modifier and Type | Class and Description |
|---|---|
class |
WebConferencingService.RoomInfo
Represent Chat room in calls.
|
class |
WebConferencingService.SpaceInfo
Represent Space in calls.
|
| Modifier and Type | Field and Description |
|---|---|
protected static String |
CALL_ID_SCOPE_NAME
The Constant CALL_ID_SCOPE_NAME.
|
protected static String |
CALL_OWNER_SCOPE_NAME
The Constant CALL_OWNER_SCOPE_NAME.
|
static String |
CHAT_ROOM_TYPE_NAME
The Constant CHAT_ROOM_TYPE_NAME.
|
protected org.exoplatform.services.cms.drives.ManageDriveService |
driveService
The drive service.
|
protected static String |
GROUP_CALL_TYPE
The Constant GROUP_CALL_TYPE.
|
protected org.exoplatform.services.jcr.ext.hierarchy.NodeHierarchyCreator |
hierarchyCreator
The hierarchy owner.
|
protected org.exoplatform.services.jcr.RepositoryService |
jcrService
The jcr service.
|
protected org.exoplatform.services.listener.ListenerService |
listenerService
The listener service.
|
protected static org.exoplatform.services.log.Log |
LOG
The Constant LOG.
|
protected org.exoplatform.services.organization.OrganizationService |
organization
The organization.
|
static String |
OWNER_TYPE_CHATROOM
The Constant OWNER_TYPE_CHATROOM.
|
static String |
OWNER_TYPE_SPACE
The Constant OWNER_TYPE_SPACE.
|
protected static String |
PROVIDER_SCOPE_NAME
The Constant PROVIDER_SCOPE_NAME.
|
protected Map<String,CallProvider> |
providers
The providers.
|
protected org.exoplatform.services.jcr.ext.app.SessionProviderService |
sessionProviders
The session providers.
|
protected org.exoplatform.commons.api.settings.SettingService |
settingService
The settings service.
|
protected org.exoplatform.social.core.manager.IdentityManager |
socialIdentityManager
The social identity manager.
|
static String |
SPACE_TYPE_NAME
The Constant SPACE_TYPE_NAME.
|
protected org.exoplatform.social.core.space.spi.SpaceService |
spaceService
The space service.
|
protected static String |
USER_CALLS_SCOPE_NAME
The Constant USER_CALLS_SCOPE_NAME.
|
protected Map<String,Set<UserCallListener>> |
userListeners
The user listeners.
|
| Constructor and Description |
|---|
WebConferencingService(org.exoplatform.services.jcr.RepositoryService jcrService,
org.exoplatform.services.jcr.ext.app.SessionProviderService sessionProviders,
org.exoplatform.services.jcr.ext.hierarchy.NodeHierarchyCreator hierarchyCreator,
org.exoplatform.services.organization.OrganizationService organization,
org.exoplatform.social.core.manager.IdentityManager socialIdentityManager,
org.exoplatform.services.cms.drives.ManageDriveService driveService,
org.exoplatform.services.listener.ListenerService listenerService,
org.exoplatform.commons.api.settings.SettingService settingService)
Instantiates a new web conferencing service.
|
| Modifier and Type | Method and Description |
|---|---|
CallInfo |
addCall(String id,
String ownerId,
String ownerType,
String title,
String providerType,
Collection<String> parts)
Adds the call to list of active and fires STARTED event.
|
void |
addPlugin(org.exoplatform.container.component.ComponentPlugin plugin)
Adds a provider plugin.
|
void |
addProvider(CallProvider provider)
Adds the provider.
|
void |
addUserCallListener(UserCallListener listener)
Adds the user listener.
|
protected org.json.JSONObject |
callToJson(CallInfo call)
Call to JSON.
|
protected String |
currentUserId()
Current user id.
|
protected void |
deleteAllUserCalls()
Delete all user calls.
|
protected void |
deleteCall(CallInfo call)
Delete call.
|
protected CallInfo |
deleteCallById(String id)
Delete call by id.
|
protected void |
deleteOwnerCallId(String ownerId)
Delete owner call id.
|
protected void |
fireUserCallJoined(String callId,
String providerType,
String ownerId,
String ownerType,
String partId,
String userId)
Fire user call joined a new part.
|
protected void |
fireUserCallLeaved(String callId,
String providerType,
String ownerId,
String ownerType,
String partId,
String userId)
Fire user call part leaved.
|
protected void |
fireUserCallStateChanged(String userId,
String callId,
String providerType,
String callState,
String ownerId,
String ownerType)
Fire user call state.
|
CallInfo |
getCall(String id)
Gets an active call info.
|
CallProvider |
getProvider(String type)
Gets the provider.
|
CallProviderConfiguration |
getProviderConfiguration(String providerType,
Locale locale)
Gets the provider configuration.
|
Set<CallProviderConfiguration> |
getProviderConfigurations()
Gets the provider configurations.
|
Set<CallProviderConfiguration> |
getProviderConfigurations(Locale locale)
Gets the provider configurations.
|
WebConferencingService.RoomInfo |
getRoomInfo(String id,
String name,
String title,
String[] members)
Gets the room info.
|
WebConferencingService.SpaceInfo |
getSpaceInfo(String spacePrettyName)
Gets the space info.
|
protected Set<String> |
getSpaceMembers(String spacePrettyName)
Gets the space members.
|
CallState[] |
getUserCalls(String userId)
Gets the user calls.
|
UserInfo |
getUserInfo(String id)
Gets the user info.
|
protected boolean |
isSpaceMember(String userName,
String spacePrettyName)
Checks if is space member.
|
CallInfo |
joinCall(String id,
String userId)
If call started, then notify all its parties that given participant joined.
|
protected CallInfo |
jsonToCall(org.json.JSONObject json)
Json to call.
|
protected CallProviderConfiguration |
jsonToProviderConfig(org.json.JSONObject json)
Json to provider config.
|
CallInfo |
leaveCall(String id,
String userId)
If call started, then notify all its parties that given participant leaved.
|
protected void |
notifyUserCallStateChanged(CallInfo call,
String initiatorId,
String state)
Notify user call state changed.
|
protected org.json.JSONObject |
providerConfigToJson(CallProviderConfiguration conf)
Provider config to json.
|
protected CallInfo |
readCallById(String id)
Read call by id.
|
protected CallInfo |
readCallByOwnerId(String ownerId)
Deprecated.
|
protected String |
readOwnerCallId(String ownerId)
Read owner call id.
|
protected CallProviderConfiguration |
readProviderConfig(String type)
Read saved call provider configuration.
|
protected String[] |
readUserGroupCallIds(String userId)
Read user group call ids.
|
void |
removeUserCallListener(UserCallListener listener)
Removes the user listener.
|
protected void |
removeUserGroupCallId(String userId,
String callId)
Removes the user group call id.
|
protected WebConferencingService.RoomInfo |
roomInfo(String id,
String name,
String title,
String[] members,
String callId)
Room info.
|
protected void |
saveCall(CallInfo call)
Save call.
|
protected void |
saveOwnerCallId(String ownerId,
String callId)
Save owner call id.
|
protected void |
saveProviderConfig(CallProviderConfiguration conf)
Save provider configuration.
|
void |
saveProviderConfiguration(CallProviderConfiguration config)
Save provider configuration.
|
protected void |
saveUserGroupCallId(String userId,
String callId)
Save user group call id.
|
void |
start() |
CallInfo |
startCall(String id)
Removes the call info from active and fires STOPPED event.
|
void |
stop() |
protected CallInfo |
stopCall(CallInfo call,
String userId,
boolean remove)
Stop call.
|
CallInfo |
stopCall(String id,
boolean remove)
Removes the call info from active and fires STOPPED event.
|
public static final String SPACE_TYPE_NAME
public static final String CHAT_ROOM_TYPE_NAME
protected static final String GROUP_CALL_TYPE
protected static final String CALL_OWNER_SCOPE_NAME
protected static final String CALL_ID_SCOPE_NAME
protected static final String USER_CALLS_SCOPE_NAME
protected static final String PROVIDER_SCOPE_NAME
public static final String OWNER_TYPE_SPACE
public static final String OWNER_TYPE_CHATROOM
protected static final org.exoplatform.services.log.Log LOG
protected final org.exoplatform.services.jcr.RepositoryService jcrService
protected final org.exoplatform.services.jcr.ext.app.SessionProviderService sessionProviders
protected final org.exoplatform.services.jcr.ext.hierarchy.NodeHierarchyCreator hierarchyCreator
protected final org.exoplatform.services.organization.OrganizationService organization
protected final org.exoplatform.social.core.manager.IdentityManager socialIdentityManager
protected final org.exoplatform.services.cms.drives.ManageDriveService driveService
protected final org.exoplatform.services.listener.ListenerService listenerService
protected final org.exoplatform.commons.api.settings.SettingService settingService
protected final Map<String,CallProvider> providers
protected org.exoplatform.social.core.space.spi.SpaceService spaceService
protected final Map<String,Set<UserCallListener>> userListeners
public WebConferencingService(org.exoplatform.services.jcr.RepositoryService jcrService,
org.exoplatform.services.jcr.ext.app.SessionProviderService sessionProviders,
org.exoplatform.services.jcr.ext.hierarchy.NodeHierarchyCreator hierarchyCreator,
org.exoplatform.services.organization.OrganizationService organization,
org.exoplatform.social.core.manager.IdentityManager socialIdentityManager,
org.exoplatform.services.cms.drives.ManageDriveService driveService,
org.exoplatform.services.listener.ListenerService listenerService,
org.exoplatform.commons.api.settings.SettingService settingService)
jcrService - the jcr servicesessionProviders - the session providershierarchyCreator - the hierarchy creatororganization - the organizationsocialIdentityManager - the social identity managerdriveService - the drive servicelistenerService - the listener servicesettingService - the setting servicepublic UserInfo getUserInfo(String id) throws Exception
id - the idException - the exceptionpublic WebConferencingService.SpaceInfo getSpaceInfo(String spacePrettyName) throws Exception
spacePrettyName - the space pretty nameException - the exceptionpublic WebConferencingService.RoomInfo getRoomInfo(String id, String name, String title, String[] members) throws Exception
id - the idname - the nametitle - the titlemembers - the room membersException - the exceptionpublic CallInfo addCall(String id, String ownerId, String ownerType, String title, String providerType, Collection<String> parts) throws Exception
id - the idownerId - the owner idownerType - the owner typetitle - the titleproviderType - the provider typeparts - the partsException - the exceptionpublic CallInfo getCall(String id) throws Exception
id - the idnull if call not foundException - the exceptionpublic CallInfo stopCall(String id, boolean remove) throws Exception
id - the idremove - the removenull if call not foundException - the exceptionprotected CallInfo stopCall(CallInfo call, String userId, boolean remove) throws Exception
call - the calluserId - the user idremove - the removeException - the exceptionpublic CallInfo startCall(String id) throws Exception
id - the idnull if call not foundException - the exceptionpublic CallInfo joinCall(String id, String userId) throws Exception
InvalidCallStateException will be thrown.id - the iduserId - the user idnull if call not foundException - the exceptionpublic CallInfo leaveCall(String id, String userId) throws Exception
InvalidCallStateException will be thrown.id - the iduserId - the user idnull if call not foundException - the exceptionpublic CallState[] getUserCalls(String userId) throws Exception
userId - the user idException - the exceptionpublic void addUserCallListener(UserCallListener listener)
listener - the listenerpublic void removeUserCallListener(UserCallListener listener)
listener - the listenerprotected void fireUserCallStateChanged(String userId, String callId, String providerType, String callState, String ownerId, String ownerType)
userId - the user idcallId - the call idproviderType - the provider typecallState - the call stateownerId - the caller idownerType - the caller typeprotected void fireUserCallJoined(String callId, String providerType, String ownerId, String ownerType, String partId, String userId)
callId - the call idproviderType - the provider typeownerId - the owner idownerType - the owner typepartId - the part iduserId - the user idprotected void fireUserCallLeaved(String callId, String providerType, String ownerId, String ownerType, String partId, String userId)
callId - the call idproviderType - the provider typeownerId - the owner idownerType - the owner typepartId - the part iduserId - the user idpublic void addPlugin(org.exoplatform.container.component.ComponentPlugin plugin)
CallProvider then it will log a warning and let server continue the start.plugin - the pluginpublic void addProvider(CallProvider provider)
provider - the providerpublic CallProvider getProvider(String type)
type - the typepublic Set<CallProviderConfiguration> getProviderConfigurations(Locale locale)
locale - the locale to apply to provider description, if null a default one will be
usedpublic Set<CallProviderConfiguration> getProviderConfigurations()
public CallProviderConfiguration getProviderConfiguration(String providerType, Locale locale) throws Exception
providerType - the provider typelocale - the locale to apply to provider description, if null a default one will be
usednull if provider not foundException - the exceptionpublic void saveProviderConfiguration(CallProviderConfiguration config) throws Exception
config - the configException - the exceptionpublic void start()
start in interface org.picocontainer.Startablepublic void stop()
stop in interface org.picocontainer.Startableprotected boolean isSpaceMember(String userName, String spacePrettyName)
userName - the user namespacePrettyName - the space pretty nameprotected Set<String> getSpaceMembers(String spacePrettyName)
spacePrettyName - the space pretty nameprotected org.json.JSONObject callToJson(CallInfo call) throws org.json.JSONException
call - the callorg.json.JSONException - the JSON exceptionprotected CallInfo jsonToCall(org.json.JSONObject json) throws Exception
json - the jsonException - the exceptionprotected void saveCall(CallInfo call) throws Exception
call - the callException - the exception@Deprecated protected CallInfo readCallByOwnerId(String ownerId) throws Exception
ownerId - the owner idException - the exceptionprotected CallInfo readCallById(String id) throws Exception
id - the idException - the exceptionprotected void deleteCall(CallInfo call) throws Exception
call - the callException - the exceptionprotected void deleteAllUserCalls()
throws Exception
Exception - the exceptionprotected CallInfo deleteCallById(String id) throws Exception
id - the idException - the exceptionprotected void saveOwnerCallId(String ownerId, String callId)
ownerId - the owner idcallId - the call idprotected String readOwnerCallId(String ownerId)
ownerId - the owner idprotected void deleteOwnerCallId(String ownerId)
ownerId - the owner idprotected String[] readUserGroupCallIds(String userId)
userId - the user idprotected void saveUserGroupCallId(String userId, String callId)
userId - the user idcallId - the call idprotected void removeUserGroupCallId(String userId, String callId)
userId - the user idcallId - the call idprotected CallProviderConfiguration jsonToProviderConfig(org.json.JSONObject json) throws Exception
json - the jsonException - the exceptionprotected org.json.JSONObject providerConfigToJson(CallProviderConfiguration conf) throws org.json.JSONException
conf - the conforg.json.JSONException - the JSON exceptionprotected CallProviderConfiguration readProviderConfig(String type) throws Exception
type - the typeException - the exceptionprotected void saveProviderConfig(CallProviderConfiguration conf) throws Exception
conf - the confException - the exceptionprotected WebConferencingService.RoomInfo roomInfo(String id, String name, String title, String[] members, String callId) throws Exception
id - the idname - the nametitle - the titlemembers - the memberscallId - the call idException - the exceptionprotected String currentUserId()
Copyright © 2003–2017 eXo Platform SAS. All rights reserved.