Class PathDataSource
- java.lang.Object
-
- com.zopim.android.sdk.data.PathDataSource
-
- All Implemented Interfaces:
- DataSource
public class PathDataSource extends java.lang.Object implements DataSource
Definition of data sourceAllows subscription to notification updates for individual data path. Enables data retrieval from a data path.
-
-
Constructor Summary
Constructors Constructor and Description PathDataSource()
-
Method Summary
-
-
-
Method Detail
-
deleteObservers
public void deleteObservers()
Description copied from interface:DataSource
Removes all observers from all data paths- Specified by:
deleteObservers
in interfaceDataSource
-
clear
public void clear()
Description copied from interface:DataSource
Clear all data source.This will clear each data path
- Specified by:
clear
in interfaceDataSource
-
getConnection
public Connection getConnection()
Description copied from interface:DataSource
Gets connection object from theConnectionPath
- Specified by:
getConnection
in interfaceDataSource
- Returns:
- connection pojo
- See Also:
ConnectionPath.getData()
,Connection
-
getProfile
public Profile getProfile()
Description copied from interface:DataSource
Gets profile object from theLivechatProfilePath
- Specified by:
getProfile
in interfaceDataSource
- Returns:
- profile pojo
- See Also:
LivechatProfilePath.getData()
,Profile
-
getAccount
public Account getAccount()
Description copied from interface:DataSource
Gets account object from theLivechatAccountPath
- Specified by:
getAccount
in interfaceDataSource
- Returns:
- account pojo
- See Also:
LivechatAccountPath.getData()
,Account
-
getAgents
public java.util.LinkedHashMap<java.lang.String,Agent> getAgents()
Description copied from interface:DataSource
Gets agents in the current chat. Agents are defined inLivechatAgentsPath
- Specified by:
getAgents
in interfaceDataSource
- Returns:
- agents and their ID
- See Also:
LivechatAgentsPath.getData()
,Agent
-
getDepartments
public java.util.Map<java.lang.String,Department> getDepartments()
Description copied from interface:DataSource
Gets departments from theLivechatDepartmentsPath
- Specified by:
getDepartments
in interfaceDataSource
- Returns:
- departments and their ID
- See Also:
LivechatDepartmentsPath.getData()
,Department
-
getChatLog
public java.util.LinkedHashMap<java.lang.String,ChatLog> getChatLog()
Description copied from interface:DataSource
Gets messages from theLivechatChatLogPath
- Specified by:
getChatLog
in interfaceDataSource
- Returns:
- messages and their ID
- See Also:
LivechatChatLogPath.getData()
,ChatLog
-
getForms
public Forms getForms()
Description copied from interface:DataSource
Gets forms from theLivechatFormsPath
- Specified by:
getForms
in interfaceDataSource
- Returns:
- forms model
- See Also:
LivechatFormsPath.getData()
,Forms
-
getFileSending
public FileSending getFileSending()
Description copied from interface:DataSource
Gets file sending model from theLivechatFileSendingPath
- Specified by:
getFileSending
in interfaceDataSource
- Returns:
- file sending model
- See Also:
LivechatFileSendingPath.getData()
,FileSending
-
getChattingStatus
public ChattingStatus getChattingStatus()
Description copied from interface:DataSource
Gets the current chatting status- Specified by:
getChattingStatus
in interfaceDataSource
- Returns:
ChattingStatus
enum
-
addConnectionObserver
public ObservableTrigger addConnectionObserver(ConnectionObserver observer)
Description copied from interface:DataSource
Adds observer to theConnectionPath
Observer will be registered for broadcast updates on
Connection
. You can registerConnectionObserver
orObserver
.- Specified by:
addConnectionObserver
in interfaceDataSource
- Parameters:
observer
- to register- Returns:
- trigger for requesting an update
-
addProfileObserver
public ObservableTrigger addProfileObserver(ProfileObserver observer)
Description copied from interface:DataSource
Adds observer to theLivechatProfilePath
Observer will be registered for broadcast updates on
Profile
. You can registerProfileObserver
orObserver
.- Specified by:
addProfileObserver
in interfaceDataSource
- Parameters:
observer
- to register- Returns:
- trigger for requesting an update
-
addAccountObserver
public ObservableTrigger addAccountObserver(AccountObserver observer)
Description copied from interface:DataSource
Adds observer to theLivechatAccountPath
Observer will be registered for broadcast updates on
Account
. You can registerAccountObserver
orObserver
.- Specified by:
addAccountObserver
in interfaceDataSource
- Parameters:
observer
- to register- Returns:
- trigger for requesting an update
-
addAgentsObserver
public ObservableTrigger addAgentsObserver(AgentsObserver observer)
Description copied from interface:DataSource
Adds observer to theLivechatAgentsPath
Observer will be registered for broadcast updates on
Agent
. You can registerAgentsObserver
orObserver
.- Specified by:
addAgentsObserver
in interfaceDataSource
- Parameters:
observer
- to register- Returns:
- trigger for requesting an update
-
addDepartmentsObserver
public ObservableTrigger addDepartmentsObserver(DepartmentsObserver observer)
Description copied from interface:DataSource
Adds observer to theLivechatDepartmentsPath
Observer will be registered for broadcast updates on
Department
. You can registerDepartmentsObserver
orObserver
.- Specified by:
addDepartmentsObserver
in interfaceDataSource
- Parameters:
observer
- to register- Returns:
- trigger for requesting an update
-
addChatLogObserver
public ObservableTrigger addChatLogObserver(ChatLogObserver observer)
Description copied from interface:DataSource
Adds observer to theLivechatChatLogPath
Observer will be registered for broadcast updates on
ChatLog
. You can registerChatLogObserver
orObserver
.- Specified by:
addChatLogObserver
in interfaceDataSource
- Parameters:
observer
- to register- Returns:
- trigger for requesting an update
-
addFormsObserver
public ObservableTrigger addFormsObserver(FormsObserver observer)
Description copied from interface:DataSource
Adds observer to theLivechatFormsPath
Observer will be registered for broadcast updates on
Forms
. You can registerFormsObserver
orObserver
.- Specified by:
addFormsObserver
in interfaceDataSource
- Parameters:
observer
- to register- Returns:
- trigger for requesting an update
-
addFileSendingObserver
public ObservableTrigger addFileSendingObserver(FileSendingObserver observer)
Description copied from interface:DataSource
Adds observer to theLivechatFileSendingPath
Observer will be registered for broadcast updates on
FileSending
. You can registerFileSendingObserver
orObserver
.- Specified by:
addFileSendingObserver
in interfaceDataSource
- Parameters:
observer
- to register- Returns:
- trigger for requesting an update
-
addChattingStatusObserver
public ObservableTrigger addChattingStatusObserver(ChattingStatusObserver observer)
Description copied from interface:DataSource
Adds an observer to theLivechatChattingStatusPath
.Observer will be registered for broadcast updates on
LivechatChattingStatusPath
. You can registerFileSendingObserver
orObserver
.- Specified by:
addChattingStatusObserver
in interfaceDataSource
- Parameters:
observer
- to register- Returns:
- trigger for requesting an update
-
deleteConnectionObserver
public void deleteConnectionObserver(ConnectionObserver observer)
Description copied from interface:DataSource
Deletes observer from theConnectionPath
- Specified by:
deleteConnectionObserver
in interfaceDataSource
- Parameters:
observer
- to remove
-
deleteProfileObserver
public void deleteProfileObserver(ProfileObserver observer)
Description copied from interface:DataSource
Deletes observer from theLivechatProfilePath
- Specified by:
deleteProfileObserver
in interfaceDataSource
- Parameters:
observer
- to remove
-
deleteAccountObserver
public void deleteAccountObserver(AccountObserver observer)
Description copied from interface:DataSource
Deletes observer from theLivechatAccountPath
- Specified by:
deleteAccountObserver
in interfaceDataSource
- Parameters:
observer
- to remove
-
deleteAgentsObserver
public void deleteAgentsObserver(AgentsObserver observer)
Description copied from interface:DataSource
Deletes observer from theLivechatAgentsPath
- Specified by:
deleteAgentsObserver
in interfaceDataSource
- Parameters:
observer
- to remove
-
deleteDepartmentsObserver
public void deleteDepartmentsObserver(DepartmentsObserver observer)
Description copied from interface:DataSource
Deletes observer from theLivechatDepartmentsPath
- Specified by:
deleteDepartmentsObserver
in interfaceDataSource
- Parameters:
observer
- to remove
-
deleteChatLogObserver
public void deleteChatLogObserver(ChatLogObserver observer)
Description copied from interface:DataSource
Deletes observer from theLivechatDepartmentsPath
- Specified by:
deleteChatLogObserver
in interfaceDataSource
- Parameters:
observer
- to remove
-
deleteFormsObserver
public void deleteFormsObserver(FormsObserver observer)
Description copied from interface:DataSource
Deletes observer from theLivechatFormsPath
- Specified by:
deleteFormsObserver
in interfaceDataSource
- Parameters:
observer
- to remove
-
deleteFileSendingObserver
public void deleteFileSendingObserver(FileSendingObserver observer)
Description copied from interface:DataSource
Deletes observer from theLivechatFileSendingPath
- Specified by:
deleteFileSendingObserver
in interfaceDataSource
- Parameters:
observer
- to remove
-
deleteChattingStatusObserver
public void deleteChattingStatusObserver(ChattingStatusObserver observer)
Description copied from interface:DataSource
Deletes observer from theLivechatChattingStatusPath
- Specified by:
deleteChattingStatusObserver
in interfaceDataSource
- Parameters:
observer
- to remove
-
-