|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.wso2.registry.versions.VersionHandler
public class VersionHandler
This class is to handle all the version related stuff , putting into the dependecy tables , updating the tables and ect..
Constructor Summary | |
---|---|
VersionHandler()
|
Method Summary | |
---|---|
static void |
addResourceToVersionTable(java.sql.Connection connection,
Artifact artifact)
To add a new resource or to update a new resource we can use this. |
static 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 |
static java.lang.String[] |
getChildrenPath(long artifcatID,
java.sql.Connection connection)
To get the depndents path for a given artifact |
static java.lang.String[] |
getChildrenPath(long artifcatID,
long versionNumber,
java.sql.Connection connection)
|
static java.lang.String[] |
getLatestChildrenPath(long artifcatID,
long versionNumber,
java.sql.Connection connection)
|
static long |
getLatestVerison(long artifactId,
java.sql.Connection connection)
To get the version latest version number for a given artifact |
static java.lang.String |
getParentPath(long artifcatID,
long versionNumber,
java.sql.Connection connection)
|
static java.lang.String[] |
getVersions(long artifactId,
java.sql.Connection connection)
|
static void |
revert(long artifactId,
long toVersion,
java.sql.Connection connection)
To restoreVersion or rollback artifcat to a given version number |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public VersionHandler()
Method Detail |
---|
public static void addResourceToVersionTable(java.sql.Connection connection, Artifact artifact) throws java.sql.SQLException
connection
- : Connection to DBartifact
- : Artifcat need to put
java.sql.SQLException
- : If something went wrongpublic static 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 wrongpublic static long getLatestVerison(long artifactId, java.sql.Connection connection) throws java.sql.SQLException
artifactId
- : Artifact IDconnection
- : DB connection
java.sql.SQLException
- : If something went wrongpublic static java.lang.String[] getVersions(long artifactId, java.sql.Connection connection) throws java.sql.SQLException
java.sql.SQLException
public static java.lang.String[] getChildrenPath(long artifcatID, java.sql.Connection connection) throws java.sql.SQLException
artifcatID
- : IDconnection
- : Connection to DB
java.sql.SQLException
- : If something went wrongpublic static java.lang.String[] getChildrenPath(long artifcatID, long versionNumber, java.sql.Connection connection) throws java.sql.SQLException
java.sql.SQLException
public static java.lang.String getParentPath(long artifcatID, long versionNumber, java.sql.Connection connection) throws java.sql.SQLException
java.sql.SQLException
public static java.lang.String[] getLatestChildrenPath(long artifcatID, long versionNumber, java.sql.Connection connection) throws java.sql.SQLException
java.sql.SQLException
public static void revert(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 wrong
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |