|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectde.deepamehta.core.osgi.PluginActivator
de.deepamehta.plugins.files.FilesPlugin
public class FilesPlugin
| Field Summary |
|---|
| Fields inherited from class de.deepamehta.core.osgi.PluginActivator |
|---|
bundle, dms |
| Constructor Summary | |
|---|---|
FilesPlugin()
|
|
| Method Summary | |
|---|---|
de.deepamehta.core.Topic |
createChildFileTopic(long folderTopicId,
String path)
|
de.deepamehta.core.Topic |
createChildFolderTopic(long folderTopicId,
String path)
|
de.deepamehta.core.Topic |
createFile(InputStream in,
String path)
Creates a file in the file repository, and creates a corresponding File topic. |
de.deepamehta.core.Topic |
createFileTopic(String path)
Creates and returns a File topic representing the file at a given repository path. |
void |
createFolder(String folderName,
String path)
Creates a folder in the file repository. |
de.deepamehta.core.Topic |
createFolderTopic(String path)
Creates and returns a Folder topic representing the folder at a given repository path. |
DirectoryListing |
getDirectoryListing(String path)
|
File |
getFile(long fileTopicId)
Accesses a file/directory in the file repository that is represented by the given File/Folder topic. |
File |
getFile(String path)
Accesses a file/directory in the file repository by the given repository path. |
String |
getRepositoryPath(URL url)
Checks if the given URL refers to the file repository of this DeepaMehta installation. |
ResourceInfo |
getResourceInfo(String path)
|
boolean |
handleSecurity(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
|
void |
init()
|
void |
openFile(long fileTopicId)
|
StoredFile |
storeFile(UploadedFile file,
String path)
Receives an uploaded file, stores it in the file repository, and creates a corresponding File topic. |
| Methods inherited from class de.deepamehta.core.osgi.PluginActivator |
|---|
getBundleContext, getPluginName, getStaticResource, getUri, postInstall, publishDirectory, serviceArrived, serviceGone, setCoreService, shutdown, start, stop, toString |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public FilesPlugin()
| Method Detail |
|---|
public de.deepamehta.core.Topic createFileTopic(String path)
FilesService
createFileTopic in interface FilesServicepath - A repository path. Relative to the repository base path.
Must begin with slash, no slash at the end.public de.deepamehta.core.Topic createFolderTopic(String path)
FilesService
createFolderTopic in interface FilesServicepath - A repository path. Relative to the repository base path.
Must begin with slash, no slash at the end.
public de.deepamehta.core.Topic createChildFileTopic(long folderTopicId,
String path)
createChildFileTopic in interface FilesService
public de.deepamehta.core.Topic createChildFolderTopic(long folderTopicId,
String path)
createChildFolderTopic in interface FilesService
public StoredFile storeFile(UploadedFile file,
String path)
FilesService
storeFile in interface FilesServicepath - The directory where to store the uploaded file.
A repository path. Relative to the repository base path.
Must begin with slash, no slash at the end.
The directory must exist.
public de.deepamehta.core.Topic createFile(InputStream in,
String path)
FilesService
createFile in interface FilesServicein - The input stream the file content is read from.path - The path and filename of the file to be created.
A repository path. Relative to the repository base path.
Must begin with slash, no slash at the end.
If that file exists already it is overwritten. ### TODO: rethink overwriting
public void createFolder(String folderName,
String path)
FilesService
createFolder in interface FilesServicepath - The directory where to create the folder.
A repository path. Relative to the repository base path.
Must begin with slash, no slash at the end.public ResourceInfo getResourceInfo(String path)
getResourceInfo in interface FilesServicepublic DirectoryListing getDirectoryListing(String path)
getDirectoryListing in interface FilesServicepublic String getRepositoryPath(URL url)
FilesService
getRepositoryPath in interface FilesServicenull if the URL
does not refer to the file repository of this DeepaMehta installation.public File getFile(String path)
FilesService
getFile in interface FilesServicepath - A repository path. Relative to the repository base path.
Must begin with slash, no slash at the end.public File getFile(long fileTopicId)
FilesService
getFile in interface FilesServicepublic void openFile(long fileTopicId)
openFile in interface FilesService
public boolean handleSecurity(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
handleSecurity in interface de.deepamehta.core.service.SecurityHandlerpublic void init()
init in interface de.deepamehta.core.osgi.PluginContextinit in class de.deepamehta.core.osgi.PluginActivator
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||