|
||||||||||
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)
|
java.lang.String |
addContent(java.io.InputStream contentStream)
|
void |
addRoot(java.lang.String path,
ResourceImpl resourceImpl)
|
void |
attachChild(java.lang.String parentID,
java.lang.String childID)
|
void |
createFileBasedContentFromDB(java.lang.String contentID,
java.sql.Connection conn)
|
void |
delete(java.lang.String resourceID)
|
void |
deleteSubtree(java.lang.String resourceID)
|
void |
detachChild(java.lang.String childID)
|
void |
fillChildren(CollectionImpl collection,
int start,
int pageLen)
|
void |
fillResourceProperties(ResourceImpl resourceImpl)
|
ResourceImpl |
get(java.lang.String path)
Returns the resource in the given path filled with metadata and access to the content. |
CollectionImpl |
get(java.lang.String path,
int start,
int pageLen)
|
int |
getChildCount(java.lang.String resourceID,
java.sql.Connection conn)
|
java.util.List<java.lang.String> |
getChildIDs(java.lang.String resourceID)
|
java.util.List<java.lang.String> |
getChildPaths(java.lang.String resourceID,
java.sql.Connection conn)
|
java.util.List<java.lang.String> |
getChildPaths(java.lang.String resourceID,
int start,
int pageLen,
java.sql.Connection conn)
|
int |
getEquivalentVersion(java.lang.String resourceID)
|
long |
getEquivalenVersion(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. |
ResourceImpl |
getResourceByID(java.lang.String resourceID)
|
java.io.InputStream |
getResourceContentStream(java.lang.String contentID,
java.sql.Connection conn)
Returns a input stream to fetch content of the resource. |
ResourceDO |
getResourceDO(java.lang.String resourceID)
|
static 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. |
void |
invalidateCurrentSnapshot(java.lang.String resourcePath)
|
void |
markDirty(java.lang.String resourceID)
|
void |
markDirtyByPath(java.lang.String resourcePath)
|
boolean |
resourceExists(java.lang.String path)
|
boolean |
resourceExistsWithID(java.lang.String resourceID)
|
void |
setPath(java.lang.String resourceID,
java.lang.String newPath)
|
void |
setSnapshotID(java.lang.String resourceID,
long snapshotID)
|
void |
update(java.lang.String resourceID,
ResourceImpl resourceImpl)
|
void |
updateContent(java.lang.String contentID,
java.io.InputStream contentStream)
|
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 static java.lang.String getResourceID(java.lang.String path) throws RegistryException
path
- Pure path of the resource
RegistryException
- something went wrongpublic 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 REG_RESOURCE table
java.sql.SQLException
- something went wrongpublic 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
- something went wrongpublic boolean resourceExists(java.lang.String path) throws RegistryException
RegistryException
public boolean resourceExistsWithID(java.lang.String resourceID) 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
- something went wrongpublic CollectionImpl get(java.lang.String path, int start, int pageLen) throws RegistryException
RegistryException
public void fillResourceProperties(ResourceImpl resourceImpl) throws RegistryException
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 int getEquivalentVersion(java.lang.String resourceID) throws RegistryException
RegistryException
public void markDirty(java.lang.String resourceID) 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 int getChildCount(java.lang.String resourceID, java.sql.Connection conn) throws RegistryException
RegistryException
public java.util.List<java.lang.String> getChildPaths(java.lang.String resourceID, java.sql.Connection conn) throws RegistryException
RegistryException
public java.util.List<java.lang.String> getChildPaths(java.lang.String resourceID, int start, int pageLen, java.sql.Connection conn) 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 void fillChildren(CollectionImpl collection, int start, int pageLen) throws RegistryException
RegistryException
public ResourceImpl getResourceByID(java.lang.String resourceID) throws RegistryException
RegistryException
public void createFileBasedContentFromDB(java.lang.String contentID, java.sql.Connection conn) throws RegistryException
RegistryException
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 updateContent(java.lang.String contentID, java.io.InputStream contentStream) throws RegistryException
RegistryException
public void setPath(java.lang.String resourceID, java.lang.String newPath) throws RegistryException
RegistryException
public long getEquivalenVersion(java.lang.String resourceID) throws RegistryException
RegistryException
public ResourceDO getResourceDO(java.lang.String resourceID) throws RegistryException
RegistryException
public java.lang.String addContent(java.io.InputStream contentStream) throws RegistryException
RegistryException
public void setSnapshotID(java.lang.String resourceID, long snapshotID) throws RegistryException
RegistryException
public void markDirtyByPath(java.lang.String resourcePath) throws RegistryException
RegistryException
public void invalidateCurrentSnapshot(java.lang.String resourcePath) throws RegistryException
RegistryException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |