|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectfr.paris.lutece.plugins.jcr.business.AbstractRepositoryDAO
fr.paris.lutece.plugins.jcr.business.AbstractRepositoryContentDAO
public abstract class AbstractRepositoryContentDAO
Provides basic methods for node manipulation
| Field Summary | |
|---|---|
protected static java.lang.String |
ATTRIBUTE_NODE_SIZE
|
protected static java.lang.String |
DEFAULT_MIME_TYPE
|
protected static java.lang.String |
MIXIN_REFERENCEABLE
|
protected static java.lang.String |
MIXIN_VERSIONNABLE
|
protected static java.lang.String |
NODE_TYPE_FILE
|
protected static java.lang.String |
NODE_TYPE_FILE_RESOURCE
|
protected static java.lang.String |
NODE_TYPE_FOLDER
|
protected static java.lang.String |
NODE_TYPE_JCR_CONTENT
|
protected static java.lang.String |
PROPERTY_JCR_DATA
|
protected static java.lang.String |
PROPERTY_JCR_LASTMODIFIED
|
protected static java.lang.String |
PROPERTY_JCR_MIMETYPE
|
protected static java.lang.String |
PROPERTY_JCR_NAME
|
protected static java.lang.String |
REGEXP_ABSOLUTE_PATH
|
protected static java.lang.String |
ROOT_NODE_PATH
|
| Fields inherited from class fr.paris.lutece.plugins.jcr.business.AbstractRepositoryDAO |
|---|
_jcrTemplate, _repositoryInitializer, _strDefaultWorkspaceName |
| Constructor Summary | |
|---|---|
AbstractRepositoryContentDAO()
|
|
| Method Summary | |
|---|---|
void |
create(java.lang.String strWorkspace,
java.lang.String strPath)
Create a directory in workspace strWorkspace at absolute path strPath |
void |
create(java.lang.String strWorkspace,
java.lang.String strFileName,
java.io.File file)
Create a file in workspace strWorkspace at absolute path strPath, with file content. |
void |
delete(java.lang.String strWorkspace,
java.lang.String strPath)
Remove a file from repository |
protected abstract boolean |
exists(javax.jcr.Node node)
Tells if a node is present in the repository It must be overloaded by children classes |
IRepositoryFile |
findById(java.lang.String strWorkspace,
java.lang.String strId)
Find a file by its id |
IRepositoryFile |
findById(java.lang.String strWorkspace,
java.lang.String strId,
java.lang.String strVersion)
Find a file by its id |
IRepositoryFile |
findByPath(java.lang.String strWorkspace,
java.lang.String strPath)
Find a file by its path |
protected abstract java.lang.String |
getAbsolutePath(javax.jcr.Node node)
Returns the entire path (absolute) |
protected abstract java.util.Calendar |
getCreated(javax.jcr.Node node)
Gets the creation date of the node It must be overloaded by children classes |
protected abstract java.io.InputStream |
getFileContent(javax.jcr.Node node)
Gives access to node content. |
java.util.List<IRepositoryFile> |
getHistory(java.lang.String strWorkspace,
java.lang.String strNodeId)
Get all versions for this file |
protected abstract java.util.Calendar |
getLastModified(javax.jcr.Node node)
Gets the date of last modification It must be overloaded by children classes |
protected abstract java.lang.String |
getMimeType(javax.jcr.Node node)
Gives the Mime Type of a node It must be overloaded by children classes |
protected abstract java.lang.String |
getName(javax.jcr.Node node)
Gives the name of a node It must be overloaded by children classes |
protected java.lang.String |
getParentUUID(javax.jcr.Node node)
Gives the reference of the parent |
protected abstract java.lang.String |
getPath(javax.jcr.Node node)
Gives the path of a node It must be overloaded by children classes |
java.util.List<IRepositoryFile> |
getPathToFile(java.lang.String strWorkspace,
java.lang.String strFilePath)
|
protected abstract java.util.Properties |
getProperties()
Gives a way to the configuration properties |
protected java.lang.String |
getProperty(java.lang.String strPropertyName)
Retrieves a configuration property |
protected abstract long |
getSize(javax.jcr.Node node)
Gets the size of the content node It must only apply to node of type "file" It must be overloaded by children classes |
protected java.lang.String |
getUUID(javax.jcr.Node node)
Gives the reference of a node |
protected abstract boolean |
isDirectory(javax.jcr.Node node)
Tells if a node is a directory Note on data structure : a directory doesn't contain anything except other directories and files. |
protected abstract boolean |
isFile(javax.jcr.Node node)
Tells if a node is a file. |
protected boolean |
isVersionnable(javax.jcr.Node node)
Tells whether a node is versionable |
java.util.List<IRepositoryFile> |
listFiles(java.lang.String strWorkspace,
java.lang.String strPath)
List all files in a directory |
protected boolean |
ownsLock(javax.jcr.Node node)
Tells if the current user owns a lock on node |
java.lang.String |
removeLock(java.lang.String strWorkspace,
IRepositoryFile file)
|
protected boolean |
setContent(javax.jcr.Node node,
java.io.InputStream inputStream,
java.lang.String strFileName)
Set the content of a node |
java.lang.String |
setLock(java.lang.String strWorkspace,
IRepositoryFile file,
java.lang.String strUsername)
|
void |
setVersionnable(java.lang.String strWorkspace,
java.lang.String strNodeId,
boolean isVersionnable)
Set versionable feature for the specified node |
void |
store(java.lang.String strWorkspace,
IRepositoryFile file)
Submit file changes in repository |
| Methods inherited from class fr.paris.lutece.plugins.jcr.business.AbstractRepositoryDAO |
|---|
execute, execute, free, init, isAlive |
| 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 |
|---|
protected static final java.lang.String NODE_TYPE_FOLDER
protected static final java.lang.String NODE_TYPE_FILE
protected static final java.lang.String NODE_TYPE_FILE_RESOURCE
protected static final java.lang.String ATTRIBUTE_NODE_SIZE
protected static final java.lang.String NODE_TYPE_JCR_CONTENT
protected static final java.lang.String REGEXP_ABSOLUTE_PATH
protected static final java.lang.String MIXIN_REFERENCEABLE
protected static final java.lang.String MIXIN_VERSIONNABLE
protected static final java.lang.String ROOT_NODE_PATH
protected static final java.lang.String DEFAULT_MIME_TYPE
protected static final java.lang.String PROPERTY_JCR_MIMETYPE
protected static final java.lang.String PROPERTY_JCR_DATA
protected static final java.lang.String PROPERTY_JCR_LASTMODIFIED
protected static final java.lang.String PROPERTY_JCR_NAME
| Constructor Detail |
|---|
public AbstractRepositoryContentDAO()
| Method Detail |
|---|
public void create(java.lang.String strWorkspace,
java.lang.String strPath)
IRepositoryFileDAO
create in interface IRepositoryFileDAOstrWorkspace - the workspace namestrPath - the absolute pathIRepositoryFileDAO.create(java.lang.String, java.lang.String)
public void create(java.lang.String strWorkspace,
java.lang.String strFileName,
java.io.File file)
IRepositoryFileDAO
create in interface IRepositoryFileDAOstrWorkspace - the workspace namestrFileName - the absolute filename to createfile - the file contentIRepositoryFileDAO.create(java.lang.String, java.lang.String, java.io.File)
public void delete(java.lang.String strWorkspace,
java.lang.String strPath)
IRepositoryFileDAO
delete in interface IRepositoryFileDAOstrWorkspace - the workspace namestrPath - the absolute path to deleteIRepositoryFileDAO.delete(java.lang.String, java.lang.String)
public java.util.List<IRepositoryFile> listFiles(java.lang.String strWorkspace,
java.lang.String strPath)
IRepositoryFileDAO
listFiles in interface IRepositoryFileDAOstrWorkspace - the workspace namestrPath - the absolute path
IRepositoryFileDAO.listFiles(java.lang.String, java.lang.String)
public IRepositoryFile findById(java.lang.String strWorkspace,
java.lang.String strId)
IRepositoryFileDAO
findById in interface IRepositoryFileDAOstrWorkspace - the workspace namestrId - the id to find
IRepositoryFileDAO.findById(java.lang.String, java.lang.String)
public IRepositoryFile findById(java.lang.String strWorkspace,
java.lang.String strId,
java.lang.String strVersion)
IRepositoryFileDAO
findById in interface IRepositoryFileDAOstrWorkspace - the workspace namestrId - the id to findstrVersion - the version name to retrieve
IRepositoryFileDAO.findById(java.lang.String, java.lang.String)
protected boolean setContent(javax.jcr.Node node,
java.io.InputStream inputStream,
java.lang.String strFileName)
node - the nodeinputStream - a stream with the contentstrFileName - the file name, the mime type is determined with this file name
FileNotFoundException
public IRepositoryFile findByPath(java.lang.String strWorkspace,
java.lang.String strPath)
IRepositoryFileDAO
findByPath in interface IRepositoryFileDAOstrWorkspace - the workspace namestrPath - the absolute path
IRepositoryFileDAO.findByPath(java.lang.String, java.lang.String)
public void store(java.lang.String strWorkspace,
IRepositoryFile file)
IRepositoryFileDAO
store in interface IRepositoryFileDAOstrWorkspace - the workspace namefile - the file containing the modifications
public void setVersionnable(java.lang.String strWorkspace,
java.lang.String strNodeId,
boolean isVersionnable)
IRepositoryFileDAO
setVersionnable in interface IRepositoryFileDAOstrWorkspace - the workspace namestrNodeId - the node idisVersionnable - true to make the node versionable
public java.util.List<IRepositoryFile> getHistory(java.lang.String strWorkspace,
java.lang.String strNodeId)
IRepositoryFileDAO
getHistory in interface IRepositoryFileDAOstrWorkspace - the workspace namestrNodeId - the node id
protected boolean isVersionnable(javax.jcr.Node node)
node - to test
protected java.lang.String getProperty(java.lang.String strPropertyName)
strPropertyName - the property key
protected boolean ownsLock(javax.jcr.Node node)
node - the node
protected abstract java.util.Calendar getCreated(javax.jcr.Node node)
node - the node
protected abstract long getSize(javax.jcr.Node node)
node - the node
protected abstract java.util.Calendar getLastModified(javax.jcr.Node node)
node - the node
protected abstract java.io.InputStream getFileContent(javax.jcr.Node node)
node - the node
protected abstract java.lang.String getMimeType(javax.jcr.Node node)
node - the node
protected abstract java.lang.String getPath(javax.jcr.Node node)
node - the node
protected java.lang.String getUUID(javax.jcr.Node node)
node - the node
protected java.lang.String getParentUUID(javax.jcr.Node node)
node - the node
protected abstract java.lang.String getName(javax.jcr.Node node)
node - the node
protected abstract boolean isFile(javax.jcr.Node node)
node - the node
protected abstract boolean isDirectory(javax.jcr.Node node)
node - the node
protected abstract boolean exists(javax.jcr.Node node)
node - the node
protected abstract java.lang.String getAbsolutePath(javax.jcr.Node node)
node - the node
protected abstract java.util.Properties getProperties()
public java.lang.String setLock(java.lang.String strWorkspace,
IRepositoryFile file,
java.lang.String strUsername)
setLock in interface IRepositoryFileDAO
public java.lang.String removeLock(java.lang.String strWorkspace,
IRepositoryFile file)
removeLock in interface IRepositoryFileDAO
public java.util.List<IRepositoryFile> getPathToFile(java.lang.String strWorkspace,
java.lang.String strFilePath)
getPathToFile in interface IRepositoryFileDAO
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||