public class BanafoManager
extends java.lang.Object
Constructor and Description |
---|
BanafoManager(long handle)
Constructor storing the pointer/address to the underlying native object
|
Modifier and Type | Method and Description |
---|---|
void |
addBanafoListener(BanafoEventsHandler value)
Adds a new Banafo Service event listener
All added listeners will be notified for each event.
|
Result |
cancelAuthorization()
Cancels Banafo Service authorization process
Cancels the Banafo Service authorization process.
|
Result |
cancelRequest(long requestId)
Cancels a Banafo Service request
Cancels an already running Banafo service request and discards any results that might be received.
|
BanafoCall |
createCall(java.lang.String banafoId,
java.lang.String summary,
java.lang.String title,
java.lang.String source,
OriginType origin,
java.lang.String startedAt,
java.lang.String acceptedAt,
java.lang.String finishedAt,
java.lang.String type,
java.lang.String localPhone,
java.lang.String remotePhone,
BanafoContact contact)
Creates a BanafoCall object
Creates a BanafoCall object
|
BanafoContact |
createContact(java.lang.String banafoId,
java.lang.String remoteId,
java.lang.String remoteProvider,
java.lang.String displayName,
java.lang.String firstName,
java.lang.String middleName,
java.lang.String lastName,
ContactType type,
java.lang.String url,
java.lang.String company,
java.util.List<java.lang.String> emails,
java.util.List<BanafoPhone> phones)
Creates a BanafoContact object
Creates a BanafoContact object that can be used with setCallContact
|
BanafoContactSearchCriteria |
createContactSearchCriteria(java.lang.String contactId,
java.lang.String provider,
java.lang.String search,
java.util.List<ContactType> types,
java.lang.String phone,
java.lang.String nationalNumber,
boolean reverseLookup,
java.lang.String region,
int start,
int limit,
java.lang.String pageId)
Creates a BanafoContactSearchCriteria object
Creates a BanafoContactSearchCriteria object to be used for listContacts
|
BanafoRecording |
createRecording(java.lang.String banafoId,
java.lang.String startedAt,
java.lang.String finishedAt,
java.lang.String banafoCallId,
java.util.List<RecordingStream> streams)
Creates a BanafoRecording object
Creates a BanafoRecording object
|
RecordingStream |
createRecordingStream(RecordingType origin,
java.lang.String type,
java.lang.String fileName,
java.lang.String languageCode)
Creates a RecordingStream object
Creates a RecordingStream object
|
void |
dropBanafoListener(BanafoEventsHandler value)
Removes a specific already added Banafo Service event listener
All added/left listeners will be notified for each event.
|
protected void |
finalize()
Ensures the underlying native object destruction
|
long |
forceCreateCallAtServer(BanafoCall call)
Force creates Banafo Call at the Banafo Service
Manually creates call on the Banafo Server.
|
long |
forceCreateRecordingAtServer(BanafoRecording recording)
Force creates Banafo Recording at the Banafo Service
Manually creates call recording on the Banafo Server.
|
long |
getProfile()
Get Banafo profile
Gets Banafo user profile information.
|
long |
handle()
Gets the pointer/address to the underlying native object
|
long |
listContacts(BanafoContactSearchCriteria criteria)
List contacts based on serch criterias
Provides a list of contacts that can come from local or external resources.
|
long |
listIntegrations()
List CRM integrations
Provides a list of all active integrations for the authenticated user with a provider from the list.
|
long |
listTranscriptLanguages()
List Banafo transcript languages
Lists Banafo transcript languages.
|
Result |
setCallContact(java.lang.String banafoCallId,
BanafoContact contact)
Updates contact information to a call
Updates contact information to a Banafo call.
|
Result |
setTokens(java.lang.String accessToken,
java.lang.String refreshToken)
Set Banafo Service authorization tokens
Sets the Banafo Service authorization tokens explicitly so there will be no need of authorization process to take place for this service
before it is able to be used.
|
Result |
start(java.lang.String schemeAndAuthority,
java.lang.String basePath,
java.lang.String clientID)
Set up and Start the Banafo Service
Setup and start the Banafo Service that can be used to query data, upload files, etc to the Banafo Web Service.
|
Result |
startAuthorization()
Starts Banafo Service authorization process
Starts a Banafo Service authorization sequence.
|
Result |
stop()
Stops the Banafo Service
Stops the already started Banafo Service along all requests associated with it.
|
long |
uploadRecording(java.lang.String banaforRecordingId,
java.lang.String filePathUtf8)
Upload audio recording file to the Banafo server
Adds a multipart/form-data recording file upload as described by W3C here: https:
and RFC 7578.
|
public BanafoManager(long handle)
handle
- Pointer/address to the underlying native objectpublic long handle()
protected void finalize()
finalize
in class java.lang.Object
public Result start(java.lang.String schemeAndAuthority, java.lang.String basePath, java.lang.String clientID)
schemeAndAuthority
- The scheme and authority where the Banafo Service is located. This is a required parameter and if empty string
is provided the function will fail with 'ResultCode::InvalidArgument'.basePath
- The base path used for the Banafo Service. It doesn't change between requests. This is a required parameter and if empty
string is provided the function will fail with 'ResultCode::InvalidArgument'.clientID
- The client ID used by the Banafo Web Service to identify the application. The application must be registered in the
Banafo Web service beforehand so that a client ID can be obtained. This is a required parameter and if empty string is
provided the function will fail with 'ResultCode::InvalidArgument'.BanafoServiceStateType stop
public Result stop()
start
public Result startAuthorization()
BanafoServiceStateType cancelAuthorization
public Result cancelAuthorization()
BanafoServiceStateType cancelAuthorization
public Result setTokens(java.lang.String accessToken, java.lang.String refreshToken)
accessToken
- The access token for the service. It can be left empty and a new access token will be obtained from the refresh token.refreshToken
- The refresh token for the service. This is a required parameter and if empty string is provided the function will
fail with 'ResultCode::InvalidArgument'.BanafoServiceStateType startAuthorization
public Result cancelRequest(long requestId)
requestId
- The Banafo Service request handler that is going to be canceled. If invalid handler is provided the function will fail
with 'ResultCode::NotFound'.Result
public Result setCallContact(java.lang.String banafoCallId, BanafoContact contact)
banafoCallId
- The Banafo call identifier. This is a required parameter and if empty string is provided the function will fail with
'ResultCode::InvalidArgument'.contact
- The new contact data. This is a required parameter and if empty string is provided the function will fail with
'ResultCode::InvalidArgument'.BanafoContact
public long listContacts(BanafoContactSearchCriteria criteria)
criteria
- The search criteria to be used for the contact listing. This is a required parameter and if empty/NULL is provided the
function will and return 'ZDKInvalidHandle'.BanafoEventsHandler cancelRequest
public long listIntegrations()
cancelRequest
public long uploadRecording(java.lang.String banaforRecordingId, java.lang.String filePathUtf8)
banaforRecordingId
- The Banafo file identifier received by the 'BanafoEventsHandler::OnEventState' callback once the call
recording is started. This is a required parameter and if empty string is provided the function will fail and
return 'ZDKInvalidHandle'.filePathUtf8
- Full pathname of the file to upload. The file must reside on the local system and must be accessible by the library.
This is a required parameter and if empty string is provided the function will fail and return 'ZDKInvalidHandle'.cancelRequest
public BanafoContactSearchCriteria createContactSearchCriteria(java.lang.String contactId, java.lang.String provider, java.lang.String search, java.util.List<ContactType> types, java.lang.String phone, java.lang.String nationalNumber, boolean reverseLookup, java.lang.String region, int start, int limit, java.lang.String pageId)
contactId
- See BanafoContactSearchCriteriaprovider
- See BanafoContactSearchCriteriasearch
- See BanafoContactSearchCriteriatypes
- See BanafoContactSearchCriteriaphone
- See BanafoContactSearchCriterianationalNumber
- See BanafoContactSearchCriteriareverseLookup
- See BanafoContactSearchCriteriaregion
- See BanafoContactSearchCriteriastart
- See BanafoContactSearchCriterialimit
- See BanafoContactSearchCriteriapageId
- See BanafoContactSearchCriterialistContacts
public BanafoContact createContact(java.lang.String banafoId, java.lang.String remoteId, java.lang.String remoteProvider, java.lang.String displayName, java.lang.String firstName, java.lang.String middleName, java.lang.String lastName, ContactType type, java.lang.String url, java.lang.String company, java.util.List<java.lang.String> emails, java.util.List<BanafoPhone> phones)
banafoId
- See BanafoContactremoteId
- See BanafoContactremoteProvider
- See BanafoContactdisplayName
- See BanafoContactfirstName
- See BanafoContactmiddleName
- See BanafoContactlastName
- See BanafoContacttype
- See BanafoContacturl
- See BanafoContactcompany
- See BanafoContactemails
- See BanafoContactphones
- See BanafoContactsetCallContact
public BanafoCall createCall(java.lang.String banafoId, java.lang.String summary, java.lang.String title, java.lang.String source, OriginType origin, java.lang.String startedAt, java.lang.String acceptedAt, java.lang.String finishedAt, java.lang.String type, java.lang.String localPhone, java.lang.String remotePhone, BanafoContact contact)
banafoId
- See BanafoCallsummary
- See BanafoCalltitle
- See BanafoCallsource
- See BanafoCallorigin
- See BanafoCallstartedAt
- See BanafoCallacceptedAt
- See BanafoCallfinishedAt
- See BanafoCalltype
- See BanafoCalllocalPhone
- See BanafoCallremotePhone
- See BanafoCallcontact
- See BanafoCallBanafoCall
public RecordingStream createRecordingStream(RecordingType origin, java.lang.String type, java.lang.String fileName, java.lang.String languageCode)
origin
- See RecordingStreamtype
- See RecordingStreamfileName
- See RecordingStreamlanguageCode
- See RecordingStreamRecordingStream
public BanafoRecording createRecording(java.lang.String banafoId, java.lang.String startedAt, java.lang.String finishedAt, java.lang.String banafoCallId, java.util.List<RecordingStream> streams)
banafoId
- See BanafoRecordingstartedAt
- See BanafoRecordingfinishedAt
- See BanafoRecordingbanafoCallId
- See BanafoRecordingstreams
- See BanafoRecordingBanafoRecording
public long forceCreateCallAtServer(BanafoCall call)
call
- The call to be created at the Banafo ServiceBanafoEventsHandler cancelRequest
public long forceCreateRecordingAtServer(BanafoRecording recording)
recording
- The recording to be created at the Banafo ServiceBanafoEventsHandler cancelRequest uploadRecording
public long getProfile()
cancelRequest
public long listTranscriptLanguages()
cancelRequest
public void addBanafoListener(BanafoEventsHandler value)
value
- The Banafo Service event listener to be addeddropBanafoListener
public void dropBanafoListener(BanafoEventsHandler value)
value
- The Banafo Service event listener to be removedaddBanafoListener