|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.wso2.registry.jdbc.dao.ResourceDAO
public class ResourceDAO
Field Summary | |
---|---|
static int |
COLLECTION
|
static int |
NULL
|
static int |
RESOURCE
|
Constructor Summary | |
---|---|
ResourceDAO()
|
Method Summary | |
---|---|
void |
add(java.lang.String path,
java.lang.String parentID,
ResourceImpl resourceImpl)
|
void |
addRoot(java.lang.String path,
ResourceImpl resourceImpl)
|
void |
attachChild(java.lang.String parentID,
java.lang.String childID)
|
void |
delete(java.lang.String resourceID)
|
void |
deleteSubtree(java.lang.String resourceID)
|
void |
detachChild(java.lang.String childID)
|
ResourceImpl |
get(java.lang.String path)
Returns the resource in the given path filled with metadata and access to the content. |
java.util.List<java.lang.String> |
getChildIDs(java.lang.String resourceID)
|
java.lang.String |
getResourceAuthor(java.lang.String path)
Return the author (the user who creates the resource) if a resource exists at given path. |
java.io.InputStream |
getResourceContentStream(java.lang.String contentID,
java.sql.Connection conn)
Returns a input stream to fetch content of the resource. |
java.lang.String |
getResourceID(java.lang.String path)
Returns the resource ID (RID) of the resource refered by the given path. |
java.lang.String |
getResourceID(java.lang.String path,
java.sql.Connection conn)
Returns the resource ID (RID) of the resource refered by the given path. |
java.lang.String |
getResourcePath(java.lang.String resourceID)
|
int |
getResourceType(java.lang.String path)
Returns the type of the resource refered by the given path. |
boolean |
resourceExists(java.lang.String path)
|
void |
setPath(java.lang.String resourceID,
java.lang.String newPath)
|
void |
update(java.lang.String resourceID,
ResourceImpl resourceImpl)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int NULL
public static final int RESOURCE
public static final int COLLECTION
Constructor Detail |
---|
public ResourceDAO()
Method Detail |
---|
public java.lang.String getResourceID(java.lang.String path) throws RegistryException
path
- Pure path of the resource
RegistryException
public java.lang.String getResourceID(java.lang.String path, java.sql.Connection conn) throws java.sql.SQLException
path
- Pure path of the resourceconn
- Database connection for accessing the RESOURCE table
java.sql.SQLException
public java.lang.String getResourcePath(java.lang.String resourceID) throws RegistryException
RegistryException
public int getResourceType(java.lang.String path) throws RegistryException
path
- Pure path of a resource
RegistryException
public boolean resourceExists(java.lang.String path) throws RegistryException
RegistryException
public void attachChild(java.lang.String parentID, java.lang.String childID) throws RegistryException
RegistryException
public void detachChild(java.lang.String childID) throws RegistryException
RegistryException
public ResourceImpl get(java.lang.String path) throws RegistryException
path
- Path of the resource.
RegistryException
public void addRoot(java.lang.String path, ResourceImpl resourceImpl) throws RegistryException
RegistryException
public void add(java.lang.String path, java.lang.String parentID, ResourceImpl resourceImpl) throws RegistryException
RegistryException
public void update(java.lang.String resourceID, ResourceImpl resourceImpl) throws RegistryException
RegistryException
public void delete(java.lang.String resourceID) throws RegistryException
RegistryException
public void deleteSubtree(java.lang.String resourceID) throws RegistryException
RegistryException
public java.util.List<java.lang.String> getChildIDs(java.lang.String resourceID) throws RegistryException
RegistryException
public java.lang.String getResourceAuthor(java.lang.String path) throws RegistryException
path
- Path of the resource.
RegistryException
- On any database related exception.public java.io.InputStream getResourceContentStream(java.lang.String contentID, java.sql.Connection conn) throws RegistryException
contentID
- UUID of the contentconn
- Database connection to the Registry database.
RegistryException
- on any exceptionpublic void setPath(java.lang.String resourceID, java.lang.String newPath) throws RegistryException
RegistryException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |