com.e_c_group.bwptk
Class Group

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

public class Group
extends java.lang.Object

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


Method Summary
 boolean assignGroupService(java.lang.String serviceName)
          Assigns a Group Service with the designated name.
 boolean assignTelephoneNumber(java.lang.String telephoneNumber)
          Assign a telephone number to this group.
 boolean authorizeUnlimitedGroupService(java.lang.String serviceName)
          Authorizes an unlimited Group Service
 boolean authorizeUnlimitedUserService(java.lang.String serviceName)
          Authorizes an unlimited User Service
 boolean blockInternationalCallForwarding()
          Block's International Call Forwarding for this Group
 BroadWorksServer getBroadWorksServer()
           
static Group getGroup(ServiceProvider serviceProvider, java.lang.String groupId)
          Retrieve a Group given the Service Provider and Group ID.
static Group getGroup(ServiceProvider serviceProvider, java.lang.String groupId, java.lang.String groupName)
          Retrieve a Group given the Service Provider and Group ID.
 java.util.List<GroupAccessDevice> getGroupAccessDevices()
          Retrieves the list of Group Access Devices for this Group.
 void getGroupCCMTables(BroadWorksServer bws, java.io.PrintStream out)
          Prints the Call Capacity Management information for the Group
 Response getGroupCommunicationBarringAuthorizationCodesResponse()
          Retrieves the Response element for a Group's Communication Barring Authorization Codes.
 Response getGroupCommunicationBarringResponse()
          Retrieves the Response element for a Group's Communication Barring settings.
 Response getGroupGetRequest14sp7()
          Retrieves the Response element for this Group.
 java.lang.String getGroupId()
          Retrieves the GroupID
 java.lang.String getGroupName()
          Return's the Group Name
 GroupPortalPasscodeRules getGroupPortalPasscodeRules()
          Gets the group portal passcode rules with a "GroupPortalPasscodeRulesGetRequest", or returns null in case of an error.
static java.util.List<Group> getGroupsInServiceProvider(ServiceProvider sp)
          Retrieves a list of all Group's within a Service Provider.
static java.util.List<Group> getGroupsInSystem(BroadWorksServer bws)
          Retrieves a list of all Groups in the System.
 java.lang.String getSACMaxSessions()
          Retrieves SessionAdmissionControl max sessions
 java.lang.String getSACMaxUserOriginatingSessions()
          Retrieves SessionAdmissionControl max user originating sessions.
 java.lang.String getSACMaxUserTerminatingSessions()
          Retrieve SessionAdmissionControl max user terminating sessions.
 ServiceProvider getServiceProvider()
          Retrieves the Service Provider for the Group
 java.lang.String getServiceProviderId()
           
 java.util.List<TrunkGroup> getTrunkGroupsByGroup(BroadWorksServer bws)
          Retrieves a list of all Trunk Groups within the Group.
static void groupCCMDetailsBySystemCommand(BroadWorksServer bws, java.io.PrintStream out)
          Prints the Call Capacity Management information for all Groups in the System
static boolean groupPortalPasscodeRulesBySystemCommand(BroadWorksServer bws, java.io.PrintStream out)
          Print out the group portal passcode rules for every group in the system.
static void groupSACDetailsBySystemCommand(BroadWorksServer bws, java.io.PrintStream out)
          Prints SessionAdmissionControl details for all Groups in the System
static void groupServiceIsAssignedBySystemCommand(BroadWorksServer bws, java.io.PrintStream out, java.lang.String serviceName)
          Prints whether a Group Service is assigned to all Groups in the System.
static void groupTrunkGroupBriefBySystemCommand(BroadWorksServer bws, java.io.PrintStream out)
          Prints brief details on all Trunk Groups in the System
static void listGroupIdsInServiceProvider(ServiceProvider sp, java.io.PrintStream out)
          Prints all GroupId's within a Service Provider to the designated PrintStream.
static void main(java.lang.String[] args)
           
 java.util.List<java.lang.String> randomizeAuthentication(boolean resetDevices, boolean includeUser)
          Generates random authentication for all users within this group.
static java.util.List<Group> searchForGroup(BroadWorksServer bws, java.lang.String sp, java.lang.String mode)
          Retrieves a list of Groups that match a set of search criteria.
 boolean serviceIsAssigned(java.lang.String serviceName)
          Determine whether this group has the specified service.
 boolean setGroupOutgoingCallingPlanRedirecting(CallingPlanCallType cpct, boolean allowed)
          Enable or disable a redirecting outgoing calling plan element.
static void syncAllGroupsToDatabase(BroadWorksServer bws, java.sql.Connection con)
          This synchronizes every Group in a BroadWorks Server to a SQL database
 void syncGroupToDatabase(java.sql.Connection con)
          This synchronizes a Group to a SQL database.
 java.lang.String toString()
           
 boolean unassignTelephoneNumber(java.lang.String telephoneNumber)
          Unassign a telephone number to this group.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Method Detail

