ca.bc.gov.webade
Interface WebADEDatastore

All Known Implementing Classes:
WebADEDatabaseDatastore

public interface WebADEDatastore

Controls access to the WebADE datastore for a single WebADE application, and loads WebADE data from the datastore. This interface is to allow for non-database WebADE configurations to potentially exist.

Author:
jross

Field Summary
static java.lang.String ID_BUSINESS_PARTNER_TYPE
          The user and group type defining a business partner user or group
static java.lang.String ID_CITIZEN_TYPE
          The user and group type defining an individual user or group
static java.lang.String ID_GOVERNMENT_TYPE
          The user and group type defining a government user or group
 
Method Summary
 UserSearchQuery createUserSearchQuery(UserTypeCode userType)
          Returns the UserSearchQuery metadata object to perform user searching for this application on the provided user type.
 java.util.List findGroups(GroupSearchObject searchObject)
          Deprecated.  
 java.util.List findOrganizations(OrganizationSearchObject searchObject)
          Returns the set of organization records that match the given ministry-specific organization info.
 java.util.List findUsers(UserSearchObject searchObject)
          Deprecated.  
 WebADEUserInfo[] findUsers(UserSearchQuery searchQuery)
          Finds the set of WebADEUserInfo objects that match the provided search criteria.
 WebADEUserInfo[] findWebADEUsers(UserSearchObject searchObject)
          Deprecated. Use findUsers() instead, passing in the target user search query to search on.
 Action[] getApplicationActions()
          Returns the set of actions defined for the given application code, regardless of role assignment.
 java.lang.String getApplicationCode()
          Returns the current application code set for the WebADE datastore.
 Preferences getApplicationPreferences()
          Deprecated. Use WebADEDatastore.getWebADEApplicationPreferences() instead.
 Role[] getApplicationRoles()
          Returns the set of roles for the given application code.
 UserCredentials[] getAuthorizedUsers(Role role, Organization organization, boolean ignoreIndeterminateAuthorizationsErrors)
          Loads all users from the datastore that are members the given roles via an authorization associated with the given organization.
 java.lang.String getDatastoreEnvironment()
          Returns the environment code value for the datastore (DEV, TEST, or PROD).
 ElectronicAgreement getElectronicAgreement(java.lang.String agreementName)
          Returns the target agreement, based on the given agreement name.
 Preferences getGlobalPreferences()
          Deprecated. Use WebADEDatastore.getWebADEGlobalPreferences() instead.
 Group getGroupByGUID(java.lang.String guid)
          Deprecated.  
 java.util.List getGroupSearchMetadata()
          Deprecated. This method is no longer supported.
 java.lang.String getJavaEnvironment()
          Returns the environment code value for the Java API (DEV, TEST, or PROD).
 OrganizationSearchObject getOrganizationSearchMetadata()
          Returns an instance of the appropriate OrganizationSearchObject to be used to search for organizations.
 java.util.Properties getPooledResourceProperties(java.lang.String roleName)
          Retrieves the set of configuration properties for a pooled resource.
 WebADEUserPermissions getPublicWebADEPermissions()
          Returns the public permissions from the datastore.
 java.lang.String getSourceDirectoryForUserType(UserTypeCode userType)
          Returns the source directory for the given user type if it is supported by this provider.
 java.lang.String[] getSupportedSourceDirectories()
           
 UserTypeCode[] getSupportedUserTypes()
           
 User getUserByGUID(java.lang.String guid)
          Deprecated.  
 User getUserById(java.lang.String userId)
          Deprecated.  
 Organization getUserDefaultOrganization(User user)
          Deprecated.  
 Organization getUserDefaultOrganization(UserCredentials userCredentials)
          Gets the user's default organization.
 Preferences getUserPreferences(long euserId)
          Deprecated.  
 Preferences getUserPreferences(UserCredentials targetUserCredentials)
          Deprecated. Use WebADEDatastore.getWebADEUserPreferences() instead.
 User[] getUsersByOrganization(long organizationId)
          Deprecated.  
 User[] getUsersByRole(java.lang.String roleName)
          Deprecated.  
 User[] getUsersByRoleAndOrganization(java.lang.String roleName, long organizationId)
          Deprecated.  
 java.util.List getUserSearchMetadata()
          Deprecated. Use createUserSearchQuery() instead, passing in the target user type code to search on.
 UserTypeCode getUserTypeForSourceDirectory(java.lang.String sourceDirectory)
          Returns the user type for the given source directory if it is supported by this provider.
 WebADEPreferences getWebADEApplicationPreferences()
          Returns the application preferences defined for the current WebADE application.
 WebADEPreferences getWebADEExtensionPreferences()
          Returns the application's WebADE extensions preferences defined for the current WebADE application.
 WebADEPreferences getWebADEGlobalPreferences()
          Returns the global preferences defined for all of WebADE.
 WebADEUserInfo getWebADEUserInfo(UserCredentials userCredentials)
          Loads the target user's personal information from the datastore, or returns null if the user is not found.
 WebADEUserInfo getWebADEUserInfo(UserCredentials userCredentials, boolean ignoreSessionCache)
          Loads the target user's personal information from the datastore, or returns null if the user is not found.
 WebADEUserPermissions getWebADEUserPermissions(UserCredentials userCredentials)
          Loads the target user's permissions from the datastore, or returns null if the user is not found.
 WebADEUserPermissions getWebADEUserPermissions(UserCredentials userCredentials, boolean ignoreSessionCache)
          Loads the target user's permissions from the datastore, or returns null if the user is not found.
 WebADEPreferences getWebADEUserPreferences(UserCredentials targetUserCredentials)
          Returns the set of user preferences for this user and this application.
 boolean handlesSourceDirectory(java.lang.String sourceDirectory)
          Returns true if the given sourceDirectory is one of the ones supported by this provider.
 boolean handlesUserType(UserTypeCode userType)
          Returns true if the given user type is one of the ones supported by this provider.
 boolean hasIndeterminateAuthorizations(Role role, Organization organization)
          Checks to see if a call to getUsersByRole() will throw a IndeterminateAuthorizationsException for the given role and organization.
 boolean hasUserAcceptedAgreement(UserCredentials userCredentials, java.lang.String agreementName)
          Returns a flag indicating whether the user has previously agreed to the given agreement.
 boolean hasUserAcceptedAgreement(User user, java.lang.String agreementName)
          Deprecated.  
 boolean isApplicationEnabled()
          Checks the enabled flag for the application.
 GUID[] isUserInGroups(UserCredentials userCredentials, GUID[] groupGuids)
          Checks to see if the user is a member of the groups identified by the given array of GUID values.
 java.lang.String[] isUserInGroups(User user, java.lang.String[] groupGuids)
          Deprecated.  
 ApplicationConfig loadApplicationConfig()
          Takes the given application code and retrieves the configuration settings, roles, actions, and pooled resource settings.
 void loadExtension(java.lang.String extensionName, Application app)
          Loads the given Extension by loading the extensions preferences, loads an instance of the extension class, using the given class loader, and initializing the extension using the loaded preferences.
 Organization loadOrganization(long organizationId)
          Loads the organization info for the given organization id.
 WebADEPreferences saveWebADEUserPreferences(UserCredentials targetUserCredentials, WebADEPreferences preferences)
          Saves the given user preferences for this user and this application.
 void setApplicationCode(java.lang.String appCode)
          Sets the current application code set for the WebADE datastore.
 void setApplicationEnabled(boolean enabled)
          Sets the application's enabled flag to the given value.
 void setUserAcceptedAgreement(UserCredentials userCredentials, java.lang.String agreementName, boolean agreeFlag)
          Sets the user's "accepted" flag on the given agreement to the given flag value.
 void setUserAcceptedAgreement(User user, java.lang.String agreementName, boolean agreeFlag)
          Deprecated.  
 void setUserDefaultOrganization(UserCredentials userCredentials, Organization organization)
          Sets the user's default organization to the given organization.
 void setUserDefaultOrganization(User user, Organization organization)
          Deprecated.  
 void shutdown()
          Shuts down the datastore.
 

