com.e_c_group.bwptk
Class User

java.lang.Object
  extended by com.e_c_group.bwptk.User

public class User
extends java.lang.Object

The User Class represents a User in BroadWorks. Each User must have an ID and a Group assignment.


Method Summary
static User add(Group g, java.lang.String userId, java.lang.String lastName, java.lang.String firstName, java.lang.String callingLineIdLastName, java.lang.String callingLineIdFirstName, java.lang.String callingLineIdPhoneNumber, java.lang.String password, java.lang.String language, java.lang.String timeZone)
          This static request creates a new User.
 boolean assignExtension(java.lang.String extension)
          Assign an extension to a User
 boolean assignService(java.lang.String serviceName)
          Assign a service to this user.
 boolean assignTelephoneNumber(java.lang.String telephoneNumber)
          Assign a telephone number to a User
 boolean assignToDevice(AccessDeviceUser adu)
          Assign this user to the specified group access device.
 boolean callForwardBusyModify(java.lang.String isActive, java.lang.String forwardToPhoneNumber)
          Configure the Call Forward Busy service for a user.
 boolean callForwardNoAnswerModify(java.lang.String isActive, java.lang.String forwardToPhoneNumber, java.lang.String numberOfRings)
          Configure the Call Forward No-Answer service for a user.
 boolean callingLineIDDeliveryBlockingModify(java.lang.String active)
          Modify a User's Calling Line ID Delivery Blocking
static boolean delete(Group g, java.lang.String userId)
          Deletes a User from BroadWorks
 java.lang.String getAccessDeviceLevel()
          Retrieve the User's Access Device Level
 java.lang.String getAccessDeviceName()
          Retrieve the name of a User's Access Device
 java.util.List<Pair<java.lang.String,java.lang.Boolean>> getAssignedServicePacks()
          Get the User's assigned service packs.
 java.util.List<Pair<java.lang.String,java.lang.Boolean>> getAssignedServices()
          Get the User's assigned services.
 java.lang.String getExtension()
          Retrieve a User's extension
 java.lang.String getFirstName()
          Retrieve the User's first name
 Group getGroup()
          Retrieves the User's Group
 GroupAccessDevice getGroupAccessDevice()
          Retrieve the Group Access Device object for the User
static java.util.List<GroupAccessDevice> getGroupAccessDeviceListByUser(User u)
          Retrieve the Group Access Devices for a specified User
static java.lang.String getGroupMailServerEmailAddress(BroadWorksServer bws, java.lang.String userId)
          Returns the Group Mail Server email address for the specified User.
static java.lang.String getGroupMailServerPassword(BroadWorksServer bws, java.lang.String userId)
          Returns the Group Mail Server Password for the specified User.
static java.lang.String getGroupMailServerUserId(BroadWorksServer bws, java.lang.String userId)
          Returns the Group Mail Server user id for the specified User.
 java.lang.String getLastName()
          Retrieve the User's last name
 java.lang.String getLinePort()
          Retrieve the User's line/port
 java.lang.String getPhoneNumber()
          Retrieve a User's phone number
 UserRegistration getRegistration()
          Retrieve the UserRegistration object for this User.
static User getUser(Group group, java.lang.String userId)
          Retrieve a specific User object
 Response getUserGetResponse14sp4()
          Retrieve the User Response from BroadWorks
 java.lang.String getUserId()
          Retrieves the UserID
static java.util.List<User> getUsersInGroup(Group group)
          Retrieve all Users within the specified Group
 java.lang.String getVoiceMailCarbonCopyAddress()
          Retrieves the VoiceMail Carbon Copy Address as a String.
 boolean hasAccessDevice()
          Retrieve whether the User has an Access Device listed
 boolean isRegistered()
          Return's true if the User is registered.
static void listUserIdsInGroup(Group g, java.io.PrintStream out)
          List all UserIds given a specified Group
 boolean polycomPhoneServicesModify(java.lang.String accessDevice, java.lang.String integratePhoneDirectoryWithBroadWorks, java.lang.String includeUserPersonalPhoneListInDirectory, java.lang.String includeGroupCustomContactDirectoryInDirectory, java.lang.String groupCustomContactDirectory)
          Modify a User's Polycom Phone Services
 java.lang.String randomizeAuthentication(boolean resetDevices, boolean includeUser)
          Randomizes the authentication username and password for a User.
 java.lang.String randomizePassword()
          Randomizes the authentication password for a User.
 java.lang.String randomizeUsername()
          Randomizes the authentication username for a User.
 boolean resetAccessDevices()
          Reset's all Access Devices for the User
