-
Notifications
You must be signed in to change notification settings - Fork 73
Wiki Integration
To make it easier to customize the content and look-and-feel of your onebusaway-webapp installation, we provide a content configuration option that we call wiki integration. The idea is that you can point your onebusaway-webapp installation at a wiki or some other content management system, allowing you to control the various content pages that are included in the webapp.
If you're non-profit organization or individual and interested in trying out your own custom wiki with OneBusAway, you might want to try signing up for a free XWiki Community Farm site (NOTE - don't use this for production, it's unstable).
Once you have an Xwiki instance, you can then import the existing OBA XWiki contents via an XAR backup file of the Puget Sound instance.
IMPORTANT - When importing this OBA content, its important that you DO NOT import the "XWiki" directory (i.e., Uncheck the "XWiki" directory during the import process). Otherwise, this will interfere with your current XWiki installation by altering some of the main administration pages. It is recommended that you only important the contents of the "Main" folder.
To start the import, in your XWiki instance go to "Admin->Content->Import". This should give you an exact duplicate of the Puget Sound OBA wiki. Password for all wiki content in the OBA export file is OneBusAway
.
For more information about how OneBusAway fetches XWiki content, please see this OBA dev. list post.
If you have an XWiki installation available at the url http://wiki.mydomain.org
, you can configure your onebusaway-webapp to use the wiki by adding the following elements to your data-sources.xml
config file:
<bean id="wikiDocumentService" class="org.onebusaway.wiki.xwiki.impl.XWikiDocumentServiceImpl">
<property name="xwikiUrl" value="http://wiki.mydomain.org/xwiki" />
</bean>
<bean id="wikiRenderingService" class="org.onebusaway.wiki.xwiki.impl.XWikiRenderingServiceImpl">
<property name="wikiDocumentViewUrl" value="/p/%{documentName}.action" />
<property name="wikiDocumentEditUrl" value="http://wiki.mydomain.org/xwiki/bin/edit/Main/%{documentName}" />
<property name="wikiAttachmentUrl" value="http://wiki.mydomain.org/xwiki/bin/download/Main/%{documentName}/%{attachmentName}" />
</bean>
The two components are a wiki document service and a wiki rendering service that control the source of pages and how they are rendered. There is a fair amount of flexibility in how you configure wiki integration.
Note that if you have the OBA webapp deployed to "/onebusaway-webapp" instead of the root directly, the "wikiDocumentViewUrl" element should instead be <property name="wikiDocumentViewUrl" value="/onebusaway-webapp/p/%{documentName}.action" />
.
onebusaway-wiki-integration
Latest Version: 1.0.0
The OneBusAway Wiki Integration dependency is included in the onebusaway-webapp by default, but you can also use it with other projects. Details on all releases can be found in the Release Notes.
The library is broken up into a few key modules:
- onebusaway-wiki-integration-api - Defines the wiki integration api interfaces
- onebusaway-wiki-integration-file - A file-based wiki integration plugin
- onebusaway-wiki-integration-simple - A dummy wiki integration plugin for testing
- onebusaway-wiki-integration-xwiki - Parent module for the XWiki-based modules
- onebusaway-wiki-integration-xwiki-impl - An XWiki-based wiki integration plugin
- onebusaway-wiki-integration-xwiki-struts-macros - XWiki macros for simulating Struts tags with XWiki markup
- onebusaway-wiki-integration-urlnotification-plugin - XWiki plugin that can make a request to a configurable URL every time a wiki page is edited
You can access the latest Javadoc for the library. Also, see example source code below.
The library is available as a Maven module. Simply add the module dependency:
<dependencies>
<dependency>
<groupId>org.onebusaway</groupId>
<artifactId>onebusaway-wiki-integration-file</artifactId>
<version>1.0.0</version>
</dependency>
</dependencies>