Field Detail

ID_GOVERNMENT_TYPE

public static final java.lang.String ID_GOVERNMENT_TYPE
The user and group type defining a government user or group


ID_BUSINESS_PARTNER_TYPE

public static final java.lang.String ID_BUSINESS_PARTNER_TYPE
The user and group type defining a business partner user or group


ID_CITIZEN_TYPE

public static final java.lang.String ID_CITIZEN_TYPE
The user and group type defining an individual user or group

Method Detail

setApplicationCode

public void setApplicationCode(java.lang.String appCode)
                        throws WebADEException
Sets the current application code set for the WebADE datastore.

Parameters:
appCode - The application code value.
Throws:
WebADEException - Thrown if the appCode value is null or empty string.

getApplicationCode

public java.lang.String getApplicationCode()
Returns the current application code set for the WebADE datastore.

Returns:
The application code value.

getGlobalPreferences

public Preferences getGlobalPreferences()
                                 throws WebADEException
Deprecated. Use WebADEDatastore.getWebADEGlobalPreferences() instead.

Returns the global preferences defined for all of WebADE.

Returns:
A loaded Preferences object with the set of preference values.
Throws:
WebADEException - Thrown when an error occurs while trying to retrieve the information from the datastore.

getWebADEGlobalPreferences

public WebADEPreferences getWebADEGlobalPreferences()
                                             throws WebADEException
Returns the global preferences defined for all of WebADE.

Returns:
A loaded WebADEPreferences object with the set of preference values.
Throws:
WebADEException - Thrown when an error occurs while trying to retrieve the information from the datastore.

getApplicationPreferences

public Preferences getApplicationPreferences()
                                      throws WebADEException
Deprecated. Use WebADEDatastore.getWebADEApplicationPreferences() instead.

Returns the application preferences defined for the current WebADE application. Each time this method is called, it will reload the application preferences. Developers should cache this information, if they don't want this information to change during deployment of the application.

Returns:
A loaded Preferences object with the set of preference values.
Throws:
WebADEException - Thrown when an error occurs while trying to retrieve the information from the datastore.

getWebADEApplicationPreferences

public WebADEPreferences getWebADEApplicationPreferences()
                                                  throws WebADEException
Returns the application preferences defined for the current WebADE application. Each time this method is called, it will reload the application preferences. Developers should cache this information, if they don't want this information to change during deployment of the application.

Returns:
A loaded WebADEPreferences object with the set of preference values.
Throws:
WebADEException - Thrown when an error occurs while trying to retrieve the information from the datastore.

getWebADEExtensionPreferences

public WebADEPreferences getWebADEExtensionPreferences()
                                                throws WebADEException
Returns the application's WebADE extensions preferences defined for the current WebADE application. Each time this method is called, it will reload the extension preferences.

Returns:
A loaded WebADEPreferences object with the set of preference values.
Throws:
WebADEException - Thrown when an error occurs while trying to retrieve the information from the datastore.

getUserPreferences

public Preferences getUserPreferences(UserCredentials targetUserCredentials)
                               throws WebADEException
Deprecated. Use WebADEDatastore.getWebADEUserPreferences() instead.

Returns the set of user preferences for this user and this application.

Parameters:
targetUserCredentials - The user's identifying credentials.
Returns:
Returns the user's preferences.
Throws:
WebADEException - Thrown when a WebADE error occurs.

getWebADEUserPreferences

public WebADEPreferences getWebADEUserPreferences(UserCredentials targetUserCredentials)
                                           throws WebADEException
Returns the set of user preferences for this user and this application.

Parameters:
targetUserCredentials - The user's identifying credentials.
Returns:
Returns the user's preferences.
Throws:
WebADEException - Thrown when a WebADE error occurs.

saveWebADEUserPreferences

public WebADEPreferences saveWebADEUserPreferences(UserCredentials targetUserCredentials,
                                                   WebADEPreferences preferences)
                                            throws WebADEException
Saves the given user preferences for this user and this application.

Parameters:
targetUserCredentials - The user's identifying credentials.
preferences - The user's User preferences.
Returns:
The user's preferences after the save is complete, reloaded from the datastore.
Throws:
WebADEException - Thrown when a WebADE error occurs.

getJavaEnvironment

public java.lang.String getJavaEnvironment()
Returns the environment code value for the Java API (DEV, TEST, or PROD).

Returns:
Environment code value.

getDatastoreEnvironment

public java.lang.String getDatastoreEnvironment()
                                         throws WebADEException
Returns the environment code value for the datastore (DEV, TEST, or PROD).

Returns:
Environment code value.
Throws:
WebADEException - Thrown when an error occurs while trying to retrieve the information from the datastore.

loadApplicationConfig

public ApplicationConfig loadApplicationConfig()
                                        throws WebADEException
Takes the given application code and retrieves the configuration settings, roles, actions, and pooled resource settings.

Returns:
Returns the application configuration settings.
Throws:
WebADEException - Thrown when an error occurs while trying to retrieve the information from the datastore.

loadExtension

public void loadExtension(java.lang.String extensionName,
                          Application app)
                   throws WebADEException,
                          WebADEExtensionException
Loads the given Extension by loading the extensions preferences, loads an instance of the extension class, using the given class loader, and initializing the extension using the loaded preferences.

Parameters:
extensionName - The unique code of the extension.
app - The application owner to register the extension to.
Throws:
WebADEException - Thrown when an error occurs while trying to retrieve the information from the datastore.
WebADEExtensionException - Thrown when an error occurs while trying to initialize the extension.

isApplicationEnabled

public boolean isApplicationEnabled()
                             throws WebADEException
Checks the enabled flag for the application.

Returns:
Returns true if the application is enabled.
Throws:
WebADEException - Thrown when an error occurs while trying to retrieve the information from the datastore.

setApplicationEnabled

public void setApplicationEnabled(boolean enabled)
                           throws WebADEException
Sets the application's enabled flag to the given value.

Parameters:
enabled - Enabled flag.
Throws:
WebADEException - Thrown when an error occurs while trying to retrieve the information from the datastore.

getUserDefaultOrganization

public Organization getUserDefaultOrganization(UserCredentials userCredentials)
                                        throws WebADEException
Gets the user's default organization.

Parameters:
userCredentials - The credentials of the user to load.
Returns:
The selected organization.
Throws:
WebADEException - Thrown if an error occurs while getting the default organization.

setUserDefaultOrganization

public void setUserDefaultOrganization(UserCredentials userCredentials,
                                       Organization organization)
                                throws WebADEException
Sets the user's default organization to the given organization.

Parameters:
userCredentials - The credentials of the user to load.
organization - The selected organization.
Throws:
WebADEException - Thrown if an error occurs while setting the default organization.

getApplicationRoles

public Role[] getApplicationRoles()
                           throws WebADEException
Returns the set of roles for the given application code.

Returns:
The array or Role objects defined for this application.
Throws:
WebADEException - Thrown when an error occurs while trying to retrieve the information from the datastore.

getPooledResourceProperties

public java.util.Properties getPooledResourceProperties(java.lang.String roleName)
                                                 throws WebADEException
Retrieves the set of configuration properties for a pooled resource.

Parameters:
roleName - The role that the resource is assigned to.
Returns:
The complete set of configuration properties.
Throws:
WebADEException - Thrown when an error occurs while trying to retrieve the information from the datastore.

getApplicationActions

public Action[] getApplicationActions()
                               throws WebADEException
Returns the set of actions defined for the given application code, regardless of role assignment.

Returns:
An array of action names.
Throws:
WebADEException - Thrown when an error occurs while trying to retrieve the information from the datastore.