static java.util.List<User> searchForUser(BroadWorksServer bws, java.lang.String sp, java.lang.String mode, java.lang.String criteria)
          Performs a search for a User and returns a list of candidates.
static boolean serviceIsAssigned(BroadWorksServer bws, java.lang.String userId, java.lang.String serviceName)
          Returns true if the specified service is assigned to the specified User.
 boolean serviceIsAssigned(java.lang.String serviceName)
          Returns true if the specified service is assigned to the User.
static boolean setAdvancedUserVoiceManagementOptions(BroadWorksServer bws, java.lang.String userId, java.lang.String groupServerEmailAddress, java.lang.String groupServerUserId, java.lang.String groupServerPassword)
          Modifies a User's Advanced Voice Management settings.
 boolean setAuthentication(java.lang.String authUsername, java.lang.String authPassword)
          Set the User's authentication username and password.
 boolean setAuthenticationPassword(java.lang.String authPassword)
          Set the User's authentication password
 boolean setAuthenticationUsername(java.lang.String authUsername)
          Set the User's authentication username
static boolean setCallFowardingNotReachable(BroadWorksServer bws, java.lang.String userId, boolean isActive, java.lang.String forwardToPhoneNumber)
          Modifies a User's Call Forwarding Not Reachable settings.
 boolean setLastName(java.lang.String lastName)
          Set the User's last name
 boolean setLastNameToUpperCase()
          This routine is provided to make a trivial change to a user.
static void setPrimaryUserPerDeviceByUser(User u)
          Sets a User as Primary User for all Group Access Devices Assigned
 boolean setRemoteOfficePhoneNumber(java.lang.String remoteOfficePhoneNumber)
          Set the Remote Office Phone Number for the User
 boolean setTimeZone(java.lang.String timezone)
          Set the User's timezone
static boolean setUserCallForwardingAlways(BroadWorksServer bws, java.lang.String userId, boolean isActive, boolean isRingSplashActive, java.lang.String fowardToPhoneNumber)
          Modifies a User's Call Forwarding Always settings.
static boolean setUserCommPilotExpressProfile(BroadWorksServer bws, java.lang.String userId, java.lang.String profile)
          Sets a User's CommPilot Express Profile
static boolean setUserDoNotDisturb(BroadWorksServer bws, java.lang.String userId, boolean isActive, boolean isRingSplashActive)
          Modifies a User's Do Not Disturb settings.
static boolean setUserOutgoingMessageWaitingIndicatorOptions(BroadWorksServer bws, java.lang.String userId, boolean isActive, java.lang.String phoneNumber)
          Modifies a User's Outgoing Message Waiting Indicator settings.
static boolean setUserSimultaneousRing(BroadWorksServer bws, java.lang.String userId, boolean isActive, boolean doNotRingIfOnCall)
          Modifies a User's Simultaneous Ring settings.
static boolean setUserVoiceManagementOptions(BroadWorksServer bws, java.lang.String userId, boolean isActive, boolean alwaysRedirectToVoiceMail)
          Modifies a User's Voice Management settings.
static void syncAllUsersToDatabase(BroadWorksServer bws, java.sql.Connection con)
          This synchronizes every User in a BroadWorks Server to a SQL database
static void syncAllUsersToDatabaseIgnoringServices(BroadWorksServer bws, java.sql.Connection con)
          This synchronizes every User in a BroadWorks Server to a SQL database but does not Sync user services.
 java.util.List<java.lang.String> syncUserToDatabase(java.sql.Connection con)
          This synchronizes the User to a SQL server with a broadworks_users and broadworks_users_services table.
 void syncUserToDatabaseIgnoringServices(java.sql.Connection con)
          This synchronizes the User to a SQL server with a broadworks_users table
 java.lang.String toString()
           
 boolean unassignFromDevice()
          Unassign this user from its device.
 boolean unassignService(java.lang.String serviceName)
          Unassign a service to this user.
static Response userCallForwardingAlwaysGetRequest(BroadWorksServer bws, java.lang.String userId)
          Retrieves the Response element for a User's Call Forwarding Always settings.
