ca.bc.gov.webade.developer.user.provider
Class WebADEDeveloperUserProvider

java.lang.Object
  extended byca.bc.gov.webade.developer.user.provider.WebADEDeveloperUserProvider
All Implemented Interfaces:
ca.bc.gov.webade.user.provider.WebADEUserProvider

public final class WebADEDeveloperUserProvider
extends java.lang.Object
implements ca.bc.gov.webade.user.provider.WebADEUserProvider

The WebADEDeveloperUserProvider implements the WebADE UserInfoProvider interface and returns user information. In the standard WebADE configuration a UserInfoProvider retrieves information from government webservices and passes this information back to the application. By altering the WebADE preferences we can substitute this WebADEDeveloperUserProvider for the standard Web Services UserInfoProvider. This enables the webade-developer module to emulate the responses from web-services. This is useful when developing WebADE applications outside the government extranet where the web services are unavailable.

Author:
Vivid Solutions Inc

Field Summary
static java.lang.String ENABLED
           
static java.lang.String RESPONSE_DELAY
           
static java.lang.String USER_INFO_FILE_LOCATION
           
static java.lang.String USER_TYPE_DELINIATOR
           
static java.lang.String USER_TYPE_DOMAIN_SUFFIX
           
 
Fields inherited from interface ca.bc.gov.webade.user.provider.WebADEUserProvider
PROVIDER_CLASS_NAME, PROVIDER_ENABLED, WEBADE_USER_PROVIDER_SUBTYPE
 
Constructor Summary
WebADEDeveloperUserProvider()
          Default Constructor.
 
Method Summary
 ca.bc.gov.webade.user.search.UserSearchQuery createUserSearchQuery(ca.bc.gov.webade.user.UserTypeCode userTypeCode)
           
 java.util.List findUsers(ca.bc.gov.webade.user.UserCredentials requestor, ca.bc.gov.webade.user.search.UserSearchQuery userSearchQuery)
           
static java.lang.String getResponseDelay()
           
 java.lang.String getSourceDirectoryForUserType(ca.bc.gov.webade.user.UserTypeCode userTypeCode)
          Note that I'm just returning the first source directory in the list.
 java.lang.String[] getSupportedSourceDirectories()
           
 ca.bc.gov.webade.user.UserTypeCode[] getSupportedUserTypes()
           
 ca.bc.gov.webade.user.WebADEUserInfo getUser(ca.bc.gov.webade.user.UserCredentials requestor, ca.bc.gov.webade.user.UserCredentials credentials)
           
static java.io.File getUserInfoFile()
           
static java.lang.String getUserInfoFileLocation()
           
 ca.bc.gov.webade.user.UserTypeCode getUserTypeForSourceDirectory(java.lang.String sourceDirectory)
           
 boolean handlesSourceDirectory(java.lang.String sourceDirectory)
           
 boolean handlesUserType(ca.bc.gov.webade.user.UserTypeCode userType)
           
 void init(java.util.Properties properties)
           
 ca.bc.gov.webade.user.GUID[] isUserInGroups(ca.bc.gov.webade.user.UserCredentials requestor, ca.bc.gov.webade.user.UserCredentials user, ca.bc.gov.webade.user.GUID[] groupGuids)
           
static void setResponseDelay(java.lang.String responseDelay)
           
static void setUserInfoFileLocation(java.lang.String userInfoFileLocation)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

USER_TYPE_DOMAIN_SUFFIX

public static final java.lang.String USER_TYPE_DOMAIN_SUFFIX
See Also:
Constant Field Values

RESPONSE_DELAY

public static final java.lang.String RESPONSE_DELAY
See Also:
Constant Field Values

USER_INFO_FILE_LOCATION

public static final java.lang.String USER_INFO_FILE_LOCATION
See Also:
Constant Field Values

ENABLED

public static final java.lang.String ENABLED
See Also:
Constant Field Values

USER_TYPE_DELINIATOR

public static final java.lang.String USER_TYPE_DELINIATOR
See Also:
Constant Field Values
Constructor Detail

WebADEDeveloperUserProvider

public WebADEDeveloperUserProvider()
Default Constructor.

Method Detail

init

public final void init(java.util.Properties properties)
                throws ca.bc.gov.webade.user.provider.WebADEUserProviderException
Specified by:
init in interface ca.bc.gov.webade.user.provider.WebADEUserProvider
Throws:
ca.bc.gov.webade.user.provider.WebADEUserProviderException
See Also:
UserInfoProvider.init(ca.bc.gov.webade.PreferenceSet)

