org.ow2.weblab.service
Class SimpleRepo
java.lang.Object
org.ow2.weblab.service.SimpleRepo
- All Implemented Interfaces:
- org.weblab_project.services.resourcecontainer.ResourceContainer
public class SimpleRepo
- extends java.lang.Object
- implements org.weblab_project.services.resourcecontainer.ResourceContainer
This is a simple implementation of a ResourceContainer.
It enable to save resource on a file system and get them after.
It is a simpler version that the filerepository one.
Main differences are:
- This version does not allocate uris; it means that incoming URIs has to be unique otherwise their will be some replacements. It maybe be useful for some applications but in most of the case
you'd rather let the FileRepository allocate URIs.
- This version does not enable to get a subresource. It means that if you just want to change an annotation on a document, should shall re-save the whole document. The FileRepository has this
functionality.
- Author:
- ymombrun, Copyright EADS DS
- Date:
- 2010-04-15
|
Field Summary |
static java.lang.String |
PROPERTIES_FILE
The property file to be used to configure the service. |
static java.lang.String |
REPO_PATH_PROPERTY
Name of the property denoting the repository path. |
|
Constructor Summary |
SimpleRepo()
The default constructor |
|
Method Summary |
org.weblab_project.services.resourcecontainer.types.GetResourceReturn |
getResource(org.weblab_project.services.resourcecontainer.types.GetResourceArgs args)
|
org.weblab_project.services.resourcecontainer.types.SaveResourceReturn |
saveResource(org.weblab_project.services.resourcecontainer.types.SaveResourceArgs args)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
PROPERTIES_FILE
public static final java.lang.String PROPERTIES_FILE
- The property file to be used to configure the service.
- See Also:
- Constant Field Values
REPO_PATH_PROPERTY
public static final java.lang.String REPO_PATH_PROPERTY
- Name of the property denoting the repository path.
- See Also:
- Constant Field Values
SimpleRepo
public SimpleRepo()
- The default constructor
getResource
public org.weblab_project.services.resourcecontainer.types.GetResourceReturn getResource(org.weblab_project.services.resourcecontainer.types.GetResourceArgs args)
throws org.weblab_project.services.resourcecontainer.GetResourceException
- Specified by:
getResource in interface org.weblab_project.services.resourcecontainer.ResourceContainer
- Throws:
org.weblab_project.services.resourcecontainer.GetResourceException
saveResource
public org.weblab_project.services.resourcecontainer.types.SaveResourceReturn saveResource(org.weblab_project.services.resourcecontainer.types.SaveResourceArgs args)
throws org.weblab_project.services.resourcecontainer.SaveResourceException
- Specified by:
saveResource in interface org.weblab_project.services.resourcecontainer.ResourceContainer
- Throws:
org.weblab_project.services.resourcecontainer.SaveResourceException
Copyright © 2004-2010. All Rights Reserved.