static boolean userCallForwardingAlwaysIsActive(BroadWorksServer bws, java.lang.String userId)
          Returns true if User Call Forwarding Always is active for the specified User.
static Response userCallForwardingNotReachableGetRequest(BroadWorksServer bws, java.lang.String userId)
          Retrieves the Response element for a User's Call Forwarding Not Reachable settings.
static Response userCallForwardingSelectiveGetRequest(BroadWorksServer bws, java.lang.String userId)
          Retrieves the Response element for a User's Call Forwarding Selective settings.
static boolean userCallForwardingSelectiveIsActive(BroadWorksServer bws, java.lang.String userId)
          Returns true if User Call Forwarding Selective is active for the specified User.
static Response userCommPilotExpressGetRequest(BroadWorksServer bws, java.lang.String userId)
          Retrieves the Response element for a user's CommPilotExpress settings.
static void userDetailByGroup(BroadWorksServer bws, java.io.PrintStream out, Group g)
          Display the User Details for all User's in the specified Group
static void userDetailByServiceProviderCommand(BroadWorksServer bws, java.io.PrintStream out, ServiceProvider sp)
          Display the User Details for all User's in the specified Service Provider
static void userDetailBySystemCommand(BroadWorksServer bws, java.io.PrintStream out)
          Display the User Detail's for all Users in the BroadWorks system
static Response userDoNotDisturbGetRequest(BroadWorksServer bws, java.lang.String userId)
          Retrieves the Response element for a User's Do Not Disturb settings.
static boolean userDoNotDisturbIsActive(BroadWorksServer bws, java.lang.String userId)
          Returns true if Do Not Disturb is active for the specified User.
static void userServiceIsAssignedBySystemCommand(BroadWorksServer bws, java.io.PrintStream out, java.lang.String serviceName)
          Generates a report checking if a service is assigned to all Users within the system.
static boolean userSimultaneousRingIsActive(BroadWorksServer bws, java.lang.String userId)
          Returns true if Simultaneous Ring is active for the designated User.
static Response UserSimultaneousRingPersonalGetRequest14sp4(BroadWorksServer bws, java.lang.String userId)
          Retrieves the Response element for a User's Simultaneous Ring Personal settings.
static Response userVoiceMessagingUserGetAdvancedVoiceManagementRequest(BroadWorksServer bws, java.lang.String userId)
          Retrieves the Response element for a User's Advanced Voice Management settings.
 boolean voiceMailPasscodeModify(java.lang.String newPasscode)
          Sets the Voice Portal Passcode for the User.
 boolean webPortalPasswordModify(java.lang.String newPassword)
          Changes the WebPortal Password.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Method Detail

getUserId

public java.lang.String getUserId()
Retrieves the UserID


getGroup

public Group getGroup()
Retrieves the User's Group


toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

getUserGetResponse14sp4

public Response getUserGetResponse14sp4()
                                 throws BwptkException
Retrieve the User Response from BroadWorks

Returns:
The Response object corresponding to a User
Throws:
BwptkException

getPhoneNumber

public java.lang.String getPhoneNumber()
                                throws BwptkException
Retrieve a User's phone number

Throws:
BwptkException

getExtension

public java.lang.String getExtension()
                              throws BwptkException
Retrieve a User's extension

Throws:
BwptkException

hasAccessDevice

public boolean hasAccessDevice()
                        throws BwptkException
Retrieve whether the User has an Access Device listed

Throws:
BwptkException

getAccessDeviceName

public java.lang.String getAccessDeviceName()
                                     throws BwptkException
Retrieve the name of a User's Access Device

Throws:
BwptkException

getAccessDeviceLevel

public java.lang.String getAccessDeviceLevel()
                                      throws BwptkException
Retrieve the User's Access Device Level

Returns:
"Group" if the user is assigned to a group-level access device
Throws:
BwptkException

getFirstName

public java.lang.String getFirstName()
                              throws BwptkException
Retrieve the User's first name

Throws:
BwptkException

getLastName

public java.lang.String getLastName()
                             throws BwptkException
Retrieve the User's last name

Throws:
BwptkException

getLinePort

public java.lang.String getLinePort()
                             throws BwptkException
Retrieve the User's line/port

Throws:
BwptkException

getUser

public static User getUser(Group group,
                           java.lang.String userId)
                    throws BwptkException
Retrieve a specific User object

Parameters:
group -
userId -
Throws:
BwptkException

getUsersInGroup

