blackboard.platform.filesystem
Interface FileSystemService


public interface FileSystemService

Interface for FileSystemServiceImpl class.

Since:
Bb 5.5
Version:
$Revision: #1 $ $Date: 2005/06/27 $
See Also:
FileSystemServiceImpl

Method Summary
 java.io.File getAttemptDirectory(Course course, Id attemptId, AttemptFile.FileType fileType)
          Returns the root directory relative to the course and attempt id.
 java.io.File getAttemptDirectory(java.lang.String courseId, Id attemptId, AttemptFile.FileType fileType)
          Returns the root directory relative to the course and attempt id.
 java.io.File getBrandingDirectory(Id portalBrandingId)
          Returns the root directory relative to the branding for given host.
 java.io.File getCollabDocDirectory()
          returns the doc root of the collab server
 java.io.File getContentDirectory(Course course, Id contentId)
          Returns the root directory relative to the course and content id.
 java.io.File getContentDirectory(java.lang.String courseId, Id contentId)
          Returns the root directory relative to the course and content id.
 java.io.File getContextSessionDirectory()
          Returns the root directory of the session in the current context.
 java.io.File getCourseDirectory(Course course)
          Returns the root directory relative to the course.
 java.io.File getCourseDirectory(java.lang.String courseId)
          Returns the root directory relative to the course.
 java.io.File getLogsDirectory()
          Returns the root of the logs directory for use within application.
 java.io.File getMessagingDirectory(Course course)
          Returns the root directory relative to the course.
 java.io.File getMessagingDirectory(Id courseId)
          Returns the root directory relative to the course.
 java.io.File getMessagingDirectory(java.lang.String courseId)
          Returns the messaging directory relative to the course.
 java.io.File getModuleDirectory(Id moduleId)
          Returns the root directory relative to the module for given host.
 java.io.File getProductDirectory(java.lang.Integer productId)
          Returns the root directory relative to the course.
 java.io.File getRecycleDirectory()
          Returns the root directory of the "recycle bin" for the application.
 java.io.File getRecycleDirectory(Course course)
          Returns the root directory of the "recycle bin" for a specific course.
 java.io.File getRecycleDirectory(java.io.File file)
          Returns the appropriate recycle directory for a given file or directory.
 java.io.File getRootCourseDirectory()
          Returns the root directory that all courses are stored in
 java.io.File getSessionDirectory()
          Returns the root of the session directory registered for the application.
 java.io.File getSponsorsDirectory(Id sponsorsId)
          Returns the root directory relative to the sponsors for given id.
 java.io.File getTempDirectory()
          Returns a temp directory for use within application.
 java.io.File getVIDataDirectory()
          Returns the root of the content directory.
 java.io.File getVIDataDirectory(VirtualInstallation vi)
          Returns the root of the content directory.
 java.io.File getVISystemDataDirectory()
          Returns the root of the systemdata directory.
 java.lang.String getWebAttemptDirectory(Course course, Id attemptId, AttemptFile.FileType fileType)
          Returns the web based root directory relative to the course and attempt id.
 java.lang.String getWebAttemptDirectory(java.lang.String courseId, Id attemptId, AttemptFile.FileType fileType)
          Returns the web based root directory relative to the course and attempt id.
 java.lang.String getWebAttemptDirectory(java.lang.String courseId, java.lang.String attemptId, AttemptFile.FileType fileType)
          Returns the web based root directory relative to the course and attempt id.
 java.lang.String getWebBrandingDirectory(Id portalBrandingId)
          Returns the web based root directory relative to the branding for given host.
 java.lang.String getWebContentDirectory(Course course, Id contentId)
          Returns the web based root directory relative to the course and content id.
 java.lang.String getWebContentDirectory(java.lang.String courseId, Id contentId)
          Returns the web based root directory relative to the course and content id.
 java.lang.String getWebContentDirectory(java.lang.String courseId, java.lang.String contentId)
          Returns the web based root directory relative to the course and content id.
 java.lang.String getWebContextSessionDirectory()
          Returns the web based root directory of the session in the current context.
 java.lang.String getWebCourseDirectory(Course course)
          Returns the web-root based directory path to the course.
 java.lang.String getWebCourseDirectory(java.lang.String courseId)
          Returns the web-root based directory path to the course.
 java.lang.String getWebMessagingDirectory(Course course)
          Returns the url to messages directory relative to the course.
 java.lang.String getWebMessagingDirectory(Id courseId)
          Returns the url to messages directory relative to the course.
 java.lang.String getWebMessagingDirectory(java.lang.String courseId)
          Returns the url to messaging url relative to the course.
 java.lang.String getWebModuleDirectory(Id moduleId)
          Returns the web based root directory relative to the module for given host.
 java.lang.String getWebProductDirectory(java.lang.Integer productId)
          Returns the web based root directory relative to the branding for given host.
 java.lang.String getWebSessionDirectory()
          Returns the web based root of the session directory registered for the application.
 java.lang.String getWebSponsorsDirectory(Id sponsorsId)
          Returns the web based root directory relative to the branding for given host.
 java.lang.String getWebVIDataDirectory()
          Deprecated. This method never worked, because it points to an unavailable d irectory
 java.lang.String getWebVIDataDirectory(VirtualInstallation vi)
          Deprecated. This method never worked, because it points to an unavailable directory
 java.lang.String getWebVISystemDataDirectory()
          Returns the web based root of the systemdata directory.
 MultipartRequest processUpload(javax.servlet.http.HttpServletRequest req)
          Reads the file from the multipart stream and saves out the stream as a File.
 

