blackboard building blocks™: data integration and administration raymond peterson, blackboard, inc
DESCRIPTION
Overview –Background –APIs –Security and Context –Calling the Event APIs –Demonstration –SummaryTRANSCRIPT
Blackboard Building Blocks™:Data Integration and Administration
Raymond Peterson,Blackboard, Inc.
Now a word from our lawyers…Any statements in this presentation about future expectations, plans and prospects for Blackboard and other statements containing the words "believes," "anticipates," "plans," "expects," "will," and similar expressions, constitute forward-looking statements within the meaning of The Private Securities Litigation Reform Act of 1995. Actual results may differ materially from those indicated by such forward-looking statements as a result of various important factors, including the factors discussed in the "Risk Factors" section of our most recent 10-K filed with the SEC. In addition, the forward-looking statements included in this press release represent the Company's views as of April 11, 2005. The Company anticipates that subsequent events and developments will cause the Company's views to change. However, while the Company may elect to update these forward-looking statements at some point in the future, the Company specifically disclaims any obligation to do so. These forward-looking statements should not be relied upon as representing the Company's views as of any date subsequent to April 11, 2005. Blackboard, in its sole discretion, may delay or cancel the release of any product or functionality described in this presentation.
Overview
–Background–APIs–Security and Context–Calling the Event APIs–Demonstration–Summary
Background– Event API is the oldest public API in Blackboard
Learning System™– First released with Blackboard5™ version 5.5– Same data model as the Snapshot data
integration - IMS 1.2 Enterprise Specification
– Don’t confuse this with Event Triggers/Callbacks This is a Java API only
– New API packages in Release 6, brought into line with Blackboard Building Blocks API
– Integration password new in Release 6 for remote client capability
Which API is that?
• blackboard.* Building Block API
• blackboard.admin.* Release 6 Event API
• com.blackboard.event.* Bb 5.5 Event API
(deprecated)
Event API in a Nutshell– Similar data model as Building Block™ API– Two main types of objects in the API:
• entities (objects) • persisters (actions)
– Entities include the objects that represent data in the system, such as users.
– Persisters are behind-the-scenes methods that handle the storage of the entities into a persistent store or transient data format.
Event API Entities– IMS specification – five entities
• Person (User)• Course / Organization• Enrollment / Staff assignment /
Organization membership• Course / organization category• Course / organization category membership
– Additional Blackboard-specific entities• Data Source• Portal Role Membership
Building Block vs Event API• Event API entities are sub-classes of the
Building Block API entities.• All entities include rowStatus attribute (e.g.,
getRowStatus(), setRowStatus()) not found on core data entities
• java.lang.Object | +-blackboard.data.BbObject | +-blackboard.data.user.UserInfo | +-blackboard.data.user.User | +-blackboard.admin.data.user.Person
Building Block vs Event API• Event API persisters are NOT sub-classes of the
Building Block API persisters.• blackboard.persist.user
Interface UserDbLoaderAll Superinterfaces: – blackboard.persist.Loader
• blackboard.admin.persist.user Interface PersonLoader All Superinterfaces: – blackboard.persist.Loader
Event API Packages• Packages contained in cms-admin.jar
blackboard.admin.data.user
• Person– Inherits from
blackboard.data.user.User– Batch UID (Unique
Identifier) is the external system’s primary key
blackboard.admin.data. user
blackboard.admin.data.course
• CourseSite, Organization– Inherits from blackboard.data.course.Course
• StaffAssignment, Organization Membership– Inherits from
blackboard.data.course.CourseMembership• Enrollment
– Role is Student only
blackboard.admin.data. course
blackboard.admin.data.category
• CourseCategory, OrganizationCategory– Represents a category in a Course or
Organization catalog• CourseCategoryMembership,
OrganizationCategoryMembership– Ties courses and organizations together with
Categories
blackboard.admin.data. category
Data Source• Programmatic equivalent of same entity in Snapshot• Explicit instance of the “sourcedid” attribute from the
IMS specification• Used to “group” logically related entities• For example…
– Group users by term– Group courses by term– Group by college– … or whatever
• Always a default “SYSTEM” data source
blackboard.admin.persist.user
• PersonLoader– Load by BatchUID, Template
• PersonPersister– changeKey, insert, remove, save, update
blackboard.admin.persist. user
blackboard.admin.persist.course
• CourseSiteLoader, Organization Loader– Load by BatchUID– Load by Template
• EnrollmentLoader, OrganizationMembershipLoader, StaffAssignmentLoader
• CourseSitePersister, Organization Persister
blackboard.admin.persist. course
blackboard.admin.persist.course• In addition to typical persister operations,
CourseSitePersister can perform a clone operation (Course Copy):
public void clone(java.lang.String srcCrsBatchUid, java.lang.String tgtCrsBatchUid, CloneConfig cfg)
Tip: The CloneConfig object controls what areas of a course are copied.
Other Packages
• blackboard.admin.persist.category• blackboard.admin.persist.role• blackboard.admin.persist.datasource
Persistence Operations• Persistence operations (load and store) are what
differentiate the Admin APIs from the Blackboard Building Block APIs
• More flexible than the Blackboard Building Block APIs, which just do persist() (insert vs. update)
• “Smart” update– Update only those attributes that are explicitly set
• “Change Key” – update the batchUID for a new value from the external system (User only)– Derived from snapshot operation
Persistence Operations• Template loads
– Create a data object that “looks like” the data you want to return
– Can use SQL wildcards, closest thing to ad hoc queries we have
– Use with care…
PersonLoader pLoader; pLoader = (PersonLoader) bbPm.getLoader(PersonLoader.TYPE); Person template = new Person(); template.setFamilyName( “B%” ); List list = pLoader.load( template );
Security and Context– No security manager or permissions manifest– Initialize the BbServiceManager from system properties– String configFile =
"c:/blackboard/config/service-config-standalone.properties";BbServiceManager.init( configFile );
– BbServiceManager then allows access to the other services, such as Persistence to create loaders and persisters.
– BbPersistenceManager bbPm = BbServiceManager.getPersistenceService().getDbPersistenceManager();
– Should explicitly close the BbServiceManager– BbServiceManager.shutdown();
Security and Context– If installed remotely, also need to supply Integration
password and VI to initialize BbServiceManager (same as required to run the Snapshot Client remotely)
String configFile = "c:/blackboard/config/service-config-standalone.properties";
Properties bbProps = new Properties();bbProps.setProperty("remote.access.password", "InTeGr@i0n");bbProps.setProperty("remote.access.domain","server.dc.blackboard.co
m");BbServiceManager.init( configFile, bbProps );
...
BbServiceManager.shutdown();
Security and Context– Initialise context from the VI with
BbServiceManager ContextManagerServerImpl cMgr VirtualInstallationManager vMgr = null; VirtualHost vHost = null; try { cMgr = (ContextManagerServerImpl)BbServiceManager.
lookupService( ContextManager.class ); vMgr = (VirtualInstallationManager)BbServiceManager.
lookupService( VirtualInstallationManager.class ); vHost = vMgr.getVirtualHost("server.dc.blackboard.com"); cMgr.setContext(vHost); } catch (Exception e) { throw e; }
...
cMgr.releaseContext();
Security and Context– The Event APIs can also be called from within a Building
Block. In this case, the Building Block API contains taglibs to initialize the BbServiceManager and Context.
• <%@ taglib uri="/bbData" prefix="bbData"%>• <bbData:context> • <%• // BbServiceManager is available to create other services• BbPersistenceManager bbPm =
BbServiceManager.getPersistenceService().getDbPersistenceManager();
• ...• %>• </bbData:context>
– Use extreme care if including Event API calls in Building Blocks! Include checks on who can access the pages, confirmation pages on deletes, etc.
Calling the Event APIs– Write a Java app that runs on the Blackboard® app
server, invoked via the command line– Write a Java app that runs on another server,
which has the Blackboard Snapshot client called– Write a JSP page deployed as part of a
Building Block (Note: can mix and match calls to both APIs)
– Write a web-service that accepts data via HTTP– Write RPC wrappers for an external system to
invoke– … and the possibilities are endless!!!
Demonstration
Summary– Blackboard Event APIs allow access to perform
data integration tasks, via a Java API– The Event API contains a number of interfaces
to control Bb entities– The Event API can be called from any Java
environment, including a Blackboard Building Block
– For further information, see:
• Advanced Integration and Data Management Manual• Administrative API Specifications • Download from http://behind.blackboard.com/