public static java.util.List<User> getUsersInGroup(Group group)
                                            throws BwptkException
Retrieve all Users within the specified Group

Parameters:
group -
Throws:
BwptkException

listUserIdsInGroup

public static void listUserIdsInGroup(Group g,
                                      java.io.PrintStream out)
                               throws BwptkException
List all UserIds given a specified Group

Parameters:
g - The Group to list Ids from
out - The PrintStream to output to
Throws:
BwptkException

getGroupAccessDevice

public GroupAccessDevice getGroupAccessDevice()
                                       throws BwptkException
Retrieve the Group Access Device object for the User

Throws:
BwptkException

assignToDevice

public boolean assignToDevice(AccessDeviceUser adu)
                       throws BwptkException
Assign this user to the specified group access device.
 <?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="UserModifyRequest14" xmlns="">
                                        <userId>ecg9822_1</userId>
                                        <endpoint>
                                                <accessDeviceEndpoint>
                                                        <accessDevice>
                                                                <deviceLevel>Group</deviceLevel>
                                                                <deviceName>DEVICE_NAME_1</deviceName>
                                                        </accessDevice>
                                                        <linePort>ecg9822_1_lineport@vwave.net</linePort>
                                                </accessDeviceEndpoint>
                                        </endpoint>
                                </command>
                        </BroadsoftDocument>
 

Parameters:
adu - The AccessDeviceUser to assign
Throws:
BwptkException

setRemoteOfficePhoneNumber

public boolean setRemoteOfficePhoneNumber(java.lang.String remoteOfficePhoneNumber)
                                   throws BwptkException
Set the Remote Office Phone Number for the User

Parameters:
remoteOfficePhoneNumber -
Throws:
BwptkException

setLastName

public boolean setLastName(java.lang.String lastName)
                    throws BwptkException
Set the User's last name

Parameters:
lastName -
Throws:
BwptkException

setLastNameToUpperCase

public boolean setLastNameToUpperCase()
                               throws BwptkException
This routine is provided to make a trivial change to a user. Under many setups, this will cause the user's phone configuration file to be regenerated. But it does not make a change that will affect SIP signaling.

Throws:
BwptkException

assignTelephoneNumber

public boolean assignTelephoneNumber(java.lang.String telephoneNumber)
                              throws BwptkException
Assign a telephone number to a User

Parameters:
telephoneNumber -
Throws:
BwptkException

assignExtension

public boolean assignExtension(java.lang.String extension)
                        throws BwptkException
Assign an extension to a User

Parameters:
extension -
Throws:
BwptkException

unassignFromDevice

public boolean unassignFromDevice()
                           throws BwptkException
Unassign this user from its device. This generates a request like this:
 <command xsi:type="UserModifyRequest14" xmlns="">
                        <userId>ecg9822_1</userId>
                        <endpoint xsi:nil="true"/>
                </command>
 

Throws:
BwptkException

setAuthentication

public boolean setAuthentication(java.lang.String authUsername,
                                 java.lang.String authPassword)
                          throws BwptkException
Set the User's authentication username and password. This generates a request like this:
 <command xsi:type="UserAuthenticationModifyRequest" xmlns="" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
                <userId>kxtgp550_1</userId>
                <userName>kxtgp550_1</userName>
                        <newPassword>XXXXX</newPassword>
                </command>
 

Throws:
BwptkException

setAuthenticationUsername

public boolean setAuthenticationUsername(java.lang.String authUsername)
                                  throws BwptkException
Set the User's authentication username

Parameters:
authUsername -
Throws:
BwptkException

setAuthenticationPassword

public boolean setAuthenticationPassword(java.lang.String authPassword)
                                  throws BwptkException
Set the User's authentication password

Parameters:
authPassword -
Throws:
BwptkException

setTimeZone

public boolean setTimeZone(java.lang.String timezone)
                    throws BwptkException
Set the User's timezone

Parameters:
timezone -
Throws:
BwptkException

getGroupAccessDeviceListByUser

public static java.util.List<GroupAccessDevice> getGroupAccessDeviceListByUser(User u)
                                                                        throws BwptkException
Retrieve the Group Access Devices for a specified User

Throws:
BwptkException

userDetailBySystemCommand

public static void userDetailBySystemCommand(BroadWorksServer bws,
                                             java.io.PrintStream out)
                                      throws java.lang.Exception