Method Detail

getCourseDirectory

java.io.File getCourseDirectory(java.lang.String courseId)
                                throws FileSystemException
Returns the root directory relative to the course.

Parameters:
course - Course
Throws:
FileSystemException

getCourseDirectory

java.io.File getCourseDirectory(Course course)
                                throws FileSystemException
Returns the root directory relative to the course.

Parameters:
course - Course
Throws:
FileSystemException

getWebCourseDirectory

java.lang.String getWebCourseDirectory(java.lang.String courseId)
                                       throws FileSystemException
Returns the web-root based directory path to the course.

Parameters:
courseId - The ID of the course desired
Throws:
FileSystemException

getWebCourseDirectory

java.lang.String getWebCourseDirectory(Course course)
                                       throws FileSystemException
Returns the web-root based directory path to the course.

Parameters:
course - The Course desired
Throws:
FileSystemException

getRootCourseDirectory

java.io.File getRootCourseDirectory()
                                    throws FileSystemException
Returns the root directory that all courses are stored in

Throws:
FileSystemException

getWebContentDirectory

java.lang.String getWebContentDirectory(java.lang.String courseId,
                                        Id contentId)
                                        throws FileSystemException
Returns the web based root directory relative to the course and content id.

Parameters:
course - Course
content - Id Id
Throws:
FileSystemException

getWebContentDirectory

java.lang.String getWebContentDirectory(Course course,
                                        Id contentId)
                                        throws FileSystemException
Returns the web based root directory relative to the course and content id.

Parameters:
course - Course
content - Id Id
Throws:
FileSystemException

getWebContentDirectory

java.lang.String getWebContentDirectory(java.lang.String courseId,
                                        java.lang.String contentId)
                                        throws FileSystemException
Returns the web based root directory relative to the course and content id.

Parameters:
courseId - String Course Id (not pk id)
contentId - External String representation of content pk_id
Throws:
FileSystemException

getContentDirectory

java.io.File getContentDirectory(java.lang.String courseId,
                                 Id contentId)
                                 throws FileSystemException
Returns the root directory relative to the course and content id.

Parameters:
String - Course id
content - Id Id
Throws:
FileSystemException

getContentDirectory

java.io.File getContentDirectory(Course course,
                                 Id contentId)
                                 throws FileSystemException
Returns the root directory relative to the course and content id.

Parameters:
String - Course id
content - Id Id
Throws:
FileSystemException

getWebAttemptDirectory

java.lang.String getWebAttemptDirectory(java.lang.String courseId,
                                        Id attemptId,
                                        AttemptFile.FileType fileType)
                                        throws FileSystemException
Returns the web based root directory relative to the course and attempt id.

Parameters:
course - Course
attempt - Id Id
Throws:
FileSystemException

getWebAttemptDirectory

