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

java.lang.Object
  extended by fr.paris.lutece.plugins.jcr.business.AbstractRepositoryDAO
      extended by fr.paris.lutece.plugins.jcr.business.AbstractRepositoryContentDAO
          extended by fr.paris.lutece.plugins.jcr.business.JcrRepositoryFileDAO
All Implemented Interfaces:
IJsr170DAO, IRepositoryFileDAO

public class JcrRepositoryFileDAO
extends AbstractRepositoryContentDAO
implements IRepositoryFileDAO

Implementation of IRepositoryFileDAO for Jackrabbit JCR


Field Summary
protected static String PATH_SEPARATOR
           
protected static String RESOURCE_TYPE
           
 
Fields inherited from class fr.paris.lutece.plugins.jcr.business.AbstractRepositoryContentDAO
ATTRIBUTE_NODE_SIZE, DEFAULT_MIME_TYPE, MIXIN_REFERENCEABLE, MIXIN_VERSIONNABLE, NODE_TYPE_FILE, NODE_TYPE_FILE_RESOURCE, NODE_TYPE_FOLDER, NODE_TYPE_JCR_CONTENT, PROPERTY_JCR_DATA, PROPERTY_JCR_LASTMODIFIED, PROPERTY_JCR_MIMETYPE, PROPERTY_JCR_NAME, REGEXP_ABSOLUTE_PATH, ROOT_NODE_PATH
 
Fields inherited from class fr.paris.lutece.plugins.jcr.business.AbstractRepositoryDAO
_jcrTemplate, _repositoryInitializer, _strDefaultWorkspaceName
 
Constructor Summary
JcrRepositoryFileDAO()
           
 
Method Summary
protected  boolean exists(javax.jcr.Node node)
          Get the node existence
protected  String getAbsolutePath(javax.jcr.Node node)
          Get the absolute path of a node
protected  Calendar getCreated(javax.jcr.Node node)
          Get the creation date
protected  InputStream getFileContent(javax.jcr.Node node)
          Get the node content
protected  Calendar getLastModified(javax.jcr.Node node)
          Get the modification date
protected  String getMimeType(javax.jcr.Node node)
          Get the Mime type
protected  String getName(javax.jcr.Node node)
          Get the node name
protected  String getPath(javax.jcr.Node node)
          Gives the path of a node It must be overloaded by children classes
protected  Properties getProperties()
          Gives a way to the configuration properties
protected  long getSize(javax.jcr.Node node)
          Get the size of node content
protected  boolean isDirectory(javax.jcr.Node node)
          Get the node type
protected  boolean isFile(javax.jcr.Node node)
          Get the node type
 
Methods inherited from class fr.paris.lutece.plugins.jcr.business.AbstractRepositoryContentDAO
create, create, delete, findById, findById, findByPath, getDepth, getHistory, getParentUUID, getPathToFile, getProperty, getUUID, isVersionnable, listFiles, ownsLock, removeLock, setContent, setLock, setVersionnable, store
 
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.IRepositoryFileDAO
create, create, delete, findById, findById, findByPath, getHistory, getPathToFile, listFiles, removeLock, setLock, setVersionnable, store
 
Methods inherited from interface fr.paris.lutece.plugins.jcr.business.IJsr170DAO
free, isAlive
 

Field Detail

PATH_SEPARATOR

protected static final String PATH_SEPARATOR
See Also:
Constant Field Values

RESOURCE_TYPE

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

JcrRepositoryFileDAO

public JcrRepositoryFileDAO()
Method Detail

getAbsolutePath

protected String getAbsolutePath(javax.jcr.Node node)
Get the absolute path of a node

Specified by:
getAbsolutePath in class AbstractRepositoryContentDAO
Parameters:
node - the node
Returns:
a string containing the absolute path or null if node doesn't exist

getFileContent

protected InputStream getFileContent(javax.jcr.Node node)
Get the node content

Specified by:
getFileContent in class AbstractRepositoryContentDAO
Parameters:
node - the node
Returns:
an inputstream or null if content doesn't exist

getName

protected String getName(javax.jcr.Node node)
Get the node name

Specified by:
getName in class AbstractRepositoryContentDAO
Parameters:
node - the node
Returns:
the node name

getSize

protected long getSize(javax.jcr.Node node)
Get the size of node content

Specified by:
getSize in class AbstractRepositoryContentDAO
Parameters:
node - the node
Returns:
the size in bytes

isDirectory

protected boolean isDirectory(javax.jcr.Node node)
Get the node type

Specified by:
isDirectory in class AbstractRepositoryContentDAO
Parameters:
node - the node
Returns:
true if it is a directory, false otherwise

isFile

protected boolean isFile(javax.jcr.Node node)
Get the node type

Specified by:
isFile in class AbstractRepositoryContentDAO
Parameters:
node - the node
Returns:
true if it is a file, false otherwise

exists

protected boolean exists(javax.jcr.Node node)
Get the node existence

Specified by:
exists in class AbstractRepositoryContentDAO
Parameters:
node - the node
Returns:
true if node exists, false otherwise

getMimeType

protected String getMimeType(javax.jcr.Node node)
Get the Mime type

Specified by:
getMimeType in class AbstractRepositoryContentDAO
Parameters:
node - the node
Returns:
the mime type

getCreated

protected Calendar getCreated(javax.jcr.Node node)
Get the creation date

Specified by:
getCreated in class AbstractRepositoryContentDAO
Parameters:
node - the node
Returns:
the creation date

getLastModified

protected Calendar getLastModified(javax.jcr.Node node)
Get the modification date

Specified by:
getLastModified in class AbstractRepositoryContentDAO
Parameters:
node - the node
Returns:
the modification date

getPath

protected String getPath(javax.jcr.Node node)
Description copied from class: AbstractRepositoryContentDAO
Gives the path of a node It must be overloaded by children classes

Specified by:
getPath in class AbstractRepositoryContentDAO
Parameters:
node - the node
Returns:
the path in the JCR

getProperties

protected Properties getProperties()
Description copied from class: AbstractRepositoryContentDAO
Gives a way to the configuration properties

Specified by:
getProperties in class AbstractRepositoryContentDAO
Returns:
a Properties object


Copyright © 2014 Mairie de Paris. All Rights Reserved.