Display the User Detail's for all Users in the BroadWorks system

Parameters:
out - The output PrintStream
Throws:
java.lang.Exception

userDetailByServiceProviderCommand

public static void userDetailByServiceProviderCommand(BroadWorksServer bws,
                                                      java.io.PrintStream out,
                                                      ServiceProvider sp)
                                               throws java.lang.Exception
Display the User Details for all User's in the specified Service Provider

Parameters:
out - The output PrintStream
sp - The Service Provider to look for Users
Throws:
java.lang.Exception

userDetailByGroup

public static void userDetailByGroup(BroadWorksServer bws,
                                     java.io.PrintStream out,
                                     Group g)
                              throws java.lang.Exception
Display the User Details for all User's in the specified Group

Parameters:
out - The output PrintStream
g - The Group to look for Users
Throws:
java.lang.Exception

resetAccessDevices

public boolean resetAccessDevices()
                           throws BwptkException
Reset's all Access Devices for the User

Throws:
BwptkException

randomizePassword

public java.lang.String randomizePassword()
                                   throws BwptkException
Randomizes the authentication password for a User. The password specification is determined by the bwptk configuration file.

Throws:
BwptkException

randomizeUsername

public java.lang.String randomizeUsername()
                                   throws BwptkException
Randomizes the authentication username for a User. The username specification is determined by the bwptk configuration file.

Throws:
BwptkException

randomizeAuthentication

public java.lang.String randomizeAuthentication(boolean resetDevices,
                                                boolean includeUser)
                                         throws BwptkException
Randomizes the authentication username and password for a User. The specifications for the randomization are determined by the bwptk configuration file.

Parameters:
resetDevices - Indicates whether the user's access devices should be reset following the change.
includeUser - Indicates whether the username should be included in the change.
Throws:
BwptkException

setPrimaryUserPerDeviceByUser

public static void setPrimaryUserPerDeviceByUser(User u)
                                          throws BwptkException
Sets a User as Primary User for all Group Access Devices Assigned

Parameters:
u - The User to process
Throws:
BwptkException

add

public static User add(Group g,
                       java.lang.String userId,
                       java.lang.String lastName,
                       java.lang.String firstName,
                       java.lang.String callingLineIdLastName,
                       java.lang.String callingLineIdFirstName,
                       java.lang.String callingLineIdPhoneNumber,
                       java.lang.String password,
                       java.lang.String language,
                       java.lang.String timeZone)
                throws BwptkException
This static request creates a new User.

Parameters:
g - The group to add the user.
userId -
lastName -
firstName -
callingLineIdLastName -
callingLineIdFirstName -
callingLineIdPhoneNumber -
password -
language -
timeZone -
Returns:
This returns the user created.
Throws:
BwptkException

delete

public static boolean delete(Group g,
                             java.lang.String userId)
                      throws BwptkException
Deletes a User from BroadWorks

Parameters:
g - Group of the User
userId - UserId of the User
Returns:
True if successful, False otherwise
Throws:
BwptkException

assignService

public boolean assignService(java.lang.String serviceName)
                      throws BwptkException
Assign a service to this user.

Parameters:
serviceName - The name of the service to assign.
Throws:
BwptkException

unassignService

public boolean unassignService(java.lang.String serviceName)
                        throws BwptkException
Unassign a service to this user.

Parameters:
serviceName - The name of the service to unassign.
Throws:
BwptkException

callForwardBusyModify

public boolean callForwardBusyModify(java.lang.String isActive,
                                     java.lang.String forwardToPhoneNumber)
                              throws BwptkException
Configure the Call Forward Busy service for a user.

Parameters:
isActive -
forwardToPhoneNumber -
Throws:
BwptkException

callForwardNoAnswerModify

public boolean callForwardNoAnswerModify(java.lang.String isActive,
                                         java.lang.String forwardToPhoneNumber,
                                         java.lang.String numberOfRings)
                                  throws BwptkException
Configure the Call Forward No-Answer service for a user.

Parameters:
isActive -
forwardToPhoneNumber -
numberOfRings -
Throws:
BwptkException

getVoiceMailCarbonCopyAddress

public java.lang.String getVoiceMailCarbonCopyAddress()
                                               throws BwptkException
Retrieves the VoiceMail Carbon Copy Address as a String.

Throws:
BwptkException

webPortalPasswordModify

