com.e_c_group.bwptk
Class GroupAccessDevice

java.lang.Object
  extended by com.e_c_group.bwptk.AccessDevice
      extended by com.e_c_group.bwptk.GroupAccessDevice

public class GroupAccessDevice
extends AccessDevice


Method Summary
static GroupAccessDevice create(Group g, java.lang.String deviceName, java.lang.String deviceType, java.lang.String macAddress)
          Create a new device.
 boolean delete()
          Delete this access device and everything attached to it.
 java.lang.String getAccessDeviceProtocol()
           
 java.util.List<AccessDeviceUser> getAccessDeviceUsers()
          Method to return a list of the Users of the Access Device
 java.lang.String getConfigurationFileName()
           
 java.lang.String getConfigurationMode()
           
 java.lang.String getDescription()
           
 java.lang.String getDeviceType()
           
 Group getGroup()
           
static GroupAccessDevice getGroupAccessDevice(Group group, java.lang.String deviceName)
           
 java.lang.String getLevel()
          TODO: Implement Method
 java.lang.String getMacAddress()
           
 java.lang.String getNetAddress()
           
 java.lang.String getOutboundProxyServerNetAddress()
           
 java.lang.String getPhysicalLocation()
           
 java.lang.String getPort()
           
 java.lang.String getSerialNumber()
           
 java.lang.String getStatus()
           
 java.lang.String getStunServerNetAddress()
           
 java.lang.String getTransportProtocol()
           
 java.util.List<User> getUserList()
           
static boolean migrateGroupAccessDevice(BroadWorksServer bws, java.io.PrintStream out, GroupAccessDevice oldGad, java.lang.String newServiceProviderId, java.lang.String newGroupId)
          Deletes the given device, and replaces it with a new device of the same name having a different group.
static boolean modify(Group g, java.lang.String deviceName, java.lang.String macAddress)
          Modify the MAC Address of a new device.
static boolean modifyDeviceWithNewMacAddress(BroadWorksServer bws, java.io.PrintStream out, GroupAccessDevice Gad, java.lang.String newMacAddress)
           
 boolean rebuild()
          2011.06.15 02:03:27:946 EDT | Audit | write7690102 | ecgsupport | System | GroupAccessDeviceModifyRequest14 36F5708239785F2F7219ED6EDFA5FF71 stage2 Invision_Communications IP 550 - 0004F219ADA8 SIP 2.0 0004F219ADA8 Default false
static boolean reincarnateDeviceWithNewDeviceName(BroadWorksServer bws, java.io.PrintStream out, GroupAccessDevice oldGad, java.lang.String newDeviceName)
          Deletes the given device, and replaces it with a new name of the same device type.
static boolean reincarnateDeviceWithNewDeviceType(BroadWorksServer bws, java.io.PrintStream out, GroupAccessDevice oldGad, java.lang.String newDeviceType)
          Deletes the given device, and replaces it with a new device of the same name having the new device type.
 boolean reset()
          Reset this device.
static boolean setConfigurationMode(Group g, java.lang.String deviceName, java.lang.String configurationMode)
          Configuration Mode can be one of - {'Default'|'Manual'|'Custom'}
 boolean syncAccessDeviceToDatabase(java.sql.Connection con)
          This method Synchronizes an Access Device to a SQL database.
static void syncAllAccessDevicesToDatabase(BroadWorksServer bws, java.sql.Connection con)
          This synchronizes every AccessDevice in a BroadWorks Server to a SQL database
 java.lang.String toString()
          Method to return a string of information on the Access Device
 
Methods inherited from class com.e_c_group.bwptk.AccessDevice
getAccessDevice, getAccessDevice, getDeviceName, setDeviceName
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Method Detail

getGroup

public Group getGroup()
Returns:
Group

getGroupAccessDevice

public static GroupAccessDevice getGroupAccessDevice(Group group,
                                                     java.lang.String deviceName)
                                              throws BwptkException
Throws:
BwptkException

getLevel

public java.lang.String getLevel()
Description copied from class: AccessDevice
TODO: Implement Method

Specified by:
getLevel in class AccessDevice
Returns:
"Group" as string.