getPublicWebADEPermissions

public WebADEUserPermissions getPublicWebADEPermissions()
                                                 throws WebADEException
Returns the public permissions from the datastore. If no user can be identified with the request, this method will be userd to return a set of public authorizations.

Returns:
A WebADEUserPermissions object for the public unauthenticated user.
Throws:
WebADEException

getWebADEUserPermissions

public WebADEUserPermissions getWebADEUserPermissions(UserCredentials userCredentials)
                                               throws WebADEException
Loads the target user's permissions from the datastore, or returns null if the user is not found. Will return the session user's cached permissions object, if the given credentials match the current user's credentials.

Parameters:
userCredentials - The user's identifying credentials.
Returns:
A WebADEUserPermissions object for the target user.
Throws:
WebADEException

getWebADEUserPermissions

public WebADEUserPermissions getWebADEUserPermissions(UserCredentials userCredentials,
                                                      boolean ignoreSessionCache)
                                               throws WebADEException
Loads the target user's permissions from the datastore, or returns null if the user is not found.

Parameters:
userCredentials - The user's identifying credentials.
ignoreSessionCache - A flag indicating whether to ignore the session user permissions object, should it match the given user credentials.
Returns:
A WebADEUserPermissions object for the target user.
Throws:
WebADEException

getWebADEUserInfo

public WebADEUserInfo getWebADEUserInfo(UserCredentials userCredentials)
                                 throws WebADEException
Loads the target user's personal information from the datastore, or returns null if the user is not found. Will return the session user's cached info object, if the given credentials match the current user's credentials.

Parameters:
userCredentials - The user's identifying credentials.
Returns:
A WebADEUserInfo object for the target user.
Throws:
WebADEException

getWebADEUserInfo

public WebADEUserInfo getWebADEUserInfo(UserCredentials userCredentials,
                                        boolean ignoreSessionCache)
                                 throws WebADEException
Loads the target user's personal information from the datastore, or returns null if the user is not found.

Parameters:
userCredentials - The user's identifying credentials.
ignoreSessionCache - A flag indicating whether to ignore the session user info object, should it match the given user credentials.
Returns:
A WebADEUserInfo object for the target user.
Throws:
WebADEException

createUserSearchQuery

public UserSearchQuery createUserSearchQuery(UserTypeCode userType)
                                      throws WebADEException
Returns the UserSearchQuery metadata object to perform user searching for this application on the provided user type.

Parameters:
userType - The user type to perform searching for.
Returns:
A UserSearchQuery object.
Throws:
WebADEException - Thrown when an error occurs while trying to create the search query from the user provider for the given user type.

findUsers

public WebADEUserInfo[] findUsers(UserSearchQuery searchQuery)
                           throws WebADEException
Finds the set of WebADEUserInfo objects that match the provided search criteria.

Parameters:
searchQuery - The search query.
Returns:
A List of WebADEUserInfo objects.
Throws:
WebADEException - Thrown when an error occurs while trying to retrieve the information from the datastore.

getUserSearchMetadata

public java.util.List getUserSearchMetadata()
Deprecated. Use createUserSearchQuery() instead, passing in the target user type code to search on.

Returns a List of UserSearchObject metadata objects for all configured directories for this application.

Returns:
A List of UserSearchObject objects.

findWebADEUsers

public WebADEUserInfo[] findWebADEUsers(UserSearchObject searchObject)
                                 throws WebADEException
Deprecated. Use findUsers() instead, passing in the target user search query to search on.

Finds the set of WebADEUserInfo objects that match the provided search criteria.

Parameters:
searchObject - The search object.
Returns:
A List of WebADEUserInfo objects.
Throws:
WebADEException - Thrown when an error occurs while trying to retrieve the information from the datastore.

getElectronicAgreement

public ElectronicAgreement getElectronicAgreement(java.lang.String agreementName)
                                           throws WebADEException
Returns the target agreement, based on the given agreement name.