java.lang.String getWebAttemptDirectory(java.lang.String courseId,
                                        java.lang.String attemptId,
                                        AttemptFile.FileType fileType)
                                        throws FileSystemException
Returns the web based root directory relative to the course and attempt id.

Parameters:
course - CourseId external string
attempt - Id Id external string
Throws:
FileSystemException

getWebAttemptDirectory

java.lang.String getWebAttemptDirectory(Course course,
                                        Id attemptId,
                                        AttemptFile.FileType fileType)
                                        throws FileSystemException
Returns the web based root directory relative to the course and attempt id.

Parameters:
course - Course
attempt - Id Id
Throws:
FileSystemException

getAttemptDirectory

java.io.File getAttemptDirectory(java.lang.String courseId,
                                 Id attemptId,
                                 AttemptFile.FileType fileType)
                                 throws FileSystemException
Returns the root directory relative to the course and attempt id.

Parameters:
String - Course id
attempt - Id Id
Throws:
FileSystemException

getAttemptDirectory

java.io.File getAttemptDirectory(Course course,
                                 Id attemptId,
                                 AttemptFile.FileType fileType)
                                 throws FileSystemException
Returns the root directory relative to the course and attempt id.

Parameters:
String - Course id
attempt - Id Id
Throws:
FileSystemException

getBrandingDirectory

java.io.File getBrandingDirectory(Id portalBrandingId)
                                  throws FileSystemException
Returns the root directory relative to the branding for given host.

Parameters:
brandingKey - String
Throws:
FileSystemException

getWebBrandingDirectory

java.lang.String getWebBrandingDirectory(Id portalBrandingId)
                                         throws FileSystemException
Returns the web based root directory relative to the branding for given host.

Parameters:
brandingKey - String
Throws:
FileSystemException

getModuleDirectory

java.io.File getModuleDirectory(Id moduleId)
                                throws FileSystemException
Returns the root directory relative to the module for given host.

Parameters:
moduleId - Id
Throws:
FileSystemException

getWebModuleDirectory

java.lang.String getWebModuleDirectory(Id moduleId)
                                       throws FileSystemException
Returns the web based root directory relative to the module for given host.

Parameters:
moduleId - Id
Throws:
FileSystemException

getProductDirectory

java.io.File getProductDirectory(java.lang.Integer productId)
                                 throws FileSystemException
Returns the root directory relative to the course.

Parameters:
course - Course
Throws:
FileSystemException

getWebProductDirectory

java.lang.String getWebProductDirectory(java.lang.Integer productId)
                                        throws FileSystemException
Returns the web based root directory relative to the branding for given host.

Parameters:
brandingKey - String
Throws:
FileSystemException

getSponsorsDirectory

java.io.File getSponsorsDirectory(Id sponsorsId)
                                  throws FileSystemException
Returns the root directory relative to the sponsors for given id.

Throws:
FileSystemException

getWebSponsorsDirectory

java.lang.String getWebSponsorsDirectory(Id sponsorsId)
                                         throws FileSystemException
Returns the web based root directory relative to the branding for given host.

Throws:
FileSystemException

getVIDataDirectory

java.io.File getVIDataDirectory()
                                throws FileSystemException
Returns the root of the content directory.

Throws:
FileSystemException

getVIDataDirectory

java.io.File getVIDataDirectory(VirtualInstallation vi)
                                throws FileSystemException
Returns the root of the content directory.

Parameters:
vi - VirtualInstallation to be used in directory
Throws:
FileSystemException

getWebVIDataDirectory

java.lang.String getWebVIDataDirectory()
                                       throws FileSystemException
Deprecated. This method never worked, because it points to an unavailable d irectory

Returns the web based root of the content directory.

Throws:
FileSystemException

getWebVIDataDirectory

java.lang.String getWebVIDataDirectory(VirtualInstallation vi)
                                       throws FileSystemException
Deprecated. This method never worked, because it points to an unavailable directory

Returns the web based root of the content directory.

Parameters:
vi - VirtualInstallation to be used in directory
Throws:
FileSystemException

getVISystemDataDirectory

java.io.File getVISystemDataDirectory()
                                      throws FileSystemException
Returns the root of the systemdata directory.

