|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.wso2.registry.jdbc.dao.VersionedArtifactDAO
public class VersionedArtifactDAO
Constructor Summary | |
---|---|
VersionedArtifactDAO()
|
Method Summary | |
---|---|
void |
add(java.lang.String path,
Artifact artifact,
java.sql.Connection conn)
Adds the given artifact to the database. |
void |
addProperties(long artifactID,
java.util.Properties props,
java.sql.Connection conn)
|
void |
addResourceVersion(Artifact artifact,
java.sql.Connection connection)
|
boolean |
artifactExist(java.lang.String path,
java.sql.Connection conn)
|
void |
deleteResource(Artifact artifact,
java.sql.Connection connection)
To delete a artifact , what actualy happen here is that update the version table with the new data and artifact will not actualy removed from the table |
Artifact |
get(java.lang.String path,
long versionNumber,
java.sql.Connection conn)
Returns the given version of the artifact. |
Artifact |
getArtifactByID(long artifactID,
long versionNumber,
java.sql.Connection conn)
|
long |
getArtifactID(java.lang.String path,
java.sql.Connection conn)
|
java.lang.String[] |
getChildPaths(long artifcatID,
long versionNumber,
java.sql.Connection connection)
|
java.util.List |
getChildren(long artifcatID,
long versionNumber,
java.sql.Connection connection)
|
java.lang.String[] |
getLatestChildPaths(long artifcatID,
long versionNumber,
java.sql.Connection connection)
|
long |
getLatestVerisonNumber(long artifactId,
java.sql.Connection connection)
|
Artifact |
getLatestVersion(java.lang.String path,
java.sql.Connection conn)
Returns the latest (current) version of an artifact. |
java.lang.String |
getParentPath(long artifcatID,
long versionNumber,
java.sql.Connection connection)
|
java.lang.String[] |
getVersionNumbers(long artifactId,
java.sql.Connection connection)
|
void |
markDeleted(java.lang.String path,
java.sql.Connection conn)
|
void |
removeProperties(long artifactID,
java.sql.Connection conn)
|
void |
restore(long artifactId,
long toVersion,
java.sql.Connection connection)
|
void |
restore2(long artifactId,
long toVersion,
java.sql.Connection connection)
To restoreVersion or rollback artifcat to a given version number |
void |
update(java.lang.String path,
Artifact artifact,
java.sql.Connection conn)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public VersionedArtifactDAO()
Method Detail |
---|
public Artifact get(java.lang.String path, long versionNumber, java.sql.Connection conn) throws java.sql.SQLException
path
- : path of the artifact
java.sql.SQLException
public Artifact getArtifactByID(long artifactID, long versionNumber, java.sql.Connection conn) throws java.sql.SQLException
java.sql.SQLException
public Artifact getLatestVersion(java.lang.String path, java.sql.Connection conn) throws java.sql.SQLException
path
- : path of the artifacyconn
- :Connection to DB
java.sql.SQLException
- : if somthing went wrongpublic java.lang.String[] getChildPaths(long artifcatID, long versionNumber, java.sql.Connection connection) throws java.sql.SQLException
java.sql.SQLException
public java.lang.String getParentPath(long artifcatID, long versionNumber, java.sql.Connection connection) throws java.sql.SQLException
java.sql.SQLException
public java.lang.String[] getLatestChildPaths(long artifcatID, long versionNumber, java.sql.Connection connection) throws java.sql.SQLException
java.sql.SQLException
public java.util.List getChildren(long artifcatID, long versionNumber, java.sql.Connection connection) throws java.sql.SQLException
java.sql.SQLException
public void add(java.lang.String path, Artifact artifact, java.sql.Connection conn) throws java.sql.SQLException
path
- Path of the new artifactartifact
- New artifactconn
- : Connection to Db
java.sql.SQLException
public void update(java.lang.String path, Artifact artifact, java.sql.Connection conn) throws java.sql.SQLException
java.sql.SQLException
public void markDeleted(java.lang.String path, java.sql.Connection conn) throws java.sql.SQLException
java.sql.SQLException
public void addProperties(long artifactID, java.util.Properties props, java.sql.Connection conn) throws java.sql.SQLException
java.sql.SQLException
public void removeProperties(long artifactID, java.sql.Connection conn) throws java.sql.SQLException
java.sql.SQLException
public boolean artifactExist(java.lang.String path, java.sql.Connection conn) throws java.sql.SQLException
java.sql.SQLException
public long getArtifactID(java.lang.String path, java.sql.Connection conn) throws java.sql.SQLException
java.sql.SQLException
public void addResourceVersion(Artifact artifact, java.sql.Connection connection) throws java.sql.SQLException
java.sql.SQLException
public long getLatestVerisonNumber(long artifactId, java.sql.Connection connection) throws java.sql.SQLException
java.sql.SQLException
public java.lang.String[] getVersionNumbers(long artifactId, java.sql.Connection connection) throws java.sql.SQLException
java.sql.SQLException
public void restore(long artifactId, long toVersion, java.sql.Connection connection) throws java.sql.SQLException
java.sql.SQLException
public void restore2(long artifactId, long toVersion, java.sql.Connection connection) throws java.sql.SQLException
artifactId
- : Artifact IDconnection
- : Connection to DBtoVersion
- : to which version we need to restoreVersion
java.sql.SQLException
- : If something went wrongpublic void deleteResource(Artifact artifact, java.sql.Connection connection) throws java.sql.SQLException
artifact
- : Artifact to be deletedconnection
- : Connection to the DB
java.sql.SQLException
- : if something went wrong
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |