de.starface.integration.uci.java.v30.messages.requests
Interface UciFaxRequests


@UciService(value="ucp.v30.requests.fax")
@RpcInterface(value="ucp.v30.requests.fax")
@RpcValueTranslation(version=30,
                     automaticFileTransfer=true)
public interface UciFaxRequests

This interface contains the UCI Communication Fax Requests


Method Summary
 List<String> getFaxIds()
          The UCI client may call getFaxIds to have the server send a response with a list of fax ids of the faxes being sent by the user.
 Fax getFaxState(String faxId)
          The getFaxState message is used to query STARFACE for the state of an identified fax request.
 String sendFax(String faxNumber, String faxId, File textFile, File pdfFile)
          This procedure is called to initiate a fax sending process.
 void sendFaxAsync(String faxNumber, String faxId, File textFile, File pdfFile)
          This procedure is called to initiate a fax sending process.
 

Method Detail

getFaxIds

List<String> getFaxIds()
                       throws UciException
The UCI client may call getFaxIds to have the server send a response with a list of fax ids of the faxes being sent by the user.

Returns:
the UUIDs assigned to the existing faxes
Throws:
UciException - if the request is not valid as defined by the UCI specification. This may be the case if the request is not allowed to the user (UciIllegalAccessException) or if the request is placed while the UCI client is not connected ( UcpNotConnectedException).

getFaxState

Fax getFaxState(String faxId)
                throws UciException
The getFaxState message is used to query STARFACE for the state of an identified fax request.

Parameters:
faxId - the UUID assigned to the fax request
Returns:
the different properties of the fax in a Map. The constants of FaxProperties are used as keys in the map. If the fax is not known an empty dictionary is returned.
Throws:
UciException - if the request is not valid as defined by the UCI specification. This may be the case if one of the request's arguments has an illegal value ( UciIllegalArgumentException) or if the request with the given parameters is not allowed to the user (UciIllegalAccessException) or if the request is placed while the UCI client is not connected (UcpNotConnectedException).

sendFax

String sendFax(String faxNumber,
               String faxId,
               File textFile,
               File pdfFile)
               throws UciException
This procedure is called to initiate a fax sending process. This includes that both provided files are completely transferred to the server. A successful send fax request returns after the fax sending process has been started but before the fax has actually been sent to the destination. To obtain information about the ongoing fax sending process a client may subscribe to the UciFaxEvents.

Parameters:
faxNumber - the phone number to dial
faxId - The UUID to be assigned to the fax request. If not set STARFACE will create one.
textFile - the text file containing the fax as plain text. This file is optional.
pdfFile - the PDF file containing the PDF to be sent as fax.
Returns:
an empty String if the fax request was rejected by the server or the UUID assigned to the fax request otherwise
Throws:
UciException - if the request is not valid as defined by the UCI specification. This may be the case if one of the request's arguments has an illegal value ( UciIllegalArgumentException) or if the request with the given parameters is not allowed to the user (UciIllegalAccessException) or if the request is placed while the UCI client is not connected (UcpNotConnectedException).

sendFaxAsync

void sendFaxAsync(String faxNumber,
                  String faxId,
                  File textFile,
                  File pdfFile)
                  throws UciException
This procedure is called to initiate a fax sending process. The method is invoked asynchronously and returns before files are transfered to the server and before the fax sending process has been started. To get informed about the file transfers a FileTransferEventListener can be registered with the RpcRequestCaller used to make the call. To obtain information about the ongoing fax sending process a client may subscribe to the UciFaxEvents.

Parameters:
faxNumber - the phone number to dial
faxId - The UUID to be assigned to the fax request. If not set STARFACE will create one.
textFile - the text file containing the fax as plain text. This file is optional.
pdfFile - the PDF file containing the PDF to be sent as fax.
Throws:
UciException - if the request is not valid as defined by the UCI specification. This may be the case if one of the request's arguments has an illegal value ( UciIllegalArgumentException) or if the request with the given parameters is not allowed to the user (UciIllegalAccessException) or if the request is placed while the UCI client is not connected (UcpNotConnectedException).


Copyright © 2012 STARFACE GmbH. All rights reserved.