Frameworks on top of JCR

Frameworks

1 Introduction

eXo JCR has several frameworks built on top of JCR API intended for:

  • Simplifying End User JCR application development
  • Helping to make a good designed, layered application
  • Decoupling Application Business Logic from Content storage operations
  • Fitting some data interchange protocol to be used on top of JCR (Protocol frameworks)

2 Command

Command framework uses Command service (which is based on Apache's commons-chain and allows to encapsulate Repository operations as Command objects

command.gif

A Command framework Application can create its own Catalog of Commands, configuring org.exoplatform.services.command.impl.CommonsXMLConfigurationPlugin as follows:

<component>
    <key>org.exoplatform.services.command.impl.CommandService</key>
    <type>org.exoplatform.services.command.impl.CommandService</type>
    <component-plugins>    
      <component-plugin> 
          <name>config.catalog</name>
          <set-method>addPlugin</set-method>
          <type>org.exoplatform.services.command.impl.CommonsXMLConfigurationPlugin</type>
          <init-params>
            <value-param>
              <name>config-file</name>
              <value>conf/test-commands1.xml</value>
            </value-param>
          </init-params>    
      </component-plugin>
    </component-plugins>      
  </component>

Where test-commands1.xml is commons-chain standard definition xml

To simplify the work with JCR the framework defines its own Context interface as follows:

public interface JCRAppContext extends Context {
  
  void setCurrentWorkspace(String workspaceName);
  
  Session getSession() throws LoginException, NoSuchWorkspaceException, RepositoryException;
}

3 Web Framework

Web framework is intended for building web (servlet) JCR based application, it is a set of Http Servlet Listeners, Filters and Servlets that can be declared in web.xml and used for building Web application and other frameworks (see below) on top of it.

Web framework uses Command framework underneath and so each application built using Web framework may define its own set of commands

4 FCKEditor - eXo JCR bridge

For example, we integrate the popular HTML editor FCKEditor to use it for JCR stored content using standard org.exoplatform.frameworks.jcr.web.CommandControllerServlet servlet and adding its specific commands to the Catalog like:

<command   name="GetFolders"
        className="org.exoplatform.frameworks.jcr.command.web.fckeditor.GetFoldersOrFilesCommand"/>
  <command   name="GetFiles"
        className="org.exoplatform.frameworks.jcr.command.web.fckeditor.GetFoldersOrFilesCommand"/>
  <command   name="GetFoldersAndFiles"
        className="org.exoplatform.frameworks.jcr.command.web.fckeditor.GetFoldersOrFilesCommand"/>
  <command   name="FileUpload"
        className="org.exoplatform.frameworks.jcr.command.web.fckeditor.UploadFileCommand"/>
  <command   name="CreateFolder"
        className="org.exoplatform.frameworks.jcr.command.web.fckeditor.CreateFolderCommand"/>

So it is possible to use this bridge standalone with eXo JCR or integrated into eXo ECM

Tags:
Created by Gennady Azarenkov on 05/26/2007
Last modified by Sören Schmidt on 08/13/2009

Products

generated on Thu Sep 02 15:43:54 UTC 2010

eXo Optional Modules

eXo Core Foundations


Copyright (c) 2000-2010. All Rights Reserved - eXo platform SAS
2.4.30451