Portal Modules and Module Types

advertisement
Blackboard Building Blocks
Portal Modules and
Module Types
Tom Joyce, Product Manager, Product
Development
Wednesday, April 08, 2015
Road Map
What are Portals?
Module Types
Creating Modules
API
What are Portals?
Portal = Entry point
Customizable for the user
Can unite several sources of information
and present them in one central place
Sites can customize the Portal for a
specific type of user or market
Good portals are “sticky”
Example of a “sticky” Portal
Blackboard
Portal
Components
Tab
Layout
Contents
Module
Module Edit
Minimize
Delete
Module Types
Code for the Module
Every Module has an associated Type
One or more JSP pages
Pre Built Module Types
Include HTML
Include URL
RSS Channel
Module Type JSP Pages
View
– What gets displayed when the module is
rendered
Admin
– Edit Global properties
Edit
– User customizable properties
View
 Rendered Inline
 No HTML Header or Body Tags
Edit
Calls the edit page
Edit
Admin
Admin Page for
Global
Configuration
Admin
Creating Module Types
JSP is easiest
Tags Provided for Edit and Admin Pages
– modulePersonalizationPage
– modulePersonalizationReceipt
– moduleAdminPage
– ModuleAdminReceipt
Portal API
Java
Class: CustomData
In package blackboard.portal.external
Javadoc available in SDK
Portal API
To get the CustomData for a module, use
getModuleData(context)
CustomData data =
CustomData.getModuleData(pageContext);
String text = data.getValue(“body.lunchMenu”);
String text = data.getValue(“body.type”);
Portal API
Can also save module global properties
CustomData data =
CustomData.getModuleData(pageContext);
String text = data.setValue(“body.lunchMenu”,
“Roast Turkey”);
String text =
data.setValue(“body.type”,”Entrée”);
data.save();
Portal API
Similar Methods exist to set user specific
data
CustomData data =
CustomData.getModulePersonalizationData(pageContext
);
String text = data.setValue(“userpref.display”,
“ALL”);
data.save();
Packaging the Module Type
Put it in a System Extension Package
JSPs in /module directory
<module-type ext-ref="smpl-module" title="Sample
Plug-in Module Type" uicreatable="true">
<jsp-dir>module</jsp-dir>
<jsp>
<view>view.jsp</view>
<edit>edit.jsp</edit>
<admin>admin.jsp</admin>
</jsp>
</module-type>
Creating a Module
Can specify a module type already in the
system or in the same installation package
Many modules can be created using the
Bb supplied types
Could leverage types that become
available in the community
Entries in bb-manifest.xml file:
– module
– channel
Creating a Module
Module is packaged a standard Integration
Agent Package
bb-manifest.xml
– module
– channel
Specifying a Module
Module Manifest Entry:
<module type="portal/channel" isadmin="true"
useraddable="true" isdeletable="true" title="Sample
Channel Module">
<description>Sample channel module. This
module accesses the RSS channel installed with this
plug-in.</description>
<ExtraInfo>
<property key="channel.id"
type="String">smpl-gamenews</property>
</ExtraInfo>
</module>
Specifying a Module
Channel Manifest Entry (Module Def):
<module type="portal/channel" isadmin="true"
useraddable="true" isdeletable="true" title="Sample
Channel Module">
<description>Sample channel module. This
module accesses the RSS channel installed with this
plug-in.</description>
<ExtraInfo>
<property key="channel.id"
type="String">smpl-gamenews</property>
</ExtraInfo>
</module>
Specifying a Module
Channel Manifest Entry (Channel Def):
<rss-channel ext-ref="gamenews" title="Game News">
<data-url>
<http://www.palminfocenter.com/feed.xml
</data-url>
</rss-channel>
Specifying a Module
Can also optionally specify Portal Roles
<module-groups>
<module-group id="Student"/>
</module-groups>
Demonstration!
Thank You
Demos to Follow >
Download