public boolean webPortalPasswordModify(java.lang.String newPassword)
                                throws BwptkException
Changes the WebPortal Password.
<?xml version="1.0" encoding="ISO-8859-1"?>
                        <BroadsoftDocument xmlns="C" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" protocol="OCI">
                                <sessionId xmlns="">10.200.140.114,1348687172.6162</sessionId>
                                <command xmlns="" xsi:type="UserPortalPasscodeModifyRequest">
                                        <userId>2138944961@usdoj.gov</userId>
                                        <newPasscode>*******</newPasscode>
                                </command>
                        </BroadsoftDocument>
 

Parameters:
newPassword -
Throws:
BwptkException

voiceMailPasscodeModify

public boolean voiceMailPasscodeModify(java.lang.String newPasscode)
                                throws BwptkException
Sets the Voice Portal Passcode for the User.

Parameters:
newPasscode -
Throws:
BwptkException

callingLineIDDeliveryBlockingModify

public boolean callingLineIDDeliveryBlockingModify(java.lang.String active)
                                            throws BwptkException
Modify a User's Calling Line ID Delivery Blocking

Parameters:
active -
Throws:
BwptkException

userCommPilotExpressGetRequest

public static Response userCommPilotExpressGetRequest(BroadWorksServer bws,
                                                      java.lang.String userId)
                                               throws BwptkException
Retrieves the Response element for a user's CommPilotExpress settings.

Parameters:
bws -
userId -
Throws:
BwptkException

setUserCommPilotExpressProfile

public static boolean setUserCommPilotExpressProfile(BroadWorksServer bws,
                                                     java.lang.String userId,
                                                     java.lang.String profile)
                                              throws BwptkException
Sets a User's CommPilot Express Profile

Parameters:
bws -
userId -
profile - A profile name or "None"
Throws:
BwptkException

userCallForwardingNotReachableGetRequest

public static Response userCallForwardingNotReachableGetRequest(BroadWorksServer bws,
                                                                java.lang.String userId)
                                                         throws BwptkException
Retrieves the Response element for a User's Call Forwarding Not Reachable settings.

Parameters:
bws -
userId -
Throws:
BwptkException

setCallFowardingNotReachable

public static boolean setCallFowardingNotReachable(BroadWorksServer bws,
                                                   java.lang.String userId,
                                                   boolean isActive,
                                                   java.lang.String forwardToPhoneNumber)
                                            throws BwptkException
Modifies a User's Call Forwarding Not Reachable settings.

Parameters:
bws -
userId -
isActive -
forwardToPhoneNumber -
Throws:
BwptkException

userCallForwardingSelectiveGetRequest

public static Response userCallForwardingSelectiveGetRequest(BroadWorksServer bws,
                                                             java.lang.String userId)
                                                      throws BwptkException
Retrieves the Response element for a User's Call Forwarding Selective settings.

Parameters:
bws -
userId -
Throws:
BwptkException

userCallForwardingSelectiveIsActive

public static boolean userCallForwardingSelectiveIsActive(BroadWorksServer bws,
                                                          java.lang.String userId)
                                                   throws BwptkException
Returns true if User Call Forwarding Selective is active for the specified User.

Parameters:
bws -
userId -
Throws:
BwptkException

userCallForwardingAlwaysGetRequest

public static Response userCallForwardingAlwaysGetRequest(BroadWorksServer bws,
                                                          java.lang.String userId)
                                                   throws BwptkException
Retrieves the Response element for a User's Call Forwarding Always settings.

Parameters:
bws -
userId -
Throws:
BwptkException

userCallForwardingAlwaysIsActive

public static boolean userCallForwardingAlwaysIsActive(BroadWorksServer bws,
                                                       java.lang.String userId)
                                                throws BwptkException
Returns true if User Call Forwarding Always is active for the specified User.

Parameters:
bws -
userId -
Throws:
BwptkException

setUserCallForwardingAlways

public static boolean setUserCallForwardingAlways(BroadWorksServer bws,
                                                  java.lang.String userId,
                                                  boolean isActive,
                                                  boolean isRingSplashActive,
                                                  java.lang.String fowardToPhoneNumber)
                                           throws BwptkException
Modifies a User's Call Forwarding Always settings.

Parameters:
bws -
userId -
isActive -
isRingSplashActive -
fowardToPhoneNumber -
Throws:
BwptkException

userDoNotDisturbGetRequest

