de.starface.integration.uci.java.v30.ucp.messages.requests
Interface UcpFaxRequests


@RpcInterface(value="ucp.v30.requests.fax")
@UciService(value="ucp.v30.requests.fax")
public interface UcpFaxRequests

This interface defines the fax requests provided by the UCI server.


Nested Class Summary
static interface UcpFaxRequests.SendFaxFileUpload
          This interface defines the RPC methods that can be used to upload the fax files
 
Field Summary
static String SERVICE_NAME
          The UCI service name used for this interface
 
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 currently being sent by the user.
 Map<String,Object> getFaxState(String faxId)
          The getFaxState request is used to query the UCI server for the state of an identified fax request.
 String sendFax(String faxNumber, String faxId, String textFileId, String pdfFileId)
          This request initiates the fax sending process.
 

Field Detail

SERVICE_NAME

static final String SERVICE_NAME
The UCI service name used for this interface

See Also:
Constant Field Values
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 currently 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 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).

getFaxState

Map<String,Object> getFaxState(String faxId)
                               throws UciException
The getFaxState request is used to query the UCI server 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 to STARFACE an empty Map 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,
               String textFileId,
               String pdfFileId)
               throws UciException
This request initiates the fax sending process. Before this can be done a PDF file to be sent as fax must and a text file containing the fax text may be uploaded to the server using the UcpFaxRequests.SendFaxFileUpload RPC interface. In the next step sendFax can be invoked and the destination number of the fax must be given. In UCI faxes are identified using UUIDs (Universally Unique Identifier). The id for the fax to be sent can either be given by the client or generated by STARFACE. In the case of a successful response (denoted by a non empty returned value), the fax sending process has been started. However the fax has not actually been sent to the destination yet.

Parameters:
faxNumber - the phone number to send the fax to
faxId - The UUID to be assigned to the fax request. If not set STARFACE will create one.
textFileId - the id of the file transfer used to upload the text file. If no text file has been uploaded the empty string must be given.
pdfFileId - the id of the file transfer used to upload the PDF file.
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).


Copyright © 2012 STARFACE GmbH. All rights reserved.