Throws:
FileSystemException

getWebVISystemDataDirectory

java.lang.String getWebVISystemDataDirectory()
                                             throws FileSystemException
Returns the web based root of the systemdata directory.

Throws:
FileSystemException

getSessionDirectory

java.io.File getSessionDirectory()
                                 throws FileSystemException
Returns the root of the session directory registered for the application.

Throws:
FileSystemException

getWebSessionDirectory

java.lang.String getWebSessionDirectory()
                                        throws FileSystemException
Returns the web based root of the session directory registered for the application.

Throws:
FileSystemException

getContextSessionDirectory

java.io.File getContextSessionDirectory()
                                        throws FileSystemException
Returns the root directory of the session in the current context.

Returns:
directory for the current session
Throws:
FileSystemException - if there is an error determining the current session directory

getWebContextSessionDirectory

java.lang.String getWebContextSessionDirectory()
                                               throws FileSystemException
Returns the web based root directory of the session in the current context.

Returns:
web directory path for the current session directory
Throws:
FileSystemException - if there is an error determining the current session directory

getTempDirectory

java.io.File getTempDirectory()
                              throws FileSystemException
Returns a temp directory for use within application.

Throws:
FileSystemException

getLogsDirectory

java.io.File getLogsDirectory()
                              throws FileSystemException
Returns the root of the logs directory for use within application.

Throws:
FileSystemException

getRecycleDirectory

java.io.File getRecycleDirectory()
                                 throws FileSystemException
Returns the root directory of the "recycle bin" for the application. Items in this directory can be periodically removed from the file system after one day.

Throws:
FileSystemException

getRecycleDirectory

java.io.File getRecycleDirectory(Course course)
                                 throws FileSystemException
Returns the root directory of the "recycle bin" for a specific course. Items in this directory can be periodically removed from the file system after one day.

Throws:
FileSystemException

getRecycleDirectory

java.io.File getRecycleDirectory(java.io.File file)
                                 throws FileSystemException,
                                        java.io.IOException
Returns the appropriate recycle directory for a given file or directory. Items in this directory can be periodically removed from the file system after one day.

Throws:
FileSystemException
java.io.IOException

getMessagingDirectory

java.io.File getMessagingDirectory(java.lang.String courseId)
                                   throws FileSystemException
Returns the messaging directory relative to the course.

Parameters:
String - Course id
content - Id Id
Throws:
FileSystemException

getMessagingDirectory

java.io.File getMessagingDirectory(Course course)
                                   throws FileSystemException
Returns the root directory relative to the course.

Parameters:
String - Course id
content - Id Id
Throws:
FileSystemException

getMessagingDirectory

java.io.File getMessagingDirectory(Id courseId)
                                   throws FileSystemException
Returns the root directory relative to the course.

Parameters:
String - Course id
content - Id Id
Throws:
FileSystemException

getWebMessagingDirectory

java.lang.String getWebMessagingDirectory(java.lang.String courseId)
                                          throws FileSystemException
Returns the url to messaging url relative to the course.

Parameters:
String - Course id
Throws:
FileSystemException

getWebMessagingDirectory

java.lang.String getWebMessagingDirectory(Course course)
                                          throws FileSystemException
Returns the url to messages directory relative to the course.

Parameters:
String - Course id
Throws:
FileSystemException

getWebMessagingDirectory

java.lang.String getWebMessagingDirectory(Id courseId)
                                          throws FileSystemException
Returns the url to messages directory relative to the course.

Parameters:
String - Course id
Throws:
FileSystemException

processUpload

MultipartRequest processUpload(javax.servlet.http.HttpServletRequest req)
                               throws java.io.IOException
Reads the file from the multipart stream and saves out the stream as a File. Once this method is invoked, it keeps reading from the stream until it reads the boundary line.

Parameters:
msr - stream reader
boundary - multi-part boundary string to parse for
fileName - name to save the file under
Throws:
java.io.IOException - thrown if the underlying io objects complain

getCollabDocDirectory

java.io.File getCollabDocDirectory()
                                   throws java.io.IOException
returns the doc root of the collab server

Returns:
Throws:
java.io.IOException


Copyright © 2003 Blackboard, Inc. All Rights Reserved.