|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.wso2.registry.jdbc.Repository
public class Repository
Encapsulates the retrieving, storing, modifing and deleting of resources. This class only deals with the current versions of resources and it is unware of any versioning or snapshot activity. Only the current version related tables are accessed and updated from the methods of this class.
Field Summary | |
---|---|
static org.apache.commons.logging.Log |
log
|
Constructor Summary | |
---|---|
Repository(javax.sql.DataSource dataSource)
|
Method Summary | |
---|---|
java.lang.String |
copy(java.lang.String sourcePath,
java.lang.String targetPath)
|
void |
delete(java.lang.String path)
Deletes the pure resource refered by the path. |
Resource |
get(java.lang.String path)
Gets the pure resource referred by the given path. |
Collection |
get(java.lang.String path,
int start,
int pageLen)
|
java.lang.String |
importResource(java.lang.String path,
java.lang.String sourceURL,
Resource metadata)
Creates a resource with the content imported from the source URL and metadata extracted from the given metadata resource instance. |
java.lang.String |
move(java.lang.String oldPath,
java.lang.String newPath)
Moves the resource at oldPath to the newPath. |
void |
put(java.lang.String path,
Resource resource)
Adds or updates the resource in the given path with the given resource. |
java.lang.String |
rename(java.lang.String oldPath,
java.lang.String newName)
Renames the resource at oldPath with the given newName. |
boolean |
resourceExists(java.lang.String path)
Checks if a pure resource exists in the given path. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final org.apache.commons.logging.Log log
Constructor Detail |
---|
public Repository(javax.sql.DataSource dataSource)
Method Detail |
---|
public boolean resourceExists(java.lang.String path) throws RegistryException
path
- Path of a possible pure resource.
RegistryException
public Resource get(java.lang.String path) throws RegistryException
path
- Path of a "pure" resource. Path should map to an actual resource stored
in the database. Paths refering to virtual resource are not handled (e.g. /c1/r1;comments).
RegistryException
public Collection get(java.lang.String path, int start, int pageLen) throws RegistryException
RegistryException
public void put(java.lang.String path, Resource resource) throws RegistryException
path
- Path of the resource to be added or updated. Path should only refer to current
version a pure resource. i.e. Path should not contain any version information as it is
impossible to add or update old versions.resource
- Resource to be added or updated.
RegistryException
public java.lang.String importResource(java.lang.String path, java.lang.String sourceURL, Resource metadata) throws RegistryException
path
- Path to put the resourcesourceURL
- URL to import resource contentmetadata
- Metadata for the new resource is extracted from this metadata resource
RegistryException
- for all exceptional scenariospublic void delete(java.lang.String path) throws RegistryException
path
- path Path of the resource deleted. Path should only refer to current
version a pure resource. i.e. Path should not contain any version information as it is
impossible to delete old versions.
RegistryException
public java.lang.String rename(java.lang.String oldPath, java.lang.String newName) throws RegistryException
oldPath
- Pure path of the resource to be renamed.newName
- New name for the resource. Name should not contain "/".
RegistryException
public java.lang.String move(java.lang.String oldPath, java.lang.String newPath) throws RegistryException
oldPath
- Path of a existing resourcenewPath
- New path of the resource
RegistryException
public java.lang.String copy(java.lang.String sourcePath, java.lang.String targetPath) throws RegistryException
RegistryException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |