com.e_c_group.bwptk
Class AccessDeviceUser

java.lang.Object
  extended by com.e_c_group.bwptk.AccessDeviceUser
All Implemented Interfaces:
java.lang.Comparable

public class AccessDeviceUser
extends java.lang.Object
implements java.lang.Comparable

A user of an access device, such as a dedicated line or a shared call appearance. Note that this object can survive deletion on the server. It doesn't correspond simply to something editable in BroadWorks; it's one of the rows from GroupAccessDeviceGetUserListResponse.


Constructor Summary
AccessDeviceUser(AccessDevice ad, User u, java.lang.String linePort, java.lang.String endpointType, boolean isPrimary, java.lang.String order)
           
 
Method Summary
 boolean assignToGroupAccessDevice()
          Assign this to to a device.
 int compareTo(java.lang.Object other)
          Compare two AccessDeviceUser objects based on the Order.
 AccessDevice getAccessDevice()
           
 java.lang.String getEndpointType()
           
 java.lang.String getLinePort()
           
 int getOrder()
           
 User getUser()
           
 boolean isPrimary()
           
 boolean isSharedCallAppearance()
           
 boolean setIsPrimary(boolean newValue)
           
 void setNewDeviceName(java.lang.String newDeviceName)
          Assigns a new device name.
 boolean unassign()
          Remove this assignment from the system: For a user's primary line assignment, set the user's endpoint to unassigned; For a Shared Call Appearance, delete the SCA asssignment.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AccessDeviceUser

public AccessDeviceUser(AccessDevice ad,
                        User u,
                        java.lang.String linePort,
                        java.lang.String endpointType,
                        boolean isPrimary,
                        java.lang.String order)
                 throws BwptkException
Throws:
BwptkException
Method Detail

getAccessDevice

public AccessDevice getAccessDevice()

getUser

public User getUser()

getEndpointType

public java.lang.String getEndpointType()

getLinePort

public java.lang.String getLinePort()

isPrimary

public boolean isPrimary()

getOrder

public int getOrder()

isSharedCallAppearance

public boolean isSharedCallAppearance()
Returns:
True only if the endpointType is "Shared Call Appearance".

setIsPrimary

public boolean setIsPrimary(boolean newValue)
                     throws BwptkException
Throws:
BwptkException

unassign

public boolean unassign()
                 throws BwptkException
Remove this assignment from the system:
  1. For a user's primary line assignment, set the user's endpoint to unassigned;
  2. For a Shared Call Appearance, delete the SCA asssignment.

    Throws:
    BwptkException

assignToGroupAccessDevice

public boolean assignToGroupAccessDevice()
                                  throws BwptkException
Assign this to to a device. This creates the assignment identified in this object.

Throws:
BwptkException

setNewDeviceName

public void setNewDeviceName(java.lang.String newDeviceName)
Assigns a new device name.

Parameters:
newDeviceName -

compareTo

public int compareTo(java.lang.Object other)
Compare two AccessDeviceUser objects based on the Order. This is used to ensure entries are added to BroadWorks in the correct order. The "order" field is parsed as an Integer and compared numerically, using java.lang.Integer.

Specified by:
compareTo in interface java.lang.Comparable
Parameters:
other - The AccessDeviceUser to compare to.