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

java.lang.Object
  extended by fr.paris.lutece.plugins.jcr.business.AbstractRepositoryDAO
      extended by fr.paris.lutece.plugins.jcr.business.JcrRepositoryWorkspaceDAO
All Implemented Interfaces:
IJsr170DAO, IWorkspaceDAO

public class JcrRepositoryWorkspaceDAO
extends AbstractRepositoryDAO
implements IWorkspaceDAO

An implementation of IworkspaceDAO for Jackrabbit JCR


Field Summary
protected static String NODE_ROLES
           
protected static String NODE_TYPE_FILE
           
protected static String NODE_TYPE_FOLDER
           
protected static String PROPERTY_DELETED
           
 
Fields inherited from class fr.paris.lutece.plugins.jcr.business.AbstractRepositoryDAO
_jcrTemplate, _repositoryInitializer, _strDefaultWorkspaceName
 
Constructor Summary
JcrRepositoryWorkspaceDAO()
           
 
Method Summary
 boolean canCreate()
          Tells if workspace creation is provided by this DAO.
 void create(String strWorkspace)
          Create a new workspace
 void delete(String strWorkspace)
          We can't delete programmatically a jackrabbit workspace.
 IWorkspace findById(String id)
          Find a workspace by id
 IWorkspace findByName(String strWorkspace)
          Find a workspace by name
 String[] getAvailableWorkspaces()
          Return all availables workspace
static IWorkspaceDAO getInstance(org.springmodules.jcr.JcrTemplate jcrTemplate, IRepositoryInitializer repositoryInitializer, String strDefaultWorkspaceName, boolean creationAllowed)
           
 void store(IWorkspace workspace)
          Modify a workspace
 
Methods inherited from class fr.paris.lutece.plugins.jcr.business.AbstractRepositoryDAO
execute, execute, free, init, isAlive, releaseSession
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface fr.paris.lutece.plugins.jcr.business.IJsr170DAO
free, isAlive
 

Field Detail

NODE_TYPE_FOLDER

protected static final String NODE_TYPE_FOLDER
See Also:
Constant Field Values

NODE_TYPE_FILE

protected static final String NODE_TYPE_FILE
See Also:
Constant Field Values

NODE_ROLES

protected static final String NODE_ROLES
See Also:
Constant Field Values

PROPERTY_DELETED

protected static final String PROPERTY_DELETED
See Also:
Constant Field Values
Constructor Detail

JcrRepositoryWorkspaceDAO

public JcrRepositoryWorkspaceDAO()
Method Detail

getInstance

public static IWorkspaceDAO getInstance(org.springmodules.jcr.JcrTemplate jcrTemplate,
                                        IRepositoryInitializer repositoryInitializer,
                                        String strDefaultWorkspaceName,
                                        boolean creationAllowed)
Parameters:
jcrTemplate - a jcrTemplate
repositoryInitializer - a repositoryInitializer
strDefaultWorkspaceName - a default workspace name
creationAllowed - workspace creation allowed ?
Returns:
an instance of this DAO

create

public void create(String strWorkspace)
Description copied from interface: IWorkspaceDAO
Create a new workspace

Specified by:
create in interface IWorkspaceDAO
Parameters:
strWorkspace - the workspace to create
See Also:
IWorkspaceDAO.create(java.lang.String)

delete

public void delete(String strWorkspace)
We can't delete programmatically a jackrabbit workspace. So we put a flag to say this workspace is considered as deleted. The content of the worskpace is also deleted.

Specified by:
delete in interface IWorkspaceDAO
Parameters:
strWorkspace - the workspace to delete
See Also:
IWorkspaceDAO.delete(java.lang.String)

findById

public IWorkspace findById(String id)
Description copied from interface: IWorkspaceDAO
Find a workspace by id

Specified by:
findById in interface IWorkspaceDAO
Parameters:
id - the id to search for
Returns:
the IWorkspace
See Also:
IWorkspaceDAO.findById(java.lang.String)

findByName

public IWorkspace findByName(String strWorkspace)
Description copied from interface: IWorkspaceDAO
Find a workspace by name

Specified by:
findByName in interface IWorkspaceDAO
Parameters:
strWorkspace - the name of the workspace to search
Returns:
the IWorkspace
See Also:
IWorkspaceDAO.findByName(java.lang.String)

getAvailableWorkspaces

public String[] getAvailableWorkspaces()
Description copied from interface: IWorkspaceDAO
Return all availables workspace

Specified by:
getAvailableWorkspaces in interface IWorkspaceDAO
Returns:
all availables Workspaces
See Also:
IWorkspaceDAO.getAvailableWorkspaces()

store

public void store(IWorkspace workspace)
Description copied from interface: IWorkspaceDAO
Modify a workspace

Specified by:
store in interface IWorkspaceDAO
Parameters:
workspace - the workspace to update
See Also:
IWorkspaceDAO.store(fr.paris.lutece.plugins.jcr.business.IWorkspace)

canCreate

public boolean canCreate()
Description copied from interface: IWorkspaceDAO
Tells if workspace creation is provided by this DAO.

Specified by:
canCreate in interface IWorkspaceDAO
Returns:
the value declared in Spring context
See Also:
IWorkspaceDAO.canCreate()


Copyright © 2014 Mairie de Paris. All Rights Reserved.