Configuring Import
version information
These instructions assume you are using the code for Sakai 2.3.
If you want to configure the import code with Sakai 2.2.x, see 2.2.x Import Instructions
commercial parsers
Sakai does not come with Blackboard, WebCT, or any other commercial parsers installed. Commercial parsers live in contrib, and must be installed separately. Copy the parser folders you want from https://source.sakaiproject.org/contrib/migration/trunk/import-parsers into your Sakai source code in the /archive/import-parsers directory. You must then configure, build, and deploy the archive module with the new parser(s). You must add dependencies for the additional parsers to the project.xml file in /archive/import-pack.
Edit import-pack/src/webapps/WEB-INF/components.xml file
Configure parsers
By default, the only parser that is configured with Sakai is the original Sakai archive parser. The common cartridge parser is commented out. You can add common cartridge support to import by uncommenting the common cartridge bean.
<!-- File parsers -->
<bean id="org.sakaiproject.importer.api.ImportFileParser-Sakai"
class="org.sakaiproject.importer.impl.SakaiArchiveFileParser"
singleton="false">
</bean>
<!--
<bean id="org.sakaiproject.importer.api.ImportFileParser-CommonCartridge"
class="org.sakaiproject.importer.impl.CommonCartridgeFileParser"
singleton="false">
</bean>
-->
You also have to add your chosen parsers as properties of the ImportService bean. In this case, again, the Sakai archive parser is enabled by default, and the common cartridge must be uncommented:
<property name="parsers">
<list>
<ref bean="org.sakaiproject.importer.api.ImportFileParser-Sakai"/>
<!-- <ref bean="org.sakaiproject.importer.api.ImportFileParser-CommonCartridge"/> -->
</list>
</property>
Configure handlers
A handler is code that works on behalf of a Sakai tool and contributes import content to that tool. You must uncomment the handlers that you want available to the import. The original Sakai input format doesn't use any handlers, because it still uses the ArchiveService to push things into Sakai. The handlers are used by common cartridge as well as any other parsers you configure.
<!-- Handlers -->
<!--
<bean id="org.sakaiproject.importer.impl.handlers.AnnouncementHandler"
class="org.sakaiproject.importer.impl.handlers.AnnouncementHandler"
singleton="true">
<property name="announcementService">
<ref bean="org.sakaiproject.announcement.api.AnnouncementService" />
</property>
</bean>
-->
<!--
<bean id="org.sakaiproject.importer.impl.handlers.ResourcesHandler"
class="org.sakaiproject.importer.impl.handlers.ResourcesHandler"
singleton="true">
</bean>
-->
<!--
<bean id="org.sakaiproject.importer.impl.handlers.SamigoHandler"
class="org.sakaiproject.importer.impl.handlers.SamigoHandler"
singleton="true">
</bean>
-->
<!--
<bean id="org.sakaiproject.importer.impl.handlers.MessageCenterHandler"
class="org.sakaiproject.importer.impl.handlers.MessageCenterHandler"
singleton="true">
</bean>
-->
And just like the parsers, the handlers must be set as properties of the ImportService bean:
<property name="resourceHandlers">
<list>
<!-- <ref bean="org.sakaiproject.importer.impl.handlers.AnnouncementHandler" /> -->
<!-- <ref bean="org.sakaiproject.importer.impl.handlers.ResourcesHandler"/> -->
<!-- <ref bean="org.sakaiproject.importer.impl.handlers.SamigoHandler"/> -->
<!-- <ref bean="org.sakaiproject.importer.impl.handlers.MessageCenterHandler"/> -->
</list>
</property>
Edit import-pack/project.xml
There are two dependencies in import-pack/project.xml that need to be uncommented if you decide to use the Samigo handler. Again, the handlers don't do anything for the original Sakai archive format, so don't bother uncommenting the dependencies for the Samigo handler unless you are using the common cartridge parser or one of the other parsers available at https://source.sakaiproject.org/contrib/migration/trunk/import-parsers