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
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>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 commands4 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"/>
on 13/08/2009 at 08:29