getUser

public ca.bc.gov.webade.user.WebADEUserInfo getUser(ca.bc.gov.webade.user.UserCredentials requestor,
                                                    ca.bc.gov.webade.user.UserCredentials credentials)
                                             throws ca.bc.gov.webade.user.provider.WebADEUserProviderException
Specified by:
getUser in interface ca.bc.gov.webade.user.provider.WebADEUserProvider
Throws:
ca.bc.gov.webade.user.provider.WebADEUserProviderException

getSourceDirectoryForUserType

public java.lang.String getSourceDirectoryForUserType(ca.bc.gov.webade.user.UserTypeCode userTypeCode)
Note that I'm just returning the first source directory in the list. The assumption in the interface is that there will only be one source directory per user type. (Which isn't always true but I've got to implement the interface)

Specified by:
getSourceDirectoryForUserType in interface ca.bc.gov.webade.user.provider.WebADEUserProvider

findUsers

public java.util.List findUsers(ca.bc.gov.webade.user.UserCredentials requestor,
                                ca.bc.gov.webade.user.search.UserSearchQuery userSearchQuery)
                         throws ca.bc.gov.webade.user.provider.WebADEUserProviderException
Specified by:
findUsers in interface ca.bc.gov.webade.user.provider.WebADEUserProvider
Throws:
ca.bc.gov.webade.user.provider.WebADEUserProviderException

createUserSearchQuery

public ca.bc.gov.webade.user.search.UserSearchQuery createUserSearchQuery(ca.bc.gov.webade.user.UserTypeCode userTypeCode)
                                                                   throws ca.bc.gov.webade.user.provider.WebADEUserProviderException
Specified by:
createUserSearchQuery in interface ca.bc.gov.webade.user.provider.WebADEUserProvider
Throws:
ca.bc.gov.webade.user.provider.WebADEUserProviderException

isUserInGroups

public ca.bc.gov.webade.user.GUID[] isUserInGroups(ca.bc.gov.webade.user.UserCredentials requestor,
                                                   ca.bc.gov.webade.user.UserCredentials user,
                                                   ca.bc.gov.webade.user.GUID[] groupGuids)
                                            throws ca.bc.gov.webade.user.provider.WebADEUserProviderException
Specified by:
isUserInGroups in interface ca.bc.gov.webade.user.provider.WebADEUserProvider
Throws:
ca.bc.gov.webade.user.provider.WebADEUserProviderException

getUserTypeForSourceDirectory

public ca.bc.gov.webade.user.UserTypeCode getUserTypeForSourceDirectory(java.lang.String sourceDirectory)
Specified by:
getUserTypeForSourceDirectory in interface ca.bc.gov.webade.user.provider.WebADEUserProvider

getUserInfoFile

public static java.io.File getUserInfoFile()
                                    throws WebADEDeveloperException
Throws:
WebADEDeveloperException

handlesSourceDirectory

public final boolean handlesSourceDirectory(java.lang.String sourceDirectory)
Specified by:
handlesSourceDirectory in interface ca.bc.gov.webade.user.provider.WebADEUserProvider
See Also:
UserInfoProvider.handlesSourceDirectory(java.lang.String)

handlesUserType

public final boolean handlesUserType(ca.bc.gov.webade.user.UserTypeCode userType)
Specified by:
handlesUserType in interface ca.bc.gov.webade.user.provider.WebADEUserProvider
See Also:
UserInfoProvider.handlesUserType(ca.bc.gov.webade.user.UserTypeCode)

getSupportedSourceDirectories

public final java.lang.String[] getSupportedSourceDirectories()
Specified by:
getSupportedSourceDirectories in interface ca.bc.gov.webade.user.provider.WebADEUserProvider
See Also:
UserInfoProvider.getSupportedSourceDirectories()

getSupportedUserTypes

public final ca.bc.gov.webade.user.UserTypeCode[] getSupportedUserTypes()
Specified by:
getSupportedUserTypes in interface ca.bc.gov.webade.user.provider.WebADEUserProvider
See Also:
UserInfoProvider.getSupportedUserTypes()

getResponseDelay

public static java.lang.String getResponseDelay()

setResponseDelay

public static void setResponseDelay(java.lang.String responseDelay)

getUserInfoFileLocation

public static java.lang.String getUserInfoFileLocation()

setUserInfoFileLocation

public static void setUserInfoFileLocation(java.lang.String userInfoFileLocation)