Parameters:
agreementName - The name of the target agreement.
Returns:
The target ElectronicAgreement.
Throws:
WebADEException - Thrown when an error occurs while trying to retrieve the information from the datastore.

hasUserAcceptedAgreement

public boolean hasUserAcceptedAgreement(UserCredentials userCredentials,
                                        java.lang.String agreementName)
                                 throws WebADEException
Returns a flag indicating whether the user has previously agreed to the given agreement.

Parameters:
userCredentials - The user's credentials.
agreementName - The unique name of the target agreement.
Returns:
The set of application role names authorized to that user.
Throws:
WebADEException - Thrown when an error occurs while trying to retrieve the information from the datastore.

setUserAcceptedAgreement

public void setUserAcceptedAgreement(UserCredentials userCredentials,
                                     java.lang.String agreementName,
                                     boolean agreeFlag)
                              throws WebADEException
Sets the user's "accepted" flag on the given agreement to the given flag value.

Parameters:
userCredentials - The user's credentials.
agreementName - The unique name of the target agreement.
agreeFlag - A flag indicating whether the user accepts or refuses the given agreement.
Throws:
WebADEException - Thrown when an error occurs while trying to save the flag to the datastore.

getOrganizationSearchMetadata

public OrganizationSearchObject getOrganizationSearchMetadata()
Returns an instance of the appropriate OrganizationSearchObject to be used to search for organizations.

Returns:
The search object.

loadOrganization

public Organization loadOrganization(long organizationId)
                              throws WebADEException
Loads the organization info for the given organization id.

Parameters:
organizationId - The organization to load the organization info for.
Returns:
The given organization with the loaded info, or null if not found.
Throws:
WebADEException - Thrown if an unexpected error occurs while retrieving the info.

findOrganizations

public java.util.List findOrganizations(OrganizationSearchObject searchObject)
                                 throws WebADEException
Returns the set of organization records that match the given ministry-specific organization info.

Parameters:
searchObject - The organization info to match Organization records for.
Returns:
A List of Organization objects.
Throws:
WebADEException - Thrown if an unexpected error occurs while retrieving the info.

isUserInGroups

public GUID[] isUserInGroups(UserCredentials userCredentials,
                             GUID[] groupGuids)
                      throws WebADEException
Checks to see if the user is a member of the groups identified by the given array of GUID values. This method will also traverse the groups' member groups recursively until it has either found the user or exhausted the set of member groups.

Parameters:
userCredentials - The user's credentials.
groupGuids - The unique GUID values of the target groups.
Returns:
The array of all GUID values for groups in the set that the user is a member of (Returns a size-0 array if the user is not a member of any of the given groups).
Throws:
WebADEException - Thrown if an error occurs while processing the request.

hasIndeterminateAuthorizations

public boolean hasIndeterminateAuthorizations(Role role,
                                              Organization organization)
                                       throws WebADEException
Checks to see if a call to getUsersByRole() will throw a IndeterminateAuthorizationsException for the given role and organization.

Parameters:
role - The WebADE role in this application (optional).
organization - The organization to load users of this application for (optional).
Returns:
True if there are authorizations that cannot be fully evaluated, when looking for users in this role.
Throws:
WebADEException - Thrown if an error occurs while performing this query.

getAuthorizedUsers

public UserCredentials[] getAuthorizedUsers(Role role,
                                            Organization organization,
                                            boolean ignoreIndeterminateAuthorizationsErrors)
                                     throws IndeterminateAuthorizationsException,
                                            WebADEException
Loads all users from the datastore that are members the given roles via an authorization associated with the given organization.

Parameters:
role - The role to load users for (optional).
organization - The organization to load users for (optional).
ignoreIndeterminateAuthorizationsErrors - If set to true, prevents the IndeterminateAuthorizationsException from being thrown, if it occurs.
Returns:
An array of member User objects.
Throws:
IndeterminateAuthorizationsException - Throws IndeterminateAuthorizationsException if the list of users cannot be completely loaded.
WebADEException - Throws a base WebADEException if an error occurs while performing this query.

