jamwiki

History #

From the Git logs, Brian Chan added the ./lib/jamwiki-core.jar jar file to liferay in August 2010.

In order to make Liferay more modular, the JamWiki code is being separated into a hook by adding "hookability" feature as suggested by Jorge Ferrer. See the discussion at following URI for more information:

http://www.liferay.com/community/forums/-/message_boards/message/19077352

How to separate JAMWiki from Liferay Core #

In followingsteps:

  1. Find all affected components.
  2. What will portal look like after the components are rearranged?
  3. Layout steps to separate out JamWiki from Portal.
  4. Accomplish each step. Committing to https://github.com/bmvakili/liferay-portal/tree/lps-jamwiki and https://github.com/bmvakili/liferay-plugins/tree/lps-jamwiki
  5. Verify and Validate.
  6. Make Pull Request from Jorge Ferrer.

Find All Affected Components #

The affected components are:

  1. Liferay Core. Specifically, the com.liferay.portlet.wiki.engines.mediawiki and com.liferay.portlet.wiki.importers.mediawiki
  2. JamWiki
  3. JamWiki Hook

 Use Class Dependency Analyzer to find dependency isues that need to be resolved for JamWiki to be extracted:

http://www.dependency-analyzer.org/

What will the portal look like after the components are rearranged? #

Run

ls -Ad / | grep -v git | xargs find | xargs egrep -d skip  -ie "(jamwiki|mediawiki)"

To find list of affected files.

Remove:

        tools/jamwiki-0.9.3-src.zip
        lib/portal/jamwiki-core.jar
        portal-impl/src/com/liferay/portlet/wiki/engines/mediawiki/MediaWikiEngine.java
        portal-impl/src/com/liferay/portlet/wiki/engines/mediawiki/DummyDataHandler.java
        portal-impl/src/com/liferay/portlet/wiki/engines/mediawiki/LiferaySearchEngine.java
        portal-impl/src/com/liferay/portlet/wiki/engines/mediawiki/LiferayDataHandler.java
        portal-impl/src/com/liferay/portlet/wiki/engines/mediawiki/matchers/ImageURLMatcher.java
        portal-impl/src/com/liferay/portlet/wiki/engines/mediawiki/matchers/PortletURLMatcher.java
        portal-impl/src/com/liferay/portlet/wiki/engines/mediawiki/matchers/EditURLMatcher.java
        portal-impl/src/com/liferay/portlet/wiki/engines/mediawiki/matchers/ImageTagMatcher.java
        portal-impl/src/com/liferay/portlet/wiki/engines/mediawiki/matchers/ViewURLMatcher.java
        portal-impl/src/com/liferay/portlet/wiki/translators/MediaWikiToCreoleTranslator.java
        portal-impl/src/com/liferay/portlet/wiki/importers/mediawiki/MediaWikiImporter.java
        portal-impl/test/integration/com/liferay/portlet/wiki/translators/MediaWikiToCreoleTranslatorTest.java

Modify:

        nbproject/project.xml
                Update the classpath to exclude reference to jamwiki jar file.
        portal-web/docroot/html/portlet/wiki/edit/wiki.jsp
                Remove EDITOR_SIMPLE_IMPL_KEY reference to Mediawiki
        portal-impl/src/build.xml
                Lines 1081-1117 because these are specific to JamWiki which is no longer going to be part of core.
        portal-impl/src/portal.properties
                Remove the properties:
                        editor.wysiwyg.portal-web.docroot.html.portlet.wiki.edit.mediawiki.jsp=simple
                        wiki.formats.engine[mediawiki]=com.liferay.portlet.wiki.engines.mediawiki.MediaWikiEngine
                        wiki.formats.edit.page[mediawiki]=/html/portlet/wiki/edit/wiki.jsp
                        wiki.formats.help.page[mediawiki]=/html/portlet/wiki/help/mediawiki.jsp
                        wiki.formats.help.url[mediawiki]=[[http://www.mediawiki.org/wiki/Help:Formatting|http://www.mediawiki.org/wiki/Help:Formatting]]


                        wiki.importers.page[MediaWiki]=/html/portlet/wiki/import/mediawiki.jsp
                        wiki.importers.class[MediaWiki]=com.liferay.portlet.wiki.importers.mediawiki.MediaWikiImporter


                Modify the properties:
                        wiki.formats=creole,html,{"mediawiki"=>""}
                        wiki.importers={"MediaWiki"=>""}
        portal-impl/src/content/Language*
                Update to remove the references to Mediawiki


        portal-impl/src/META-INF/javadocs-all.xml
                Needs to be rebuilt to remove references to JamWiki / Mediawiki after this is done
        lib/versions.xml
                Need to remove references to jamwiki.
        portal-impl/src/com/liferay/portal/events/GlobalStartupAction.java
                Remove reference to jamwiki.

        portal-impl/src/com/liferay/portal/deploy/hot/HookHotDeployListener.java                Need to update HookHotDeployer to detect if wiki engine is being added;

Integration Code #

Modify: portal-impl/src/com/liferay/portal/deploy/hot/HookHotDeployListener.java Need to update HookHotDeployer to detect if wiki engine is being added;

Rename: portal-{"impl"=>"service"}/src/com/liferay/portlet/wiki/engines/WikiEngine.java Need to move the WikiEngine class to service so it is accessible from the hook scope

JamWiki #

nothing

0 Attachments
5055 Views
Average (0 Votes)
The average rating is 0.0 stars out of 5.
Comments
No comments yet. Be the first.