public static Response userDoNotDisturbGetRequest(BroadWorksServer bws,
                                                  java.lang.String userId)
                                           throws BwptkException
Retrieves the Response element for a User's Do Not Disturb settings.

Parameters:
bws -
userId -
Throws:
BwptkException

userDoNotDisturbIsActive

public static boolean userDoNotDisturbIsActive(BroadWorksServer bws,
                                               java.lang.String userId)
                                        throws BwptkException
Returns true if Do Not Disturb is active for the specified User.

Parameters:
bws -
userId -
Throws:
BwptkException

setUserDoNotDisturb

public static boolean setUserDoNotDisturb(BroadWorksServer bws,
                                          java.lang.String userId,
                                          boolean isActive,
                                          boolean isRingSplashActive)
                                   throws BwptkException
Modifies a User's Do Not Disturb settings.

Parameters:
bws -
userId -
isActive -
isRingSplashActive -
Throws:
BwptkException

UserSimultaneousRingPersonalGetRequest14sp4

public static Response UserSimultaneousRingPersonalGetRequest14sp4(BroadWorksServer bws,
                                                                   java.lang.String userId)
                                                            throws BwptkException
Retrieves the Response element for a User's Simultaneous Ring Personal settings.

Parameters:
bws -
userId -
Throws:
BwptkException

userSimultaneousRingIsActive

public static boolean userSimultaneousRingIsActive(BroadWorksServer bws,
                                                   java.lang.String userId)
                                            throws BwptkException
Returns true if Simultaneous Ring is active for the designated User.

Parameters:
bws -
userId -
Throws:
BwptkException

setUserSimultaneousRing

public static boolean setUserSimultaneousRing(BroadWorksServer bws,
                                              java.lang.String userId,
                                              boolean isActive,
                                              boolean doNotRingIfOnCall)
                                       throws BwptkException
Modifies a User's Simultaneous Ring settings.

Parameters:
bws -
userId -
isActive -
doNotRingIfOnCall -
Throws:
BwptkException

userVoiceMessagingUserGetAdvancedVoiceManagementRequest

public static Response userVoiceMessagingUserGetAdvancedVoiceManagementRequest(BroadWorksServer bws,
                                                                               java.lang.String userId)
                                                                        throws BwptkException
Retrieves the Response element for a User's Advanced Voice Management settings.

Parameters:
bws -
userId -
Throws:
BwptkException

getGroupMailServerPassword

public static java.lang.String getGroupMailServerPassword(BroadWorksServer bws,
                                                          java.lang.String userId)
                                                   throws BwptkException
Returns the Group Mail Server Password for the specified User.

Parameters:
bws -
userId -
Throws:
BwptkException

getGroupMailServerUserId

public static java.lang.String getGroupMailServerUserId(BroadWorksServer bws,
                                                        java.lang.String userId)
                                                 throws BwptkException
Returns the Group Mail Server user id for the specified User.

Parameters:
bws -
userId -
Throws:
BwptkException

getGroupMailServerEmailAddress

public static java.lang.String getGroupMailServerEmailAddress(BroadWorksServer bws,
                                                              java.lang.String userId)
                                                       throws BwptkException
Returns the Group Mail Server email address for the specified User.

Parameters:
bws -
userId -
Throws:
BwptkException

setAdvancedUserVoiceManagementOptions

public static boolean setAdvancedUserVoiceManagementOptions(BroadWorksServer bws,
                                                            java.lang.String userId,
                                                            java.lang.String groupServerEmailAddress,
                                                            java.lang.String groupServerUserId,
                                                            java.lang.String groupServerPassword)
                                                     throws BwptkException
Modifies a User's Advanced Voice Management settings.

Parameters:
bws -
userId -
groupServerEmailAddress -
groupServerUserId -
groupServerPassword -
Throws:
BwptkException

setUserVoiceManagementOptions

public static boolean setUserVoiceManagementOptions(BroadWorksServer bws,
                                                    java.lang.String userId,
                                                    boolean isActive,
                                                    boolean alwaysRedirectToVoiceMail)
                                             throws BwptkException
Modifies a User's Voice Management settings.

Parameters:
bws -
userId -
isActive -
alwaysRedirectToVoiceMail -
Throws:
BwptkException

setUserOutgoingMessageWaitingIndicatorOptions