handlesSourceDirectory

public boolean handlesSourceDirectory(java.lang.String sourceDirectory)
                               throws WebADEException
Returns true if the given sourceDirectory is one of the ones supported by this provider.

Parameters:
sourceDirectory - The target sourceDirectory name.
Returns:
True if this provider provides support for the given domain.
Throws:
WebADEException

handlesUserType

public boolean handlesUserType(UserTypeCode userType)
                        throws WebADEException
Returns true if the given user type is one of the ones supported by this provider.

Parameters:
userType - The target user type.
Returns:
True if this provider provides support for the given user type.
Throws:
WebADEException

getSourceDirectoryForUserType

public java.lang.String getSourceDirectoryForUserType(UserTypeCode userType)
                                               throws WebADEException
Returns the source directory for the given user type if it is supported by this provider.

Parameters:
userType - The target user type.
Returns:
The source directory name.
Throws:
WebADEException

getUserTypeForSourceDirectory

public UserTypeCode getUserTypeForSourceDirectory(java.lang.String sourceDirectory)
                                           throws WebADEException
Returns the user type for the given source directory if it is supported by this provider.

Parameters:
sourceDirectory - The target sourceDirectory name.
Returns:
The user type code.
Throws:
WebADEException

getSupportedSourceDirectories

public java.lang.String[] getSupportedSourceDirectories()
                                                 throws WebADEException
Returns:
The array of source directory names this provider handles.
Throws:
WebADEException

getSupportedUserTypes

public UserTypeCode[] getSupportedUserTypes()
                                     throws WebADEException
Returns:
The array of user types this provider handles.
Throws:
WebADEException

shutdown

public void shutdown()
              throws java.lang.SecurityException
Shuts down the datastore.

Throws:
java.lang.SecurityException - Thrown if an unauthorized class calls this method.

getUserPreferences

public Preferences getUserPreferences(long euserId)
                               throws WebADEException
Deprecated.  

Returns the user preferences for the given EUser id.

Parameters:
euserId - The unique id of the target user.
Returns:
A loaded Preferences object with the set of preference values.
Throws:
WebADEException - Thrown when an error occurs while trying to retrieve the information from the datastore.

getUsersByRole

public User[] getUsersByRole(java.lang.String roleName)
                      throws WebADEException
Deprecated.  

Returns the set of users associated with this role. Deprecated as this type of access to the WebADE authorization infrastructure will no longer return accurate results, as any user granted authorization via a group will not be returned by this call.

Parameters:
roleName - The target role name.
Returns:
The set of users associated with that role.
Throws:
WebADEException

getUsersByOrganization

public User[] getUsersByOrganization(long organizationId)
                              throws WebADEException
Deprecated.  

Returns the set of users associated with this organization. Deprecated as this type of access to the WebADE authorization infrastructure will no longer return accurate results, as any user granted authorization via a group will not be returned by this call.

Parameters:
organizationId - The target organizationId.
Returns:
The set of users associated with that organization.
Throws:
WebADEException

getUsersByRoleAndOrganization

public User[] getUsersByRoleAndOrganization(java.lang.String roleName,
                                            long organizationId)
                                     throws WebADEException
Deprecated.  

Returns the set of users associated with the given role and organization. Deprecated as this type of access to the WebADE authorization infrastructure will no longer return accurate results, as any user granted authorization via a group will not be returned by this call.

Parameters:
roleName - The target role name.
organizationId - The target organizationId.
Returns:
The set of users associated with that organization.
Throws:
WebADEException

getUserById

public User getUserById(java.lang.String userId)
                 throws WebADEException
Deprecated.  

Returns the user identified by the given userid.

Parameters:
userId - The full userid, including domain.
Returns:
The user object, including organizations and user preferences.
Throws:
WebADEException - Thrown when an error occurs while trying to retrieve the information from the datastore.

getUserByGUID

