Interface DataSource
-
- All Known Implementing Classes:
- PathDataSource
public interface DataSource
Interface definition of chat data source. It allows data retrieval and subscription to data change broadcasts.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method and Description void
addAccountObserver(java.util.Observer observer)
Adds observer to theLivechatAccountPath
void
addAgentsObserver(java.util.Observer observer)
Adds observer to theLivechatAgentsPath
void
addChatLogObserver(java.util.Observer observer)
Adds observer to theLivechatChatLogPath
void
addConnectionObserver(java.util.Observer observer)
Adds observer to theConnectionPath
void
addDepartmentsObserver(java.util.Observer observer)
Adds observer to theLivechatDepartmentsPath
void
addFileSendingObserver(java.util.Observer observer)
Adds observer to theLivechatFileSendingPath
void
addFormsObserver(java.util.Observer observer)
Adds observer to theLivechatFormsPath
void
addProfileObserver(java.util.Observer observer)
Adds observer to theLivechatProfilePath
void
clear()
Clear all data source.void
deleteAccountObserver(java.util.Observer observer)
Deletes observer from theLivechatAccountPath
void
deleteAgentsObserver(java.util.Observer observer)
Deletes observer from theLivechatAgentsPath
void
deleteChatLogObserver(java.util.Observer observer)
Deletes observer from theLivechatDepartmentsPath
void
deleteConnectionObserver(java.util.Observer observer)
Deletes observer from theConnectionPath
void
deleteDepartmentsObserver(java.util.Observer observer)
Deletes observer from theLivechatDepartmentsPath
void
deleteFormsObserver(java.util.Observer observer)
Deletes observer from theLivechatFormsPath
void
deleteObservers()
Removes all observers from all data pathsvoid
deleteProfileObserver(java.util.Observer observer)
Deletes observer from theLivechatProfilePath
Account
getAccount()
Gets account object from theLivechatAccountPath
java.util.LinkedHashMap<java.lang.String,Agent>
getAgents()
Gets agents in the current chat.java.util.LinkedHashMap<java.lang.String,ChatLog>
getChatLog()
Gets messages from theLivechatChatLogPath
Connection
getConnection()
Gets connection object from theConnectionPath
java.util.Map<java.lang.String,Department>
getDepartments()
Gets departments from theLivechatDepartmentsPath
FileSending
getFileSending()
Gets file sending model from theLivechatFileSendingPath
Forms
getForms()
Gets forms from theLivechatFormsPath
Profile
getProfile()
Gets profile object from theLivechatProfilePath
-
-
-
Method Detail
-
deleteObservers
void deleteObservers()
Removes all observers from all data paths
-
clear
void clear()
Clear all data source.This will clear each data path
-
getConnection
Connection getConnection()
Gets connection object from theConnectionPath
- Returns:
- connection pojo
- See Also:
ConnectionPath.getData()
,Connection
-
getProfile
Profile getProfile()
Gets profile object from theLivechatProfilePath
- Returns:
- profile pojo
- See Also:
LivechatProfilePath.getData()
,Profile
-
getAgents
java.util.LinkedHashMap<java.lang.String,Agent> getAgents()
Gets agents in the current chat. Agents are defined inLivechatAgentsPath
- Returns:
- agents and their ID
- See Also:
LivechatAgentsPath.getData()
,Agent
-
getDepartments
java.util.Map<java.lang.String,Department> getDepartments()
Gets departments from theLivechatDepartmentsPath
- Returns:
- departments and their ID
- See Also:
LivechatDepartmentsPath.getData()
,Department
-
getAccount
Account getAccount()
Gets account object from theLivechatAccountPath
- Returns:
- account pojo
- See Also:
LivechatAccountPath.getData()
,Account
-
getChatLog
java.util.LinkedHashMap<java.lang.String,ChatLog> getChatLog()
Gets messages from theLivechatChatLogPath
- Returns:
- messages and their ID
- See Also:
LivechatChatLogPath.getData()
,ChatLog
-
getForms
Forms getForms()
Gets forms from theLivechatFormsPath
- Returns:
- forms model
- See Also:
LivechatFormsPath.getData()
,Forms
-
getFileSending
FileSending getFileSending()
Gets file sending model from theLivechatFileSendingPath
- Returns:
- file sending model
- See Also:
LivechatFileSendingPath.getData()
,FileSending
-
addConnectionObserver
void addConnectionObserver(java.util.Observer observer)
Adds observer to theConnectionPath
Observer will be registered for broadcast updates on
Connection
. You can registerConnectionObserver
orObserver
.- Parameters:
observer
- to register
-
addProfileObserver
void addProfileObserver(java.util.Observer observer)
Adds observer to theLivechatProfilePath
Observer will be registered for broadcast updates on
Profile
. You can registerProfileObserver
orObserver
.- Parameters:
observer
- to register
-
addAgentsObserver
void addAgentsObserver(java.util.Observer observer)
Adds observer to theLivechatAgentsPath
Observer will be registered for broadcast updates on
Agent
. You can registerAgentsObserver
orObserver
.- Parameters:
observer
- to register
-
addDepartmentsObserver
void addDepartmentsObserver(java.util.Observer observer)
Adds observer to theLivechatDepartmentsPath
Observer will be registered for broadcast updates on
Department
. You can registerDepartmentsObserver
orObserver
.- Parameters:
observer
- to register
-
addAccountObserver
void addAccountObserver(java.util.Observer observer)
Adds observer to theLivechatAccountPath
Observer will be registered for broadcast updates on
Account
. You can registerAccountObserver
orObserver
.- Parameters:
observer
- to register
-
addFormsObserver
void addFormsObserver(java.util.Observer observer)
Adds observer to theLivechatFormsPath
Observer will be registered for broadcast updates on
Forms
. You can registerFormsObserver
orObserver
.- Parameters:
observer
- to register
-
addFileSendingObserver
void addFileSendingObserver(java.util.Observer observer)
Adds observer to theLivechatFileSendingPath
Observer will be registered for broadcast updates on
FileSending
. You can registerFileSendingObserver
orObserver
.- Parameters:
observer
- to register
-
addChatLogObserver
void addChatLogObserver(java.util.Observer observer)
Adds observer to theLivechatChatLogPath
Observer will be registered for broadcast updates on
ChatLog
. You can registerChatLogObserver
orObserver
.- Parameters:
observer
- to register
-
deleteConnectionObserver
void deleteConnectionObserver(java.util.Observer observer)
Deletes observer from theConnectionPath
- Parameters:
observer
- to remove
-
deleteProfileObserver
void deleteProfileObserver(java.util.Observer observer)
Deletes observer from theLivechatProfilePath
- Parameters:
observer
- to remove
-
deleteAgentsObserver
void deleteAgentsObserver(java.util.Observer observer)
Deletes observer from theLivechatAgentsPath
- Parameters:
observer
- to remove
-
deleteAccountObserver
void deleteAccountObserver(java.util.Observer observer)
Deletes observer from theLivechatAccountPath
- Parameters:
observer
- to remove
-
deleteDepartmentsObserver
void deleteDepartmentsObserver(java.util.Observer observer)
Deletes observer from theLivechatDepartmentsPath
- Parameters:
observer
- to remove
-
deleteChatLogObserver
void deleteChatLogObserver(java.util.Observer observer)
Deletes observer from theLivechatDepartmentsPath
- Parameters:
observer
- to remove
-
deleteFormsObserver
void deleteFormsObserver(java.util.Observer observer)
Deletes observer from theLivechatFormsPath
- Parameters:
observer
- to remove
-
-