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

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.AlfrescoRepositoryFileDAO
All Implemented Interfaces:
IRepositoryFileDAO
Direct Known Subclasses:
RemoteAlfrescoRepositoryFileDAO

public class AlfrescoRepositoryFileDAO
extends AbstractRepositoryContentDAO
implements IRepositoryFileDAO

An IRepositoryFileDAO implementation for Alfresco JCR


Field Summary
protected  java.lang.String PATH_SEPARATOR
           
protected  java.lang.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
AlfrescoRepositoryFileDAO()
           
 
Method Summary
protected  boolean exists(javax.jcr.Node node)
          Get the node existence
protected  java.lang.String getAbsolutePath(javax.jcr.Node node)
          Get the absolute path of a node
protected  java.util.Calendar getCreated(javax.jcr.Node node)
          Get the creation date
protected  java.io.InputStream getFileContent(javax.jcr.Node node)
          Get the node content
protected  java.util.Calendar getLastModified(javax.jcr.Node node)
          Get the modification date
protected  java.lang.String getMimeType(javax.jcr.Node node)
          Get the Mime type
protected  java.lang.String getName(javax.jcr.Node node)
          Gets the name of a node
protected  java.lang.String getParentUUID(javax.jcr.Node node)
           
protected  java.lang.String getPath(javax.jcr.Node node)
           
protected  java.util.Properties getProperties()
           
protected  long getSize(javax.jcr.Node node)
          Get the size of node content
protected  java.lang.String getUUID(javax.jcr.Node node)
           
protected  boolean isDirectory(javax.jcr.Node node)
          Get the node type
protected  boolean isFile(javax.jcr.Node node)
          Get the node type
protected  boolean setContent(javax.jcr.Node node, java.io.InputStream inputStream, java.lang.String strMimeType)
          Set the content of a node
 
Methods inherited from class fr.paris.lutece.plugins.jcr.business.AbstractRepositoryContentDAO
create, create, delete, findById, findById, findByPath, getHistory, listFiles, setVersionnable, store
 
Methods inherited from class fr.paris.lutece.plugins.jcr.business.AbstractRepositoryDAO
execute, execute, init
 
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, listFiles, setVersionnable, store
 

Field Detail

PATH_SEPARATOR

protected java.lang.String PATH_SEPARATOR

RESOURCE_TYPE

protected java.lang.String RESOURCE_TYPE
Constructor Detail

AlfrescoRepositoryFileDAO

public AlfrescoRepositoryFileDAO()
Method Detail

getAbsolutePath

protected java.lang.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 java.io.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

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 java.lang.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 java.util.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 java.util.Calendar getLastModified(javax.jcr.Node node)
Get the modification date

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

setContent

protected boolean setContent(javax.jcr.Node node,
                             java.io.InputStream inputStream,
                             java.lang.String strMimeType)
Set the content of a node

Overrides:
setContent in class AbstractRepositoryContentDAO
Parameters:
node - the node
inputStream - a stream with the content
strMimeType - the Mime type
Returns:
true if the transfert is ok and node is a file, false otherwise

getName

protected java.lang.String getName(javax.jcr.Node node)
Gets the name of a node

Specified by:
getName in class AbstractRepositoryContentDAO
Parameters:
node - the node
Returns:
the name (property "cm:name") of the node

getParentUUID

protected java.lang.String getParentUUID(javax.jcr.Node node)
Specified by:
getParentUUID in class AbstractRepositoryContentDAO

getUUID

protected java.lang.String getUUID(javax.jcr.Node node)
Specified by:
getUUID in class AbstractRepositoryContentDAO
Parameters:
node -
Returns:

getPath

protected java.lang.String getPath(javax.jcr.Node node)
Specified by:
getPath in class AbstractRepositoryContentDAO

getProperties

protected java.util.Properties getProperties()
Specified by:
getProperties in class AbstractRepositoryContentDAO


Copyright © 2007 Mairie de Paris. All Rights Reserved.