getMacAddress

public java.lang.String getMacAddress()
                               throws BwptkException
Throws:
BwptkException

getConfigurationMode

public java.lang.String getConfigurationMode()
                                      throws BwptkException
Throws:
BwptkException

getDeviceType

public java.lang.String getDeviceType()
                               throws BwptkException
Throws:
BwptkException

getAccessDeviceProtocol

public java.lang.String getAccessDeviceProtocol()
                                         throws BwptkException
Throws:
BwptkException

getNetAddress

public java.lang.String getNetAddress()
                               throws BwptkException
Throws:
BwptkException

getPort

public java.lang.String getPort()
                         throws BwptkException
Throws:
BwptkException

getOutboundProxyServerNetAddress

public java.lang.String getOutboundProxyServerNetAddress()
                                                  throws BwptkException
Throws:
BwptkException

getStunServerNetAddress

public java.lang.String getStunServerNetAddress()
                                         throws BwptkException
Throws:
BwptkException

getSerialNumber

public java.lang.String getSerialNumber()
                                 throws BwptkException
Throws:
BwptkException

getDescription

public java.lang.String getDescription()
                                throws BwptkException
Throws:
BwptkException

getStatus

public java.lang.String getStatus()
                           throws BwptkException
Throws:
BwptkException

getConfigurationFileName

public java.lang.String getConfigurationFileName()
                                          throws BwptkException
Throws:
BwptkException

getPhysicalLocation

public java.lang.String getPhysicalLocation()
                                     throws BwptkException
Throws:
BwptkException

getTransportProtocol

public java.lang.String getTransportProtocol()
                                      throws BwptkException
Throws:
BwptkException

toString

public java.lang.String toString()
Method to return a string of information on the Access Device

Overrides:
toString in class java.lang.Object
Returns:
String containing ServiceProviderId, groupId, deviceName, deviceType, and macAddress

getAccessDeviceUsers

public java.util.List<AccessDeviceUser> getAccessDeviceUsers()
                                                      throws BwptkException
Method to return a list of the Users of the Access Device

Returns:
Users of the Access Device as 'List'
Throws:
BwptkException

delete

public boolean delete()
               throws BwptkException
Delete this access device and everything attached to it.

Returns:
True if successful
Throws:
BwptkException

create

public static GroupAccessDevice create(Group g,
                                       java.lang.String deviceName,
                                       java.lang.String deviceType,
                                       java.lang.String macAddress)
                                throws BwptkException
Create a new device. Uses a command like this:
 <?xml version="1.0" encoding="ISO-8859-1"?>
                <BroadsoftDocument protocol="OCI" xmlns="C" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
                <sessionId xmlns="">E0E6E4D681257F8903D38555893484E1</sessionId>
                <command xsi:type="GroupAccessDeviceAddRequest14" xmlns="">
                        <serviceProviderId>vwave_sp</serviceProviderId>
                        <groupId>ECG LAB</groupId>
                        <deviceName>DEVICE_NAME_1</deviceName>
                        <deviceType>2Wire HomePortal</deviceType>
                        <macAddress>11:11:11:11:11:11</macAddress>
                </command>
                </BroadsoftDocument>
 

Returns:
the newly-created Group Access Device if it can be created, or null if it cannot be created.
Throws:
BwptkException

rebuild

public boolean rebuild()
                throws BwptkException
2011.06.15 02:03:27:946 EDT | Audit | write7690102 | ecgsupport | System | GroupAccessDeviceModifyRequest14 36F5708239785F2F7219ED6EDFA5FF71 stage2 Invision_Communications IP 550 - 0004F219ADA8 SIP 2.0 0004F219ADA8 Default false

Throws:
BwptkException

reset

public boolean reset()
              throws BwptkException
Reset this device.
 { @code
                
                
                21EE9C95254BCDCF2CF022A1AC334E34
                
                        vwave_sp
                        ECG
                        ip650_0004f2125821
                
                
 }

Throws:
BwptkException

reincarnateDeviceWithNewDeviceType

