|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface ContentMapper
Interface that supports mapping incoming WebDAV requests to create, modify, and access JCR content to node hierarchies and properties on these nodes.
DefaultContentMapper
Method Summary | |
---|---|
void |
createFile(Node parentNode,
String fileName)
|
void |
createFolder(Node parentNode,
String folderName)
|
Date |
getLastModified(Node node)
|
InputStream |
getResourceContent(Node node)
|
long |
getResourceLength(Node node)
|
void |
initialize(javax.servlet.ServletContext context)
Initialize the content mapper based on the provided context |
boolean |
isFile(Node node)
|
boolean |
isFolder(Node node)
|
long |
setContent(Node parentNode,
String resourceName,
InputStream newContent,
String contentType,
String characterEncoding)
Creates or modifies the content of a WebDAV file. |
Method Detail |
---|
void initialize(javax.servlet.ServletContext context)
context
- the servlet context for this servletboolean isFolder(Node node) throws RepositoryException
node
- the node to check; may not be null
node
should be treated as a WebDAV folder
RepositoryException
- if the node cannot be accessedboolean isFile(Node node) throws RepositoryException
node
- the node to check; may not be null
node
should be treated as a WebDAV file
RepositoryException
- if the node cannot be accessedInputStream getResourceContent(Node node) throws RepositoryException, IOException
node
- the node to check; may not be null
RepositoryException
- if the node cannot be accessed
IOException
- if the content of the node cannot be accessedlong getResourceLength(Node node) throws RepositoryException, IOException
node
- the node to check; may not be null
RepositoryException
- if the node cannot be accessed
IOException
- if the content of the node cannot be accessedDate getLastModified(Node node) throws RepositoryException, IOException
node
- the node to check; may not be null
RepositoryException
- if the node cannot be accessed
IOException
- if the content of the node cannot be accessedvoid createFolder(Node parentNode, String folderName) throws RepositoryException
parentNode
- the parent node of the new folder; may not be nullfolderName
- the name of the folder that is to be created; may not be null
RepositoryException
- if the node cannot be createdvoid createFile(Node parentNode, String fileName) throws RepositoryException
parentNode
- the parent node of the new file; may not be nullfileName
- the name of the file that is to be created; may not be null
RepositoryException
- if the node cannot be createdlong setContent(Node parentNode, String resourceName, InputStream newContent, String contentType, String characterEncoding) throws RepositoryException, IOException
parentNode
- node corresponding to the parent folder of the file; may not be nullresourceName
- the name of the file to which this content belongs; may not be nullnewContent
- the content to store; may not be nullcontentType
- the MIME type of the content; may not be nullcharacterEncoding
- the character encoding of the content; may not be null
RepositoryException
- if the node cannot be created or updated
IOException
- if the content of the node cannot be modified or created
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |