BlackBerry Administration API
v5.0.3.29

utilws
Interface BAAUtil

Package class diagram package BAAUtil

public interface BAAUtil

Util web service that contains utility APIs for all platforms. The APIs in this class do not require users to be logged in.


Method Summary
 java.lang.String encodeUsername(java.lang.String username, java.lang.String domain, ExternalAuthenticatorTypesEnum type, int identifier, java.lang.String credentialType)
          Encodes a username so that it contains extra authentication information to be used for http basic authentication.
 java.util.List<Authenticator> findAuthenticators(java.lang.String locale)
          Returns a list of authenticators.
 java.util.List<java.lang.String> findLocales()
          Returns a list of locales.
 MailPlatform getMailPlatform()
          This method returns the server's mail platform
 

Method Detail

findAuthenticators

java.util.List<Authenticator> findAuthenticators(java.lang.String locale)
Returns a list of authenticators.

Parameters:
locale - Return names of the authenticators in this locale
Returns:
Authenticators that support authentication
Since:
5.0.0
Sample:

Java CXF

List<Authenticator> authenticators=utilWebService.findAuthenticators("en_US");
for (Authenticator itr:authenticators) {
       System.out.println(itr.getName() + ", " + itr.getId() + ", " + itr.findAuthenticatorType().getEnum().value() );
}
                               

encodeUsername

java.lang.String encodeUsername(java.lang.String username,
                                java.lang.String domain,
                                ExternalAuthenticatorTypesEnum type,
                                int identifier,
                                java.lang.String credentialType)
Encodes a username so that it contains extra authentication information to be used for http basic authentication. To find out what authenticators are deployed in the system, use the API getAuthenticators(). If using internal authentication with the BlackBerry Administration Service, only username needs to be set. Set all other parameters to null.

Parameters:
username - user's login name
domain - the domain in which the user belongs to
type - authentication type
identifier - the id of the external authenticator if using external authentication.
credentialType - the credential type
Returns:
encoded string containing the user's login information.
Since:
5.0.0
Sample:

Java CXF

//using BlackBerry Administration Service as the authenticator
String encodedUsername=utilWebService.encodeUsername("admin",null,null,0,"0");
                               

Java CXF

//using Active Directory as the authenticator
Authenticator activeDirectoryAuthenticator=null;

List<Authenticator> authenticators=utilWebService.findAuthenticators("en_US");
for (Authenticator itr:authenticators) {
       if (itr.getName().equalsIgnoreCase("Active Directory")) {
               activeDirectoryAuthenticator=itr;
       }
}
String encodedUsername=utilWebService.encodeUsername("admin","test.rim.net",activeDirectoryAuthenticator.getAuthenticatorType(),activeDirectoryAuthenticator.getId(),"0");
                               

findLocales

java.util.List<java.lang.String> findLocales()
Returns a list of locales.

Returns:
all locales supported by the BlackBerry Administration Service
Since:
5.0.0
Sample:

Java CXF

List<String> locales= utilWebService.findLocales();
 
for (String itr: locales) {
    System.out.println(itr);
}

                               

getMailPlatform

MailPlatform getMailPlatform()
This method returns the server's mail platform

Returns:
enum representing the mail platform
Since:
5.0.1
Sample:

Java CXF

MailPlatform platform= utilWebService.getMailPlatform();
System.out.println(platform.value());
                               

C#

getMailPlatform request = new getMailPlatform();
getMailPlatformResponse response = utilWebService.getMailPlatform(request);
MailPlatform mailPlatform = response.returnValue;
System.Console.WriteLine("Mail platform is: " + mailPlatform.ToString());
                               

BlackBerry Administration API
v5.0.3.29

Copyright 2009 Research In Motion Limited. All Rights Reserved.