|
The Authentication Module Data utility is jar file utility that can be used by an authentication module to retrieve learning context and user data. Version 1.4 of this utility is compatible with CE 6.0 and Vista 4.0.
Please note: This library is version dependant and a different version of the utility maybe required for future releases of CE 6 and Vista 4. The AM Data Utility is planned to be rolled into the core product SDK in a future release. It is no longer being maintained separately by the developers network. |
|
Learning Context Service
The learning context service is a singleton class that allows you to retrieve learning context data from within the authentication module. The LearningContextService class retrieves a learning context value object given the learning context Id. This example retrieves a learning context value object:
LearningContextVO learningContext = null;
learningContext = LearningContextService.getInstance().getLCInfo(lcId);
The learning context value object (LearningContextVO - unrelated to the LearningCtxVO used by the Context web service) contains several methods to retrieve data associated with the learning context. This example retrieves the parent learning context Id and learning context path from the value object:
long parentLc = learningContext.getParentLcId();
String path = learningContext.getPath();
The learning context service also provides a second method that retrieves all the direct children of the given learning context. This example retrieves a list of learning context Ids for the direct children of the learning context:
List children = null;
children = LearningContextService.getInstance().getLCChildren(lcId.longValue());
for (int i = 0; i < children.size(); i++ ) {
log.debug("Child LC[" + i + "]: " + (Long)children.get(i));
}
User Service
The user service is a singleton class that allows you to retrieve user data from within the authentication module. The UserService class retrieves a user value object given the user Id and learning context Id. This example retrieves a user value object:
UserVO user = null;
user = UserService.getInstance().getUser(theUserId, currentLCId);
The user value object (UserVO) contains several methods to retrieve data associated with the user. This example retrieves the first name and last name from the value object:
String firstName = user.getFirstname();
String lastName = user.getLastname();
The user service also provides a second method that retrieves all the members of a given learning context. This example retrieves a list of value objects for all members of the learning context:
List members = null;
members = UserService.getInstance().getMembers(lcId);
for (int i = 0; i < members.size(); i++ ) {
log.debug("Member[" + i + "]: " + (Long)members.get(i));
}
Installation
The jar file called authmoduledata_ce_1.4.jar can be installed into the deployablecomponents directory along with your PowerLink. We recommended that you install helper jar files (such as authmoduledata_ce_1.4.jar into the same subdirectory as your PowerLink). For example:
deployablecomponents/samplepowerlink/samplepowerlink.jar
deployablecomponents/samplepowerlink/authmoduledata_ce_1.4.jar
Please note that if you have already installed a previous version of the authmodule data utility jar file on your server this must be removed.
Revision history
1.0
- Initial release for CE6/Vista4
1.1
- The UserService getPrimaryKey() returns the full sourceId value
- A getPersonId() method was added to the UserVO
- A getLearningContexts() method was added to the UserService
- Shortcut methods isSectionDesigner(), ..., isCourse() were added to the UserVO and LearningContextVO objects
- Public constructors for the VO objects were created for JUnit testing
1.2
- Changed personId from int to long
1.3
- Changed UserVO.getInstitutionLCId() from int to long
- Made compatible with SQL Server backend
1.4
- Fixed UserService.getLearningContexts() method for SQL Server backend
Download
Javadocs
JAR library
 | This article originally authored by Scott Stanley on the WebCT DevNet
|
George, thanks for bringing this useful module over to EduGarage. You say "The AM Data Utility is planned to be rolled into the core product SDK in a future release"; do you have any idea of timescale this will happen in? In the meantime, do you know of any plans to fix any of the reported bugs with this module (which has not yet been updated for AP1 or AP2)?
Hi Stephen,
I personally would hope sooner than later, but I have no insight into these plans. Please keep reporting any issues found with this utility to our Support team requesting that they be escalated as appropriate. And please let edugarage@blackboard.com know if you receive any push back regarding support cases related to this utility in particular.
All the known issues with this module that I am aware of can be found on my SDK Known Issues page at http://www.spvsoftwareproducts.com/powerlinks/issues.html
(along with some other reported issues relating to the SDK). In the absence of a Known Issues page on this site, I would be pleased to hear about any others anyone else is aware of so that I can add them to this page. I also invite others to report any of these known issues which are affecting them so as to provide further incentives for Blackboard to fix them!
An open source equivalent to this utility is now available as a beta from the OSCELOT site; for further details see the documentation at http://www.spvsoftwareproducts.com/powerlinks/webctdao/
It can be tested by just changing references to com.webct.platform.sdkext.authmoduledata in your source files. I would welcome feedback from anyone who has time to test this new package, especially if you have a test cluster. I also have a PowerLink which performs a comparison of the output with the original package; if anyone is interested in trying this please contact me off-line.
The documentation also includes some proposed enhancements to the package to make it even more useful; for example, to get term-related data, identify primary section instructors and return the version of WebCT being used. Other suggestions are invited for inclusion in the next release.