public User getUserByGUID(java.lang.String guid)
                   throws WebADEException
Deprecated.  

Returns the user identified by the given guid. Deprecated and replaced by method of same name but accepting a GUID object.

Parameters:
guid - The unique guid identifying the user.
Returns:
The user object, including organizations and user preferences.
Throws:
WebADEException - Thrown when an error occurs while trying to retrieve the information from the datastore.

getGroupSearchMetadata

public java.util.List getGroupSearchMetadata()
Deprecated. This method is no longer supported.

Returns a List of GroupSearchObject metadata objects for all configured directories for this application.

Returns:
A List of GroupSearchObject objects.

getGroupByGUID

public Group getGroupByGUID(java.lang.String guid)
                     throws WebADEException
Deprecated.  

Returns the group identified by the given guid.

Parameters:
guid - The unique guid identifying the group.
Returns:
The Group object, including organizations and roles.
Throws:
WebADEException - Thrown when an error occurs while trying to retrieve the information from the datastore.

findGroups

public java.util.List findGroups(GroupSearchObject searchObject)
                          throws WebADEException
Deprecated.  

Finds the set of Group objects that match the provided search criteria.

Parameters:
searchObject - The search object.
Returns:
A List of Group objects, without the organization and roles information.
Throws:
WebADEException - Thrown when an error occurs while trying to retrieve the information from the datastore.

isUserInGroups

public java.lang.String[] isUserInGroups(User user,
                                         java.lang.String[] groupGuids)
                                  throws WebADEException
Deprecated.  

Checks to see if the user is a member of the groups identified by the given array of GUID values. This method will also traverse the groups' member groups recursively until it has either found the user or exhausted the set of member groups. Deprecated and replaced with method of same name, but using GUID objects.

Parameters:
user - The target user object.
groupGuids - The unique GUID values of the target groups.
Returns:
The array of all GUID values for groups in the set that the user is a member of (Returns a size-0 array if the user is not a member of any of the given groups).
Throws:
WebADEException - Thrown if ant of the groups are not found or an error occurs while processing the request.

getUserDefaultOrganization

public Organization getUserDefaultOrganization(User user)
                                        throws WebADEException
Deprecated.  

Gets the user's default organization.

Parameters:
user - The target user.
Returns:
The selected organization.
Throws:
WebADEException - Thrown if an error occurs while getting the default organization.

setUserDefaultOrganization

public void setUserDefaultOrganization(User user,
                                       Organization organization)
                                throws WebADEException
Deprecated.  

Sets the user's default organization to the given organization.

Parameters:
user - The target user.
organization - The selected organization.
Throws:
WebADEException - Thrown if an error occurs while setting the default organization.

findUsers

public java.util.List findUsers(UserSearchObject searchObject)
                         throws WebADEException
Deprecated.  

Finds the set of User objects that match the provided search criteria.

Parameters:
searchObject - The search object.
Returns:
A List of User objects, without the organization and roles information.
Throws:
WebADEException - Thrown when an error occurs while trying to retrieve the information from the datastore.

hasUserAcceptedAgreement

public boolean hasUserAcceptedAgreement(User user,
                                        java.lang.String agreementName)
                                 throws WebADEException
Deprecated.  

Returns a flag indicating whether the user has previously agreed to the given agreement.

Parameters:
user - The user.
agreementName - The unique name of the target agreement.
Returns:
The set of application role names authorized to that user.
Throws:
WebADEException - Thrown when an error occurs while trying to retrieve the information from the datastore.

setUserAcceptedAgreement

public void setUserAcceptedAgreement(User user,
                                     java.lang.String agreementName,
                                     boolean agreeFlag)
                              throws WebADEException
Deprecated.  

Sets the user's "accepted" flag on the given agreement to the given flag value.

Parameters:
user - The user.
agreementName - The unique name of the target agreement.
agreeFlag - A flag indicating whether the user accepts or refuses the given agreement.
Throws:
WebADEException - Thrown when an error occurs while trying to save the flag to the datastore.