public static boolean setUserOutgoingMessageWaitingIndicatorOptions(BroadWorksServer bws,
                                                                    java.lang.String userId,
                                                                    boolean isActive,
                                                                    java.lang.String phoneNumber)
                                                             throws BwptkException
Modifies a User's Outgoing Message Waiting Indicator settings.

Parameters:
bws -
userId -
isActive -
phoneNumber -
Throws:
BwptkException

serviceIsAssigned

public boolean serviceIsAssigned(java.lang.String serviceName)
                          throws BwptkException
Returns true if the specified service is assigned to the User.

Parameters:
serviceName -
Throws:
BwptkException

serviceIsAssigned

public static boolean serviceIsAssigned(BroadWorksServer bws,
                                        java.lang.String userId,
                                        java.lang.String serviceName)
                                 throws BwptkException
Returns true if the specified service is assigned to the specified User.

Parameters:
bws -
userId -
serviceName -
Throws:
BwptkException

userServiceIsAssignedBySystemCommand

public static void userServiceIsAssignedBySystemCommand(BroadWorksServer bws,
                                                        java.io.PrintStream out,
                                                        java.lang.String serviceName)
                                                 throws java.lang.Exception
Generates a report checking if a service is assigned to all Users within the system.

Parameters:
bws -
out - The Print Stream to send the report.
serviceName -
Throws:
java.lang.Exception

polycomPhoneServicesModify

public boolean polycomPhoneServicesModify(java.lang.String accessDevice,
                                          java.lang.String integratePhoneDirectoryWithBroadWorks,
                                          java.lang.String includeUserPersonalPhoneListInDirectory,
                                          java.lang.String includeGroupCustomContactDirectoryInDirectory,
                                          java.lang.String groupCustomContactDirectory)
                                   throws BwptkException
Modify a User's Polycom Phone Services

Parameters:
accessDevice -
integratePhoneDirectoryWithBroadWorks -
includeUserPersonalPhoneListInDirectory -
includeGroupCustomContactDirectoryInDirectory -
groupCustomContactDirectory -
Throws:
BwptkException

getAssignedServicePacks

public java.util.List<Pair<java.lang.String,java.lang.Boolean>> getAssignedServicePacks()
                                                                                 throws BwptkException
Get the User's assigned service packs.

Returns:
Pair corresponding to
Throws:
BwptkException

getAssignedServices

public java.util.List<Pair<java.lang.String,java.lang.Boolean>> getAssignedServices()
                                                                             throws BwptkException
Get the User's assigned services.

Returns:
Pair corresponding to
Throws:
BwptkException

isRegistered

public boolean isRegistered()
                     throws BwptkException
Return's true if the User is registered.

Throws:
BwptkException

getRegistration

public UserRegistration getRegistration()
                                 throws BwptkException
Retrieve the UserRegistration object for this User.

Throws:
BwptkException

searchForUser

public static java.util.List<User> searchForUser(BroadWorksServer bws,
                                                 java.lang.String sp,
                                                 java.lang.String mode,
                                                 java.lang.String criteria)
                                          throws BwptkException
Performs a search for a User and returns a list of candidates.

Parameters:
bws -
sp -
mode -
criteria -
Throws:
BwptkException

syncUserToDatabaseIgnoringServices

public void syncUserToDatabaseIgnoringServices(java.sql.Connection con)
                                        throws java.sql.SQLException,
                                               BwptkException
This synchronizes the User to a SQL server with a broadworks_users table

Parameters:
con - The SQL server with which to sync users.
Throws:
java.sql.SQLException
BwptkException

syncUserToDatabase

public java.util.List<java.lang.String> syncUserToDatabase(java.sql.Connection con)
                                                    throws java.sql.SQLException,
                                                           BwptkException
This synchronizes the User to a SQL server with a broadworks_users and broadworks_users_services table.

Parameters:
con - The SQL server with which to sync users.
Returns:
Returns a List which contains a list of concatenations of the userid and serviceids.
Throws:
java.sql.SQLException
BwptkException

syncAllUsersToDatabaseIgnoringServices

public static void syncAllUsersToDatabaseIgnoringServices(BroadWorksServer bws,
                                                          java.sql.Connection con)
                                                   throws java.sql.SQLException,
                                                          BwptkException
This synchronizes every User in a BroadWorks Server to a SQL database but does not Sync user services. This greatly increases the overall time to complete this method.

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

syncAllUsersToDatabase

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

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