gui.touchtone
Class DialUtils

java.lang.Object
  extended by gui.touchtone.DialUtils

public class DialUtils
extends java.lang.Object

Copyright DocJava, inc. User: lyon

Date: Jul 22, 2005

Time: 5:22:32 PM


Constructor Summary
DialUtils()
           
 
Method Summary
static void doModemDial(java.lang.String text, DialBean db, SerialPortBean spb)
          Uses the SerialPortBeanUtils to dial the modem, modfying the dial text, as needed.
static java.lang.String filterOutSpacesParensAndDashes(java.lang.String s)
           
static java.lang.String getATPrefix(DialBean dialBean)
           
static java.lang.String getDialString(java.lang.String number, DialBean dialBean)
          Get dial string inserts the calling card number, AT command prefix, tests for tollFree ness and filters out spaces parens and dashes
static java.lang.String getFilteredDialString(java.lang.String number, DialBean db)
          Inputs the number and dial bean, returns a dial string with no spaces or parens or dashes.
static boolean isLongDistance(java.lang.String number)
           
static boolean isTollFree(java.lang.String number)
           
static void testDoModemDial()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DialUtils

public DialUtils()
Method Detail

testDoModemDial

public static void testDoModemDial()
                            throws UnsupportedCommOperationException,
                                   NoSuchPortException,
                                   java.io.IOException,
                                   PortInUseException
Throws:
UnsupportedCommOperationException
NoSuchPortException
java.io.IOException
PortInUseException

getFilteredDialString

public static java.lang.String getFilteredDialString(java.lang.String number,
                                                     DialBean db)
Inputs the number and dial bean, returns a dial string with no spaces or parens or dashes. Uses getDialString

Parameters:
number -
db -
Returns:

filterOutSpacesParensAndDashes

public static java.lang.String filterOutSpacesParensAndDashes(java.lang.String s)

getDialString

public static java.lang.String getDialString(java.lang.String number,
                                             DialBean dialBean)
Get dial string inserts the calling card number, AT command prefix, tests for tollFree ness and filters out spaces parens and dashes

Parameters:
number -
dialBean -
Returns:

isTollFree

public static boolean isTollFree(java.lang.String number)

isLongDistance

public static boolean isLongDistance(java.lang.String number)

getATPrefix

public static java.lang.String getATPrefix(DialBean dialBean)

doModemDial

public static void doModemDial(java.lang.String text,
                               DialBean db,
                               SerialPortBean spb)
                        throws UnsupportedCommOperationException,
                               java.io.IOException,
                               NoSuchPortException,
                               PortInUseException
Uses the SerialPortBeanUtils to dial the modem, modfying the dial text, as needed.

Parameters:
text -
db -
spb -
Throws:
UnsupportedCommOperationException
java.io.IOException
NoSuchPortException
PortInUseException