public static boolean reincarnateDeviceWithNewDeviceType(BroadWorksServer bws,
                                                         java.io.PrintStream out,
                                                         GroupAccessDevice oldGad,
                                                         java.lang.String newDeviceType)
                                                  throws java.lang.Exception
Deletes the given device, and replaces it with a new device of the same name having the new device type. This moves the line assignments and Shared Call Appearance assignmenst from the old device to the new device. This method retains the old device's MAC adress, but nothing else.

Parameters:
bws - BroadWorksServer
oldGad - The original GroupAccessDevice
newDeviceType - The desired new DeviceType
Returns:
True is successful
Throws:
java.lang.Exception

migrateGroupAccessDevice

public static boolean migrateGroupAccessDevice(BroadWorksServer bws,
                                               java.io.PrintStream out,
                                               GroupAccessDevice oldGad,
                                               java.lang.String newServiceProviderId,
                                               java.lang.String newGroupId)
                                        throws BwptkException
Deletes the given device, and replaces it with a new device of the same name having a different group.

Parameters:
bws - BroadWorksServer
out - The PrintStream
oldGad - The original GroupAccessDevice
newServiceProviderId - The desured Service Provider ID
newGroupId - The desired Group ID
Returns:
List with logging output.
Throws:
BwptkException

setConfigurationMode

public static boolean setConfigurationMode(Group g,
                                           java.lang.String deviceName,
                                           java.lang.String configurationMode)
                                    throws BwptkException
Configuration Mode can be one of - {'Default'|'Manual'|'Custom'}

Throws:
BwptkException

getUserList

public java.util.List<User> getUserList()
                                 throws BwptkException
Throws:
BwptkException

modify

public static boolean modify(Group g,
                             java.lang.String deviceName,
                             java.lang.String macAddress)
                      throws BwptkException
Modify the MAC Address of a new device. Uses a command like this:
 <?xml version="1.0" encoding="ISO-8859-1"?>
                <BroadsoftDocument protocol="OCI" xmlns="C" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
                <sessionId xmlns="">E0E6E4D681257F8903D38555893484E1</sessionId>
                <command xsi:type="GroupAccessDeviceModifyRequest14" xmlns="">
                        <serviceProviderId>vwave_sp</serviceProviderId>
                        <groupId>ECG LAB</groupId>
                        <deviceName>DEVICE_NAME_1</deviceName>
                        <macAddress>111111111111</macAddress>
                </command>
                </BroadsoftDocument>
 

Returns:
a boolean value to represent success or failure.
Throws:
BwptkException

modifyDeviceWithNewMacAddress

public static boolean modifyDeviceWithNewMacAddress(BroadWorksServer bws,
                                                    java.io.PrintStream out,
                                                    GroupAccessDevice Gad,
                                                    java.lang.String newMacAddress)
                                             throws java.lang.Exception
Throws:
java.lang.Exception

reincarnateDeviceWithNewDeviceName

public static boolean reincarnateDeviceWithNewDeviceName(BroadWorksServer bws,
                                                         java.io.PrintStream out,
                                                         GroupAccessDevice oldGad,
                                                         java.lang.String newDeviceName)
                                                  throws BwptkException
Deletes the given device, and replaces it with a new name of the same device type. This moves the line assignments and Shared Call Appearance assignmenst from the old device to the new device. This method retains the old device's MAC address and name, but nothing else.

Throws:
BwptkException

syncAccessDeviceToDatabase

public boolean syncAccessDeviceToDatabase(java.sql.Connection con)
                                   throws java.sql.SQLException,
                                          BwptkException
This method Synchronizes an Access Device to a SQL database.

Parameters:
con - The SQL database with which to synchronize.
Throws:
java.sql.SQLException
BwptkException

syncAllAccessDevicesToDatabase

public static void syncAllAccessDevicesToDatabase(BroadWorksServer bws,
                                                  java.sql.Connection con)
                                           throws java.sql.SQLException,
                                                  BwptkException
This synchronizes every AccessDevice in a BroadWorks Server to a SQL database

Parameters:
bws - The BroadWorks server to list AccessDevices from.
con - The SQL server with which to synchronize the AccessDevices.
Throws:
java.sql.SQLException
BwptkException