org.ow2.weblab.content.binary
Class BinaryFolderContentManager
java.lang.Object
org.ow2.weblab.content.FolderContentManager
org.ow2.weblab.content.binary.BinaryFolderContentManager
public class BinaryFolderContentManager
- extends FolderContentManager
|
Method Summary |
protected void |
copyFile(java.io.File file,
java.io.File newFile)
|
org.weblab_project.core.model.content.BinaryContent |
getContent(java.lang.String contentUri,
int offset,
int limit)
Return a Content using the contentUri, an offset and a limit |
static BinaryFolderContentManager |
getInstance()
|
static BinaryFolderContentManager |
getInstance(java.lang.String folderPath)
|
void |
saveContent(org.weblab_project.core.model.content.Content content)
Save the content. |
void |
saveFile(java.io.File file,
java.lang.String uri)
Add new file to the content manager (copy it to the internal repository) |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
BinaryFolderContentManager
protected BinaryFolderContentManager(java.lang.String folderPath)
throws org.weblab_project.core.exception.WebLabUncheckedException
- Throws:
org.weblab_project.core.exception.WebLabUncheckedException
getContent
public org.weblab_project.core.model.content.BinaryContent getContent(java.lang.String contentUri,
int offset,
int limit)
throws org.weblab_project.core.exception.WebLabCheckedException
- Return a Content using the contentUri, an offset and a limit
- Specified by:
getContent in class FolderContentManager
- Parameters:
contentUri - a valid WLRI which identify a Content in this "repository"offset - beginning part of the filelimit - maximum size of the part
- Returns:
- a Content object containing with data writes
- Throws:
org.weblab_project.core.exception.WebLabCheckedException - most of time an access problem
copyFile
protected void copyFile(java.io.File file,
java.io.File newFile)
throws org.weblab_project.core.exception.WebLabCheckedException
- Parameters:
file - Input filenewFile - Output file
- Throws:
org.weblab_project.core.exception.WebLabCheckedException - If an IOException occurs.
saveFile
public void saveFile(java.io.File file,
java.lang.String uri)
throws org.weblab_project.core.exception.WebLabCheckedException
- Add new file to the content manager (copy it to the internal repository)
- Parameters:
file - file to copyuri - identify the future content
- Throws:
org.weblab_project.core.exception.WebLabCheckedException
saveContent
public void saveContent(org.weblab_project.core.model.content.Content content)
throws org.weblab_project.core.exception.WebLabCheckedException
- Description copied from class:
FolderContentManager
- Save the content.
- Specified by:
saveContent in class FolderContentManager
- Parameters:
content - The content to be saved.
- Throws:
org.weblab_project.core.exception.WebLabCheckedException - most of time an access problem.
getInstance
public static BinaryFolderContentManager getInstance(java.lang.String folderPath)
throws org.weblab_project.core.exception.WebLabUncheckedException
- Parameters:
folderPath - The path to the folder.
- Returns:
- The BinaryFolderContentManager
- Throws:
org.weblab_project.core.exception.WebLabUncheckedException
getInstance
public static BinaryFolderContentManager getInstance()
throws org.weblab_project.core.exception.WebLabUncheckedException
- Returns:
- The BinaryFolderContentManager
- Throws:
org.weblab_project.core.exception.WebLabUncheckedException
Copyright © 2004-2011. All Rights Reserved.