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
All Methods Instance Methods Concrete 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
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
-
addConnectionObserver
public void addConnectionObserver(java.util.Observer 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
-
addProfileObserver
public void addProfileObserver(java.util.Observer 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
-
addAccountObserver
public void addAccountObserver(java.util.Observer 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
-
addAgentsObserver
public void addAgentsObserver(java.util.Observer 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
-
addDepartmentsObserver
public void addDepartmentsObserver(java.util.Observer 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
-
addChatLogObserver
public void addChatLogObserver(java.util.Observer 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
-
addFormsObserver
public void addFormsObserver(java.util.Observer 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
-
addFileSendingObserver
public void addFileSendingObserver(java.util.Observer 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
-
deleteConnectionObserver
public void deleteConnectionObserver(java.util.Observer observer)
Description copied from interface:DataSource
Deletes observer from theConnectionPath
- Specified by:
deleteConnectionObserver
in interfaceDataSource
- Parameters:
observer
- to remove
-
deleteProfileObserver
public void deleteProfileObserver(java.util.Observer observer)
Description copied from interface:DataSource
Deletes observer from theLivechatProfilePath
- Specified by:
deleteProfileObserver
in interfaceDataSource
- Parameters:
observer
- to remove
-
deleteAccountObserver
public void deleteAccountObserver(java.util.Observer observer)
Description copied from interface:DataSource
Deletes observer from theLivechatAccountPath
- Specified by:
deleteAccountObserver
in interfaceDataSource
- Parameters:
observer
- to remove
-
deleteAgentsObserver
public void deleteAgentsObserver(java.util.Observer observer)
Description copied from interface:DataSource
Deletes observer from theLivechatAgentsPath
- Specified by:
deleteAgentsObserver
in interfaceDataSource
- Parameters:
observer
- to remove
-
deleteDepartmentsObserver
public void deleteDepartmentsObserver(java.util.Observer observer)
Description copied from interface:DataSource
Deletes observer from theLivechatDepartmentsPath
- Specified by:
deleteDepartmentsObserver
in interfaceDataSource
- Parameters:
observer
- to remove
-
deleteChatLogObserver
public void deleteChatLogObserver(java.util.Observer observer)
Description copied from interface:DataSource
Deletes observer from theLivechatDepartmentsPath
- Specified by:
deleteChatLogObserver
in interfaceDataSource
- Parameters:
observer
- to remove
-
deleteFormsObserver
public void deleteFormsObserver(java.util.Observer observer)
Description copied from interface:DataSource
Deletes observer from theLivechatFormsPath
- Specified by:
deleteFormsObserver
in interfaceDataSource
- Parameters:
observer
- to remove
-
-