Interface IDfChatService


public interface IDfChatService
  • Method Summary

    Modifier and Type
    Method
    Description
    com.documentum.fc.client.dcis.chat.model.ChatResponse
    postMessage(com.documentum.fc.client.dcis.chat.model.ChatRequest req, String token, IDfSession session)
    This method allows Documentum users to initiate the chat requests with Aviator plugin.
  • Method Details

    • postMessage

      com.documentum.fc.client.dcis.chat.model.ChatResponse postMessage(com.documentum.fc.client.dcis.chat.model.ChatRequest req, String token, IDfSession session) throws IOException, InterruptedException
      This method allows Documentum users to initiate the chat requests with Aviator plugin.

      Sample code:


      Java:
           DfChatService chatService = new DfChatService();
           chatService.initialize(session);
           ChatMessage chatMessage = new ChatMessage.Builder().setAuthor("user").setQuestion("What's up").build();
           ChatMetaData workspaceIDMetaData = new ChatMetaData.Builder().setKeyName("workspaceID").setValue("W-898956").build();
           List metaDataList = new ArrayList<>();
           metaDataList.add(workspaceIDMetaData);
           ChatRequest.Builder chatReqBuilder = new ChatRequest.Builder();
           ChatRequest chatRequest = chatReqBuilder.addMessage(chatMessage).addMetaData(metaDataList).setCtx("").build();
           ChatResponse chatResponse = null;
           try {
                chatResponse = chatService.postMessage(chatRequest, "token", session);
           } catch (Exception e) {
                //throw new RuntimeException(e);
           }
       

      Throws:
      IOException
      InterruptedException