com.easylink.services
Class ELSFaxManager

java.lang.Object
  extended by com.easylink.services.ELSFaxManager

public class ELSFaxManager
extends java.lang.Object

ELSFaxManager is a utility object that wraps the capabilities available
in the Easylink Services SendFaxManagement web service. Each method
corresponds to an available Request on the SendFaxManagement service.

------------ Usage--------------
- Construct ELSFaxManager
ELSFaxManager efm = new ELSFaxManager();

- set the host and port
efm.setHost("webservicestest.easylink.com");
efm.setPort("8080");
efm.setEmailAddress("test@test.com");
efm.setPassword("mypw123");

- make a call
efm.sendFax( ... );


------------- Usage Secured ----------------
- Construct ELSFaxManager
ELSFaxManager efm= New ELSFaxManager();

- set the host and port
efm.setHost("webservicestest.easylink.com");
efm.setPort("8080");
efm.setEmailAddress("test@test.com");
efm.setPassword("mypw123");
efm.setSecured(true);

- set the keyStore
efm.setKeyStore("c:\project\webtools\client.keystore");

- make a call
efm.sendFax( ... );


Constructor Summary
ELSFaxManager()
           
 
Method Summary
 java.lang.String getEmailAddress()
           
 java.net.URL getEndPoint()
           
 java.lang.String getHost()
           
 java.lang.String getPassword()
           
 int getPort()
           
 java.lang.String getTrustStoreName()
           
 void init()
           
 boolean isSecured()
           
 KillFaxResponse killFax(java.lang.String userCode)
          killFax will kill a fax that is in progress in he Easylink network
 QueryFaxResponse queryFax(java.lang.String userCode)
          queryFax will get the status of a fax.
 ResendFaxResponse resendFax(java.lang.String userCode, java.lang.String destination)
          resendFax can be used to resend a fax that had previously failed in all its attempts to deliver.
 SendFaxResponse sendFax(java.lang.String destination, java.lang.String accountCode, java.lang.String userCode, java.lang.String tsi, java.lang.String alternateDeliveryNotice, java.lang.String deliveryNoticeType, java.lang.String faxResolution, java.lang.String to, java.lang.String from, java.io.File[] attachments)
          sendFax will iniate the sending of a fax through the Easylink network.
 void setEmailAddress(java.lang.String emailAddress)
           
 void setEndPoint(java.net.URL endPoint)
           
 void setHost(java.lang.String host)
           
 void setPassword(java.lang.String password)
           
 void setPort(int port)
           
 void setSecured(boolean secured)
           
 void setTrustStoreName(java.lang.String trustStoreName)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ELSFaxManager

public ELSFaxManager()
Method Detail

getEmailAddress

public java.lang.String getEmailAddress()

setEmailAddress

public void setEmailAddress(java.lang.String emailAddress)

getPassword

public java.lang.String getPassword()

setPassword

public void setPassword(java.lang.String password)

init

public void init()
          throws ELSException
Throws:
ELSException

sendFax

public SendFaxResponse sendFax(java.lang.String destination,
                               java.lang.String accountCode,
                               java.lang.String userCode,
                               java.lang.String tsi,
                               java.lang.String alternateDeliveryNotice,
                               java.lang.String deliveryNoticeType,
                               java.lang.String faxResolution,
                               java.lang.String to,
                               java.lang.String from,
                               java.io.File[] attachments)
                        throws ELSException,
                               org.apache.axis.AxisFault
sendFax will iniate the sending of a fax through the Easylink network.

Parameters:
destination - - destination fax number in ITUT format (17326525555)(442076524437)
accountCode - - An account code for tracking purpose (max 16 digits)
userCode - - A user code for tacking. Note this code is needed to use KillFax and ResendFax (20 character unique string)
tsi - - Transmitter subsriber id that appears on desiation fax machine (ex. ACME Purchasing Dept.)
alternateDeliveryNotice - - Alternate email address for delivery notification
deliveryNoticeType - - Type of notification (All, Failures Only, None)
faxResolution - - Fine or Normal
to - - Value that appears in the To:line on Fax Strip header
from - - Value that appears in the From Line on Fax strip header
attachments - - One or more documents that need to be delivered to the destination There must be at least ONE document attached.
Returns:
SendFaxResponse - returns a 19 digit Transaction ID if successful
Throws:
ELSException - - can contain one of the following faults (UserNotRegisteredFault, ServiceNotAvailableFault, invalidArgumentFault, GeneralFault)
org.apache.axis.AxisFault - AxisFault is thrown by underlying Axis SOAP framework.(Potential Faults are UserNotRegisteredFault, FaxNotFoundFault, ServiceNotAvailableFault, InvalidArgumenFault, GeneralFault)

killFax

public KillFaxResponse killFax(java.lang.String userCode)
                        throws ELSException,
                               org.apache.axis.AxisFault
killFax will kill a fax that is in progress in he Easylink network

Parameters:
userCode - - A user code for tacking. Note this code is needed to use KillFax and ResendFax (20 character unique string)
Returns:
KillFaxResponse
Throws:
ELSException - - Thrown Exception (Potential Faults are UserNotRegisteredFault, FaxNotFoundFault, ServiceNotAvailableFault, InvalidArgumenFault, GeneralFault)
org.apache.axis.AxisFault - AxisFault is thrown by underlying Axis SOAP framework.(Potential Faults are UserNotRegisteredFault, FaxNotFoundFault, ServiceNotAvailableFault, InvalidArgumenFault, GeneralFault)

queryFax

public QueryFaxResponse queryFax(java.lang.String userCode)
                          throws ELSException,
                                 org.apache.axis.AxisFault
queryFax will get the status of a fax.

Parameters:
userCode - - 20 Character Uniuque string supplied by sender. Same as used for sendFax
Returns:
- QeuryFaxResponse object with Fax results. Status field will contain Success, Fail or Pending.
Throws:
ELSException - - Exception containing one of the following faults (UserNotRegisteredFault, FaxNotFoundFault, ServiceNotAvailableFault, InvalidArgumentFault, GeneralFault)
org.apache.axis.AxisFault - AxisFault is thrown by underlying Axis SOAP framework.(Potential Faults are UserNotRegisteredFault, FaxNotFoundFault, ServiceNotAvailableFault, InvalidArgumenFault, GeneralFault)

resendFax

public ResendFaxResponse resendFax(java.lang.String userCode,
                                   java.lang.String destination)
                            throws ELSException,
                                   org.apache.axis.AxisFault
resendFax can be used to resend a fax that had previously failed in all its attempts to deliver. The QueryFax method should have returned a status of Failed.

Parameters:
userCode - - A user code for tacking. Note this code is needed to use KillFax and ResendFax (20 character unique string)
destination - - Destination where the fax is to be resent
Returns:
ResendFaxResponse - status of Success or Failure
Throws:
ELSException - - Thrown Exception
org.apache.axis.AxisFault - - Axis Fault(Potential Faults are UserNotRegisteredFault, FaxNotFoundFault, ServiceNotAvailableFault, InvalidArgumenFault, GeneralFault)

getHost

public java.lang.String getHost()

setHost

public void setHost(java.lang.String host)

getPort

public int getPort()

setPort

public void setPort(int port)

isSecured

public boolean isSecured()

setSecured

public void setSecured(boolean secured)

getTrustStoreName

public java.lang.String getTrustStoreName()

setTrustStoreName

public void setTrustStoreName(java.lang.String trustStoreName)

getEndPoint

public java.net.URL getEndPoint()

setEndPoint

public void setEndPoint(java.net.URL endPoint)