fr.paris.lutece.plugins.jcr.business
Class AbstractRepositoryDAO

java.lang.Object
  extended by fr.paris.lutece.plugins.jcr.business.AbstractRepositoryDAO
Direct Known Subclasses:
AbstractRepositoryContentDAO, AlfrescoRepositoryWorkspaceDAO, JcrRepositoryWorkspaceDAO

public abstract class AbstractRepositoryDAO
extends java.lang.Object

Abstract class for common jcr operations like :

Author:
lutecer

Field Summary
protected  org.springmodules.jcr.JcrTemplate _jcrTemplate
           
protected  IRepositoryInitializer _repositoryInitializer
           
protected  java.lang.String _strDefaultWorkspaceName
           
 
Constructor Summary
AbstractRepositoryDAO()
           
 
Method Summary
protected  java.lang.Object execute(org.springmodules.jcr.JcrCallback callback)
          Run a JcrCallback on the current workspace
protected  java.lang.Object execute(java.lang.String strWorkspace, org.springmodules.jcr.JcrCallback callback)
          Run a JcrCallback on the workspace specified by strWorkspace
protected  void init(org.springmodules.jcr.JcrTemplate jcrTemplate, IRepositoryInitializer repositoryInitializer, java.lang.String strDefaultWorkspaceName)
          Constructor that MUST be called by derivated classes.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_jcrTemplate

protected org.springmodules.jcr.JcrTemplate _jcrTemplate

_strDefaultWorkspaceName

protected java.lang.String _strDefaultWorkspaceName

_repositoryInitializer

protected IRepositoryInitializer _repositoryInitializer
Constructor Detail

AbstractRepositoryDAO

public AbstractRepositoryDAO()
Method Detail

init

protected void init(org.springmodules.jcr.JcrTemplate jcrTemplate,
                    IRepositoryInitializer repositoryInitializer,
                    java.lang.String strDefaultWorkspaceName)
Constructor that MUST be called by derivated classes. Get Spring beans for JcrTemplate, JcrSessionFactory and IRepositoryInitializer, then run the initializer.

Parameters:
jcrTemplate - the jcrTemplate used to execute jcr operations
repositoryInitializer - the repositoryInitializer used to init some specific repository operations
strDefaultWorkspaceName - the name of the default workspace to use (can be null in order to use the default workspace repository)

execute

protected java.lang.Object execute(org.springmodules.jcr.JcrCallback callback)
Run a JcrCallback on the current workspace

Parameters:
callback - a JcrCallback
Returns:
the result of the JcrCallback
See Also:
Spring module manual (JcrCallback)

execute

protected java.lang.Object execute(java.lang.String strWorkspace,
                                   org.springmodules.jcr.JcrCallback callback)
Run a JcrCallback on the workspace specified by strWorkspace

Parameters:
strWorkspace - the name of the workspace
callback - a JcrCallback
Returns:
the result of the JcrCallback
See Also:
Spring module manual (JcrCallback)


Copyright © 2007 Mairie de Paris. All Rights Reserved.