getGroupId

public java.lang.String getGroupId()
Retrieves the GroupID


getServiceProvider

public ServiceProvider getServiceProvider()
Retrieves the Service Provider for the Group


getGroupCommunicationBarringResponse

public Response getGroupCommunicationBarringResponse()
                                              throws BwptkException
Retrieves the Response element for a Group's Communication Barring settings.

Returns:
The response is either a GroupCommunicationBarringGetResponse or an ErrorResponse.
Throws:
BwptkException

getGroupCommunicationBarringAuthorizationCodesResponse

public Response getGroupCommunicationBarringAuthorizationCodesResponse()
                                                                throws BwptkException
Retrieves the Response element for a Group's Communication Barring Authorization Codes.

Returns:
The response is either a GroupCommunicationBarringAuthorizationCodeGetListResponse or an ErorResponse.
Throws:
BwptkException

setGroupOutgoingCallingPlanRedirecting

public boolean setGroupOutgoingCallingPlanRedirecting(CallingPlanCallType cpct,
                                                      boolean allowed)
                                               throws BwptkException
Enable or disable a redirecting outgoing calling plan element. For example, you can block redirecting calls to international destinations with cpct=International and allowed=false. Generates:
<command xsi:type="GroupOutgoingCallingPlanRedirectingModifyListRequest" xmlns="">
                <serviceProviderId>lindsey_sp_1</serviceProviderId>
                <groupId>test_group_1</groupId>
                <groupPermissions>
                        <international>false</international>
                </groupPermissions>
                </command>
 

Parameters:
cpct - The CallingPlanCallType
allowed -
Throws:
BwptkException

getGroupsInSystem

public static java.util.List<Group> getGroupsInSystem(BroadWorksServer bws)
                                               throws BwptkException
Retrieves a list of all Groups in the System.

Parameters:
bws -
Throws:
BwptkException

getGroupsInServiceProvider

public static java.util.List<Group> getGroupsInServiceProvider(ServiceProvider sp)
                                                        throws BwptkException
Retrieves a list of all Group's within a Service Provider.

Parameters:
sp -
Throws:
BwptkException

searchForGroup

public static java.util.List<Group> searchForGroup(BroadWorksServer bws,
                                                   java.lang.String sp,
                                                   java.lang.String mode)
                                            throws BwptkException
Retrieves a list of Groups that match a set of search criteria.

Parameters:
bws -
sp - The search value
mode - The search mode
Throws:
BwptkException

listGroupIdsInServiceProvider

public static void listGroupIdsInServiceProvider(ServiceProvider sp,
                                                 java.io.PrintStream out)
                                          throws BwptkException
Prints all GroupId's within a Service Provider to the designated PrintStream.

Parameters:
sp -
out -
Throws:
BwptkException

getGroup

public static Group getGroup(ServiceProvider serviceProvider,
                             java.lang.String groupId)
                      throws BwptkException
Retrieve a Group given the Service Provider and Group ID.

Parameters:
serviceProvider -
groupId -
Throws:
BwptkException

getGroup

public static Group getGroup(ServiceProvider serviceProvider,
                             java.lang.String groupId,
                             java.lang.String groupName)
                      throws BwptkException
Retrieve a Group given the Service Provider and Group ID. This allows a designated GroupName.

Parameters:
serviceProvider -
groupId -
groupName -
Throws:
BwptkException

getGroupAccessDevices

public java.util.List<GroupAccessDevice> getGroupAccessDevices()
                                                        throws BwptkException
Retrieves the list of Group Access Devices for this Group.

Returns:
Throws:
BwptkException

getGroupGetRequest14sp7

public Response getGroupGetRequest14sp7()
                                 throws BwptkException
Retrieves the Response element for this Group.

Returns:
Throws:
BwptkException

getGroupName

public java.lang.String getGroupName()
                              throws BwptkException
Return's the Group Name

Throws:
BwptkException

blockInternationalCallForwarding

public boolean blockInternationalCallForwarding()
                                         throws BwptkException
Block's International Call Forwarding for this Group

Throws:
BwptkException

authorizeUnlimitedGroupService

public boolean authorizeUnlimitedGroupService(java.lang.String serviceName)
                                       throws BwptkException
Authorizes an unlimited Group Service

Parameters:
serviceName -
Returns:
Throws:
BwptkException

authorizeUnlimitedUserService

public boolean authorizeUnlimitedUserService(java.lang.String serviceName)
                                      throws BwptkException
Authorizes an unlimited User Service

Parameters:
serviceName -
Returns:
Throws:
BwptkException

getGroupPortalPasscodeRules

public GroupPortalPasscodeRules getGroupPortalPasscodeRules()
                                                     throws BwptkException
Gets the group portal passcode rules with a "GroupPortalPasscodeRulesGetRequest", or returns null in case of an error.

Throws:
BwptkException

groupPortalPasscodeRulesBySystemCommand

public static boolean groupPortalPasscodeRulesBySystemCommand(BroadWorksServer bws,
                                                              java.io.PrintStream out)
                                                       throws java.lang.Exception
Print out the group portal passcode rules for every group in the system.

Parameters:
bws -
out - The printstream to display the passcode rules.
Throws:
java.lang.Exception

assignGroupService

public boolean assignGroupService(java.lang.String serviceName)
                           throws BwptkException
Assigns a Group Service with the designated name.

Parameters:
serviceName -
Throws:
BwptkException

assignTelephoneNumber

public boolean assignTelephoneNumber(java.lang.String telephoneNumber)
                              throws BwptkException
Assign a telephone number to this group. The telephone number must already be part of the service provider.

Parameters:
telephoneNumber -
Returns:
true iff this request succeeds.
Throws:
BwptkException

unassignTelephoneNumber

public boolean unassignTelephoneNumber(java.lang.String telephoneNumber)
                                throws BwptkException
Unassign a telephone number to this group.

Parameters:
telephoneNumber -
Returns:
true iff this request succeeds.
Throws:
BwptkException

serviceIsAssigned

public boolean serviceIsAssigned(java.lang.String serviceName)
                          throws BwptkException
Determine whether this group has the specified service.

Parameters:
serviceName -
Returns:
true if the service is assigned
Throws:
BwptkException

groupServiceIsAssignedBySystemCommand

public static void groupServiceIsAssignedBySystemCommand(BroadWorksServer bws,
                                                         java.io.PrintStream out,
                                                         java.lang.String serviceName)
                                                  throws java.lang.Exception
Prints whether a Group Service is assigned to all Groups in the System.

Parameters:
bws -
out -
serviceName -
Throws:
java.lang.Exception

getSACMaxSessions

public java.lang.String getSACMaxSessions()
                                   throws BwptkException
Retrieves SessionAdmissionControl max sessions

Throws:
BwptkException

getSACMaxUserOriginatingSessions

public java.lang.String getSACMaxUserOriginatingSessions()
                                                  throws BwptkException
Retrieves SessionAdmissionControl max user originating sessions.

Throws:
BwptkException

getSACMaxUserTerminatingSessions

public java.lang.String getSACMaxUserTerminatingSessions()
                                                  throws BwptkException
Retrieve SessionAdmissionControl max user terminating sessions.

Throws:
BwptkException

groupSACDetailsBySystemCommand

public static void groupSACDetailsBySystemCommand(BroadWorksServer bws,
                                                  java.io.PrintStream out)
                                           throws java.lang.Exception
Prints SessionAdmissionControl details for all Groups in the System

Parameters:
bws -
out -
Throws:
java.lang.Exception

getGroupCCMTables

public void getGroupCCMTables(BroadWorksServer bws,
                              java.io.PrintStream out)
                       throws BwptkException
Prints the Call Capacity Management information for the Group

Parameters:
bws -
out -
Throws:
BwptkException

groupCCMDetailsBySystemCommand

public static void groupCCMDetailsBySystemCommand(BroadWorksServer bws,
                                                  java.io.PrintStream out)
                                           throws java.lang.Exception
Prints the Call Capacity Management information for all Groups in the System

Parameters:
bws -
out -
Throws:
BwptkException
java.lang.Exception

getTrunkGroupsByGroup

public java.util.List<TrunkGroup> getTrunkGroupsByGroup(BroadWorksServer bws)
                                                 throws BwptkException
Retrieves a list of all Trunk Groups within the Group.

Parameters:
bws -
Returns:
Throws:
BwptkException

groupTrunkGroupBriefBySystemCommand

public static void groupTrunkGroupBriefBySystemCommand(BroadWorksServer bws,
                                                       java.io.PrintStream out)
                                                throws java.lang.Exception
Prints brief details on all Trunk Groups in the System

Parameters:
bws -
out -
Throws:
java.lang.Exception

randomizeAuthentication

public java.util.List<java.lang.String> randomizeAuthentication(boolean resetDevices,
                                                                boolean includeUser)
                                                         throws BwptkException
Generates random authentication for all users within this group.

Parameters:
resetDevices - Set to true to reset the access devices following the change.
includeUser - Set to true to randomize the username as well as password.
Throws:
BwptkException

syncGroupToDatabase

public void syncGroupToDatabase(java.sql.Connection con)
                         throws java.sql.SQLException,
                                BwptkException
This synchronizes a Group to a SQL database.

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

syncAllGroupsToDatabase

public static void syncAllGroupsToDatabase(BroadWorksServer bws,
                                           java.sql.Connection con)
                                    throws java.sql.SQLException,
                                           BwptkException
This synchronizes every Group 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

main

public static void main(java.lang.String[] args)
                 throws java.lang.Exception
Throws:
java.lang.Exception

toString

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

getServiceProviderId

public java.lang.String getServiceProviderId()

getBroadWorksServer

public BroadWorksServer getBroadWorksServer()