de.deepamehta.plugins.files.service
Interface FilesService

Show UML class diagram
All Superinterfaces:
PluginService
All Known Implementing Classes:
FilesPlugin

public interface FilesService
extends PluginService


Method Summary
 Topic createChildFileTopic(long folderTopicId, String path, ClientState clientState)
           
 Topic createChildFolderTopic(long folderTopicId, String path, ClientState clientState)
           
 Topic createFileTopic(String path, ClientState clientState)
          Creates a File topic for a given path.
 void createFolder(String folderName, String path)
           
 Topic createFolderTopic(String path, ClientState clientState)
          Creates a Folder topic for a given 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 its path.
 String getRepositoryPath(URL url)
          Checks if the given URL refers to the file repository of this DeepaMehta installation.
 ResourceInfo getResourceInfo(String path)
           
 void openFile(long fileTopicId)
           
 StoredFile storeFile(UploadedFile file, String path, ClientState clientState)
           
 

Method Detail

createFileTopic

Topic createFileTopic(String path,
                      ClientState clientState)
Creates a File topic for a given path. If a File topic for that path exists already that topic is returned.


createFolderTopic

Topic createFolderTopic(String path,
                        ClientState clientState)
Creates a Folder topic for a given path. If a Folder topic for that path exists already that topic is returned.


createChildFileTopic

Topic createChildFileTopic(long folderTopicId,
                           String path,
                           ClientState clientState)

createChildFolderTopic

Topic createChildFolderTopic(long folderTopicId,
                             String path,
                             ClientState clientState)

storeFile

StoredFile storeFile(UploadedFile file,
                     String path,
                     ClientState clientState)
Parameters:
path - The directory where to store the file. Relative to the file repository root path. Must begin with slash ('/'), no slash at the end. The directory must exist.

createFolder

void createFolder(String folderName,
                  String path)

getResourceInfo

ResourceInfo getResourceInfo(String path)

getDirectoryListing

DirectoryListing getDirectoryListing(String path)

getRepositoryPath

String getRepositoryPath(URL url)
Checks if the given URL refers to the file repository of this DeepaMehta installation.

Returns:
the refered file's/directory's repository path, or null if the URL does not refer to the file repository of this DeepaMehta installation.

getFile

File getFile(String path)
Accesses a file/directory in the file repository by its path. Note: this method doesn't require the corresponding File/Folder topic to exist.

Parameters:
path - a file repository path. Must begin with slash ('/'), no slash at the end.

getFile

File getFile(long fileTopicId)
Accesses a file/directory in the file repository that is represented by the given File/Folder topic.


openFile

void openFile(long fileTopicId)


Copyright © 2014. All Rights Reserved.