290 likes | 465 Views
uPortal 101. JA-SIG Pre-conference Seminar Susan Bramhall & Andrew Petro Vancouver, BC, June 4, 2006. Who am I?. Yale University Portal Implementer Occasional contributor to uPortal Early adopter of Distributed Layout Manager Grandmother. Our Agenda. Please follow along on the wiki:
E N D
uPortal 101 JA-SIG Pre-conference Seminar Susan Bramhall & Andrew Petro Vancouver, BC, June 4, 2006
Who am I? • Yale University Portal Implementer • Occasional contributor to uPortal • Early adopter of Distributed Layout Manager • Grandmother
Our Agenda Please follow along on the wiki: http://www.ja-ig.org/wiki/display/JCON/uPortal+101 • Building uPortal • Logging • Configuration Flavors (properties, Spring, xml) • Database • Starting it up! • Authentication • User Attributes, IPerson • Groups • Channels • Layout Management (very brief) • Stats Recording
Building uPortal • Details in the wiki at: http://www.ja-ig.org/wiki/display/JCON/uPortal+101 • Set up development environment in Eclipse • Create project containing uPortal 101 Vancouver branch from JA-SIG repository • Compile and deploy to Tomcat Server • We will use ant tasks to run other uPortal tools. • Source for tools in package org.jasig.portal.tools
uPortal Database • JNDI or JDBC • rdbm.properties vs container DAO • Tests by DatabaseMetaData • Pooling Connections
JNDI or JDBC? In portal.properties: • RDBMServices.getDatasourceFromJndi • “false” when no container • “true” if container supplied • RDBMServices.jndiRetryDelay • RDBMServices.PortalDatasourceJndiName • The name used to request data source from container
rdbm.properties • rdbm.properties jdbc parameters: jdbcDriver=org.hsqldb.jdbcDriver jdbcUrl=jdbc:hsqldb:hsql://localhost:8887 jdbcUser=sa jdbcPassword= • Also has pooling built in via jdbcUsePool=true
JNDI • Container supplies data source • Well known implementations • Ant deploy target populates context descriptor (uPortal.xml or uPortal55.xml) from rdbm.properties • RDBMServices.getDataSource(name) • Will return any available jndi data source to a channel
Pooling Database Connections • Definitely need to do this either using RDBMServices or container • See uPortal.xml and uPortal55.xml for example configurations
RDBM Services Metadata • Attempts to do outer joins to determine correct syntax • Join test failed: Errors in log are normal
uPortal Database in Practice • For this seminar see wiki: http://www.ja-sig.org/wiki/x/2Ds • Start hsqldb • Set up uPortal 101 project to point to hsqldb • Verify using “ant dbtest”
Start uPortal • Run “ant initportal” • Start Tomcat • Browse to http://localhost:8080/uPortal
User Attributes / Person Directory • IPerson is the object containing user attributes • Attributes come from jdbc or ldap • Or a source you invent
PersonDirectory.xml • Legacy is PersonDirs.xml • Jdbc and ldap parameters inline • API allows extension • Spring configurable beans
Spring Beans • JNDI DAOs • LDAP • Wrappers • Merging, caching • Example: http://www.ja-sig.org/wiki/x/Xjw
User Management Q: OK, I have configured the user object. How do users get created? A: It all happens at login • After Authentication succeeds… • Attributes are found via Person directory service • Layout is determined by layout manager based on groups and user attributes. • How? Come back after short break to get the rest of the story
Groups Management • See wiki: http://www.ja-sig.org/wiki/display/UPC/Composite+Group+Service+Guide • Groups Service • Extensible through API • Configurable via XML • Combine as many as needed into Composite Group Service
compositeGroupServices.xml • Starts with Local groups in uportal database • Includes comments for • LDAP group service (beware) • File System group service • Person Attribute Group service (PAGS)
Local Groups in uPortal Database • Persisted in uPortal database • groups management channel • Users are copied to the local groups of assigned template on first login • Group membership does not change automatically after login • Appropriate for local portal permissions
Other Group Stores • File System Groups • Based on file system directory structure • LDAP groups And Person Attribute Group Store • Based on attributes of IPerson • Try out http://www.ja-sig.org/wiki/x/Yjw
Layout Management • How does content get into a user’s layout? • SLM vs. ALM vs. DLM
folder type=“root” folder (tab) folder (tab) folder (tab) folder (column) folder (column) folder (column) folder (column) folder (column) channel channel channel channel channel channel channel The Layout An xml tree of generic folders and channels
Which Layout Manager? • Simple Layout Manager (SLM) • uPortal 1.0 to present • Aggregated Layout Manager (ALM) • uPortal 2.0 to present • Distributed Layout Manager (DLM) • uPortal 2.5 to present
Steps to Pushing DLM Fragment • Define the fragment in dlm.xml • Login as the fragment owner and set up the layout
Exercising DLM • See Mark Boyd’s excellent documentation DLM Administration Guide • An exercise if there is time: http://www.ja-sig.org/wiki/x/ajw
There is lots more to learn For example: • Caching options • Internationalization / localization • ssl issues, HttpProxyServlet • Using other containers • Running unit tests • More extension points
Good Luck! • Use the wiki and list archives for questions • Can’t find the answer? Ask the list. • Research and report bugs on JIRA Lists: http://www.uportal.org/getinv.html Wiki: http://www.ja-sig.org/wiki/display/UPC/Home JIRA: http://www.ja-sig.org/issues