org.ow2.weblab.repository.file.impl
Class FileRepositoryService

java.lang.Object
  extended by org.ow2.weblab.repository.file.impl.FileRepositoryService
All Implemented Interfaces:
org.ow2.weblab.core.services.ResourceContainer

public class FileRepositoryService
extends java.lang.Object
implements org.ow2.weblab.core.services.ResourceContainer

This class is service in charge of storing content in it. It will change the URIs of the received resources if they are not known.


Field Summary
static int DEFAULT_FILE_PER_FOLDER
           
static java.lang.String DEFAULT_FILE_PREFIX
           
static java.lang.String DEFAULT_PATH
           
static java.lang.String DEFAULT_REPO_ID
           
protected  org.apache.commons.logging.Log log
           
protected  FileRepository repo
           
 
Constructor Summary
FileRepositoryService()
          The default constructor
FileRepositoryService(java.lang.String pathToTheRepository)
           
FileRepositoryService(java.lang.String pathToTheRepository, int numberOfFilePerFolder)
           
FileRepositoryService(java.lang.String pathToTheRepository, int numberOfFilePerFolder, java.lang.String repoId, java.lang.String filePrefix)
           
 
Method Summary
 org.ow2.weblab.core.services.resourcecontainer.LoadResourceReturn loadResource(org.ow2.weblab.core.services.resourcecontainer.LoadResourceArgs args)
           
 org.ow2.weblab.core.services.resourcecontainer.SaveResourceReturn saveResource(org.ow2.weblab.core.services.resourcecontainer.SaveResourceArgs args)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_REPO_ID

public static final java.lang.String DEFAULT_REPO_ID
See Also:
Constant Field Values

DEFAULT_PATH

public static final java.lang.String DEFAULT_PATH
See Also:
Constant Field Values

DEFAULT_FILE_PER_FOLDER

public static final int DEFAULT_FILE_PER_FOLDER
See Also:
Constant Field Values

DEFAULT_FILE_PREFIX

public static final java.lang.String DEFAULT_FILE_PREFIX
See Also:
Constant Field Values

repo

protected final FileRepository repo

log

protected final org.apache.commons.logging.Log log
Constructor Detail

FileRepositoryService

public FileRepositoryService()
The default constructor


FileRepositoryService

public FileRepositoryService(java.lang.String pathToTheRepository)
Parameters:
pathToTheRepository - The path to the root folder of the repository

FileRepositoryService

public FileRepositoryService(java.lang.String pathToTheRepository,
                             int numberOfFilePerFolder)
Parameters:
pathToTheRepository - The path to the root folder of the repository
numberOfFilePerFolder - The number of file per sub folder in the repository

FileRepositoryService

public FileRepositoryService(java.lang.String pathToTheRepository,
                             int numberOfFilePerFolder,
                             java.lang.String repoId,
                             java.lang.String filePrefix)
Parameters:
pathToTheRepository - The path to the root folder of the repository
numberOfFilePerFolder - The number of file per sub folder in the repository
repoId - The name of the repository used in the URIs
filePrefix - The prefix to be used in file names
Method Detail

loadResource

public org.ow2.weblab.core.services.resourcecontainer.LoadResourceReturn loadResource(org.ow2.weblab.core.services.resourcecontainer.LoadResourceArgs args)
                                                                               throws org.ow2.weblab.core.services.InvalidParameterException,
                                                                                      org.ow2.weblab.core.services.UnexpectedException
Specified by:
loadResource in interface org.ow2.weblab.core.services.ResourceContainer
Throws:
org.ow2.weblab.core.services.InvalidParameterException
org.ow2.weblab.core.services.UnexpectedException

saveResource

public org.ow2.weblab.core.services.resourcecontainer.SaveResourceReturn saveResource(org.ow2.weblab.core.services.resourcecontainer.SaveResourceArgs args)
                                                                               throws org.ow2.weblab.core.services.InvalidParameterException,
                                                                                      org.ow2.weblab.core.services.UnexpectedException
Specified by:
saveResource in interface org.ow2.weblab.core.services.ResourceContainer
Throws:
org.ow2.weblab.core.services.InvalidParameterException
org.ow2.weblab.core.services.UnexpectedException


Copyright © 2004-2012. All Rights Reserved.