fr.paris.lutece.plugins.jcr.business
Interface IRepositoryFileDAO

All Superinterfaces:
IJsr170DAO
All Known Implementing Classes:
AbstractRepositoryContentDAO, AlfrescoRepositoryFileDAO, JcrRepositoryFileDAO, RemoteAlfrescoRepositoryFileDAO

public interface IRepositoryFileDAO
extends IJsr170DAO

Interface for Repository DAO


Method Summary
 void create(String strWorkspace, String strPath)
          Create a directory in workspace strWorkspace at absolute path strPath
 void create(String strWorkspace, String strPath, File file, String strMimeType)
          Create a file in workspace strWorkspace at absolute path strPath, with file content.
 void delete(String strWorkspace, String strPath)
          Remove a file from repository
 IRepositoryFile findById(String strWorkspace, String id)
          Find a file by its id
 IRepositoryFile findById(String strWorkspace, String id, String version)
          Find a file by its id
 IRepositoryFile findByPath(String strWorkspace, String strPath)
          Find a file by its path
 List<IRepositoryFile> getHistory(String strWorkspace, String strNodeId)
          Get all versions for this file
 List<IRepositoryFile> getPathToFile(String strWorkspace, String strFileId)
           
 List<IRepositoryFile> listFiles(String strWorkspace, String strPath)
          List all files in a directory
 String removeLock(String strWorkspace, IRepositoryFile file)
           
 String setLock(String strWorkspace, IRepositoryFile file, String strUsername)
           
 void setVersionnable(String strWorkspace, String strNodeId, boolean isVersionnable)
          Set versionable feature for the specified node
 void store(String strWorkspace, IRepositoryFile file)
          Submit file changes in repository
 
Methods inherited from interface fr.paris.lutece.plugins.jcr.business.IJsr170DAO
free, isAlive
 

Method Detail

create

void create(String strWorkspace,
            String strPath,
            File file,
            String strMimeType)
Create a file in workspace strWorkspace at absolute path strPath, with file content.

Parameters:
strWorkspace - the name of the workspace
strPath - the absolute path of the file
file - the file content

create

void create(String strWorkspace,
            String strPath)
Create a directory in workspace strWorkspace at absolute path strPath

Parameters:
strWorkspace - the name of the workspace
strPath - the absolute path of the directory

store

void store(String strWorkspace,
           IRepositoryFile file)
Submit file changes in repository

Parameters:
strWorkspace - the workspace name
file - the file containing the modifications

delete

void delete(String strWorkspace,
            String strPath)
Remove a file from repository

Parameters:
strWorkspace - the workspace name
strPath - the path of the file to remove

findById

IRepositoryFile findById(String strWorkspace,
                         String id)
Find a file by its id

Parameters:
strWorkspace - the workspace name
id - the id
Returns:
the file associated with the id or null if it doesn't exist

findById

IRepositoryFile findById(String strWorkspace,
                         String id,
                         String version)
Find a file by its id

Parameters:
strWorkspace - the workspace name
id - the id
version - the version name to retrieve
Returns:
the file associated with the id or null if it doesn't exist

findByPath

IRepositoryFile findByPath(String strWorkspace,
                           String strPath)
Find a file by its path

Parameters:
strWorkspace - the workspace name
strPath - the absolute path
Returns:
the file associated with the path

listFiles

List<IRepositoryFile> listFiles(String strWorkspace,
                                String strPath)
List all files in a directory

Parameters:
strWorkspace - the workspace name
strPath - the absolute path
Returns:
a list of all files

setVersionnable

void setVersionnable(String strWorkspace,
                     String strNodeId,
                     boolean isVersionnable)
Set versionable feature for the specified node

Parameters:
strWorkspace - the workspace name
strNodeId - the node id
isVersionnable - true to make the node versionable

getHistory

List<IRepositoryFile> getHistory(String strWorkspace,
                                 String strNodeId)
Get all versions for this file

Parameters:
strWorkspace - the workspace name
strNodeId - the node id
Returns:
the versions of the node or an emtpy list if this node isn't versionable

setLock

String setLock(String strWorkspace,
               IRepositoryFile file,
               String strUsername)

removeLock

String removeLock(String strWorkspace,
                  IRepositoryFile file)

getPathToFile

List<IRepositoryFile> getPathToFile(String strWorkspace,
                                    String strFileId)


Copyright © 2014 Mairie de Paris. All Rights Reserved.