BlackBerry Administration API
v5.0.3.29

dispatcherws
Interface BAADispatcher

Package class diagram package BAADispatcher

public interface BAADispatcher

Web service that contains APIs for all dispatcher related activities.


Method Summary
 ClearActivationPasswordResult clearActivationPassword(int userId)
          Clears an enterprise activation password for a user.
 GenerateActivationPasswordResult generateActivationPassword(int userId, java.lang.String locale, BASEnumBaseDTO messageTypeEnum)
          Generates an enterprise activation password for a user and notifies the user.
 GetDispatcherNamesResult getDispatcherNames(java.lang.String locale)
          Gets a list of Dispatchers in the BlackBerry domain
 SetActivationPasswordResult setActivationPassword(int userId, java.lang.String password, int expiryHours)
          Sets an enterprise activation password for a user.
 SetExternalServicesStateForUserResult setExternalServicesStateForUser(int userId, boolean enableExternalServices)
          Specifies whether to turn on or off external services for a user.
 java.lang.String test(java.lang.String input)
           
 

Method Detail

getDispatcherNames

GetDispatcherNamesResult getDispatcherNames(java.lang.String locale)
Gets a list of Dispatchers in the BlackBerry domain

Parameters:
locale - the locale of the returned Dispatcher names
Returns:
list of Dispatchers
Since:
5.0.2
Sample:

Java CXF

String locale="en_US";
GetDispatcherNamesResult result= dispatcherWebService.getDispatcherNames(locale);
 
if (result.getGetDispatcherNamesReturnStatus().getCode() != GetDispatcherNamesReturnStatusEnumType.SUCCESS) {
       System.out.println("Error occured: " + result.getGetDispatcherNamesReturnStatus().getMessage());
}

for (DispatcherHostName itr: result.getDispatcherHostNames()) {
       System.out.println("Name: " + itr.getName());
       System.out.println("Id: " + itr.getServiceInstanceId());
}

                               

clearActivationPassword

ClearActivationPasswordResult clearActivationPassword(int userId)
Clears an enterprise activation password for a user.

Parameters:
userId - the ID of the user to clear enterprise activation password
Since:
5.0.0
Sample:

Java CXF

ClearActivationPasswordResult result=dispatcherWebService.clearActivationPassword(5);

if (result.getClearActivationPasswordReturnStatus().getCode() != ClearActivationPasswordReturnStatusEnumType.SUCCESS) {
    System.out.println("Error occured: " + result.getClearActivationPasswordReturnStatus().getMessage());
    return;
}

                               
Permissions Required:
Current user OR User and device -> Specify activation password

setActivationPassword

SetActivationPasswordResult setActivationPassword(int userId,
                                                  java.lang.String password,
                                                  int expiryHours)
Sets an enterprise activation password for a user.

Parameters:
userId - the ID of the user to set enterprise activation password on
password - the password to set
expiryHours - the number hours before the password expires
Since:
5.0.0
Sample:

Java CXF

String password="password1";
int expiryHours=48;
SetActivationPasswordResult result=dispatcherWebService.setActivationPassword(userId,password,expiryHours);
 
if (result.getSetActivationPasswordReturnStatus().getCode() != SetActivationPasswordReturnStatusEnumType.SUCCESS) {
    System.out.println("Error occured: " + result.getSetActivationPasswordReturnStatus().getMessage());
    return;
}

                               
Permissions Required:
Current user OR User and device -> Specify activation password

test

java.lang.String test(java.lang.String input)

generateActivationPassword

GenerateActivationPasswordResult generateActivationPassword(int userId,
                                                            java.lang.String locale,
                                                            BASEnumBaseDTO messageTypeEnum)
Generates an enterprise activation password for a user and notifies the user.

Parameters:
userId - the ID of the user to set enterprise activation password on
locale - the locale of the generated email
messageTypeEnum - Deprecated. Parameter no longer used
Since:
5.0.0
Sample:

Java CXF

String locale="en_US";
//notify user the activation password by sending an email
EmailCommonMessageTypeEnum messageTypeEnum=new EmailCommonMessageTypeEnum();
messageTypeEnum.setEnum(EmailCommonMessageTypeEnumType.EMAIL);
GenerateActivationPasswordResult result= dispatcherWebService.generateActivationPassword(userId,locale,messageTypeEnum);
 
if (result.getGenerateActivationPasswordReturnStatus().getCode() != GenerateActivationPasswordReturnStatusEnumType.SUCCESS) {
       System.out.println("Error occured: " + result.getGenerateActivationPasswordReturnStatus().getMessage());
}

                               
Permissions Required:
Current user OR User and device -> Specify activation password

setExternalServicesStateForUser

SetExternalServicesStateForUserResult setExternalServicesStateForUser(int userId,
                                                                      boolean enableExternalServices)
Specifies whether to turn on or off external services for a user. External services include MDSCS, Collabration Service, MVS

Parameters:
userId - the Id of the user to set external service state on
enableExternalServices - if true, the state is turned on. otherwise, the state is turned off.
Since:
5.0.1
Sample:

Java CXF

boolean enableExternalServices=false;
 
SetExternalServicesStateForUserResult result= dispatcherWebService.setExternalServicesStateForUser(userId, enableExternalServices);
 
if (result.getSetExternalServicesStateForUserReturnStatus().getCode() != SetExternalServicesStateForUserReturnStatusEnumType.SUCCESS) {
       System.out.println("Error occured: " + result.getSetExternalServicesStateForUserReturnStatus().getMessage());
}

                               
Permissions Required:
Current user OR User and device -> Turn off and on external services

BlackBerry Administration API
v5.0.3.29

Copyright 2009 Research In Motion Limited. All Rights Reserved.