public abstract class TeamchatAPI
extends java.lang.Object
Constructor and Description |
---|
TeamchatAPI() |
Modifier and Type | Method and Description |
---|---|
abstract void |
addAlias(java.lang.String formid,
java.lang.String alias)
Method to add a alias to a formid.
|
abstract TeamchatAPI |
addReceiveMessageErrorHandler(ReceiveMessageErrorHandler errorHandler)
Method to add ReceiveMessageErrorHandler.
|
abstract TeamchatAPI |
addSendMessageErrorHandler(SendMessageErrorHandler errorHandler)
Method to add a SendMessageErrorHandler.
|
abstract TeamchatAPI |
changeAdminTo(java.lang.String email,
Room room)
Method to change admin of room.
|
abstract TeamchatAPI |
closeRoom(Room room)
Method to close a room.
|
abstract Context |
context()
Returns the context that has information about current event, such as reply.
|
abstract BotData |
data()
Gets the data associated with bot.
|
static TeamchatAPI |
fromAuthKey(java.lang.String authKey)
Create instance of TeamchatAPI using the authkey.
|
static TeamchatAPI |
fromAuthKey(java.lang.String authKey,
java.lang.String path)
* Create instance of TeamchatAPI using the authkey and path.
|
static TeamchatAPI |
fromFile(java.lang.String filename)
Create instance of TeamchatAPI using the configuration file specified.
|
abstract java.lang.String |
getEndpoint()
Get the teamchat endpoint used by the APIs.By default APIs uses teamchat production servers
The APIs calls can be routed to different environment (such as sandbox) by setting the endpoint.
|
abstract com.teamchat.client.sdk.impl.RoomDetails |
getRoomMembers(Room room,
java.lang.String pageNo,
java.lang.String pageSize)
Method to get the room members
|
abstract java.lang.String |
getRoomName(Room room)
Method to getRoomName.
|
abstract TeamchatAPI |
leaveRoom(Room room)
Method to leave a room.
|
abstract Factory |
objects()
Returns the factory to create form and form fields for the chatlet.
|
abstract TeamchatAPI |
perform(Room room)
Perform actions in a room.
|
TeamchatAPI |
performPostInCurrentRoom(Chatlet c)
Perform chatlet post action in the current room.
|
abstract TeamchatAPI |
removeMember(java.lang.String email,
Room room)
Method to remove member from room.
|
abstract TeamchatAPI |
setAuthenticationKey(java.lang.String authenticationKey)
Set the authentication key of the user.
|
abstract TeamchatAPI |
setEndPoint(java.lang.String endpoint)
Set the teamchat endpoint to be used by APIs.
|
abstract TeamchatAPI |
setExecutor(EventExecutor ex) |
abstract TeamchatAPI |
setLoggingOptions(com.teamchat.client.logging.TeamChatLoggingOptions options)
Set the logging options.
|
abstract TeamchatAPI |
setTimeout(int timeout) |
abstract TeamchatAPI |
startReceivingEvents(java.lang.Object wf)
Begin receiving events.
|
abstract TeamchatAPI |
stopReceivingEvents()
Stop receiving events.
|
abstract TeamchatAPI |
updateFlowlet(Flowlet wf)
Perform actions in a room.
|
abstract UserData |
userData()
Get the UserData object which holds the bot details.
|
static TeamchatAPI |
withCustomPersistence(com.teamchat.client.sdk.pers.PersistenceLayer data)
Create instance of TeamchatAPI using the configuration file specified.
|
public static TeamchatAPI fromFile(java.lang.String filename)
filename
- The path of file to be used as api configuration/data.public static TeamchatAPI fromAuthKey(java.lang.String authKey)
authKey
- The authkey.public static TeamchatAPI fromAuthKey(java.lang.String authKey, java.lang.String path)
authKey
- The authkey.path
- The path to create the config file.public static TeamchatAPI withCustomPersistence(com.teamchat.client.sdk.pers.PersistenceLayer data)
data
- The path of file to be used as api configuration/data.public abstract TeamchatAPI setExecutor(EventExecutor ex)
public abstract TeamchatAPI setAuthenticationKey(java.lang.String authenticationKey)
authenticationKey
- The authentication key to be set.public abstract TeamchatAPI startReceivingEvents(java.lang.Object wf)
wf
- The callback object to which events should be fired.public abstract TeamchatAPI stopReceivingEvents()
public abstract TeamchatAPI perform(Room room)
room
- The room in which there are actions to be performed.public TeamchatAPI performPostInCurrentRoom(Chatlet c)
c
- chatlet to be posted.public abstract TeamchatAPI updateFlowlet(Flowlet wf)
wf
- The callback object to which events should be fired.public abstract BotData data()
public abstract Factory objects()
public abstract Context context()
public abstract TeamchatAPI setEndPoint(java.lang.String endpoint)
endpoint
- URL.public abstract TeamchatAPI setTimeout(int timeout)
public abstract java.lang.String getEndpoint()
public abstract UserData userData()
public abstract TeamchatAPI setLoggingOptions(com.teamchat.client.logging.TeamChatLoggingOptions options)
options
- public abstract void addAlias(java.lang.String formid, java.lang.String alias)
formid
- alias
- public abstract TeamchatAPI addSendMessageErrorHandler(SendMessageErrorHandler errorHandler)
errorHandler
- public abstract TeamchatAPI addReceiveMessageErrorHandler(ReceiveMessageErrorHandler errorHandler)
errorHandler
- public abstract TeamchatAPI leaveRoom(Room room) throws java.lang.Exception
room
- The room to leave.java.lang.Exception
public abstract TeamchatAPI closeRoom(Room room) throws java.lang.Exception
room
- The room to close.java.lang.Exception
public abstract TeamchatAPI removeMember(java.lang.String email, Room room) throws java.lang.Exception
email
- Email of the member to be removed.room
- Room from which the member is to be removed.java.lang.Exception
public abstract TeamchatAPI changeAdminTo(java.lang.String email, Room room) throws java.lang.Exception
email
- Email of the new admin.room
- Room for which the admin is being changed.java.lang.Exception
public abstract java.lang.String getRoomName(Room room) throws java.lang.Exception
room
- Room for which the name needs to be fetched.java.lang.Exception
public abstract com.teamchat.client.sdk.impl.RoomDetails getRoomMembers(Room room, java.lang.String pageNo, java.lang.String pageSize) throws java.lang.Exception
room
- Room to get the members.pageNo
- Page Number of the members list.pageSize
- Page Size of the room list.java.lang.Exception