[Registry-dev] svn commit r15513 - in
trunk/registry/modules/core/src/main/java/org/wso2/registry:
. app jdbc secure
svn at wso2.org
svn at wso2.org
Thu Apr 3 01:55:20 PDT 2008
Author: azeez
Date: Thu Apr 3 01:55:13 2008
New Revision: 15513
Log:
Adding transaction methods
Modified:
trunk/registry/modules/core/src/main/java/org/wso2/registry/Registry.java
trunk/registry/modules/core/src/main/java/org/wso2/registry/app/RemoteRegistry.java
trunk/registry/modules/core/src/main/java/org/wso2/registry/jdbc/JDBCRegistry.java
trunk/registry/modules/core/src/main/java/org/wso2/registry/secure/SecureRegistry.java
Modified: trunk/registry/modules/core/src/main/java/org/wso2/registry/Registry.java
==============================================================================
--- trunk/registry/modules/core/src/main/java/org/wso2/registry/Registry.java (original)
+++ trunk/registry/modules/core/src/main/java/org/wso2/registry/Registry.java Thu Apr 3 01:55:13 2008
@@ -84,8 +84,8 @@
* versions. If a path refers to the current version, it should contain the path in the form
* /c1/c2/r1. If it refers to an old version, it should be in the form /c1/c2/r1?v=2.
*
- * @param associationType Type of the association
- * @param sourcePath Path of the dependent resource
+ * @param associationType Type of the association
+ * @param sourcePath Path of the dependent resource
* @param associationPaths Paths of dependency resources
* @throws RegistryException Depends on the implementation
*/
@@ -100,10 +100,11 @@
* given resource.
*
* @param resourcePath Path of the resource to analyse associations.
- * @throws RegistryException : If something went wrong
- * @return List of Association
+ * @return List of Association
+ * @throws RegistryException : If something went wrong
*/
Association[] getAllAssociation(String resourcePath) throws RegistryException;
+
/**
* Get all associations of the given resource for a give association type.
* This is a chain of association starting from the
@@ -111,13 +112,13 @@
* his is useful to analyse how changes to other resources would affect the
* given resource.
*
- * @param resourcePath Path of the resource to analyse associations.
- * @throws RegistryException : If something went wrong
- * @return List of Association
+ * @param resourcePath Path of the resource to analyse associations.
* @param associationType : Type of the association , that could be dependecy , or some other type
+ * @return List of Association
+ * @throws RegistryException : If something went wrong
*/
- Association[] getAllAssociation(String resourcePath , String associationType) throws RegistryException;
-
+ Association[] getAllAssociation(String resourcePath, String associationType)
+ throws RegistryException;
////////////////////////////////////////////////////////
// Tagging
@@ -280,9 +281,9 @@
* This invokes an action on a specified Aspect, which must be associated with the Resource
* at the given path.
*
- * @param resourcePath Path of the resource
- * @param aspectName Name of the aspect
- * @param action Which action was selected - actions are aspect-specific
+ * @param resourcePath Path of the resource
+ * @param aspectName Name of the aspect
+ * @param action Which action was selected - actions are aspect-specific
* @throws RegistryException if the Aspect isn't associated with the Resource, or the action
* isn't valid, or an Aspect-specific problem occurs.
*/
@@ -302,4 +303,25 @@
*/
String[] getAspectActions(String resourcePath, String aspectName)
throws RegistryException;
+
+ /**
+ * Start a new transaction
+ *
+ * @throws RegistryException If an error occurs while starting a transaction
+ */
+ void beginTransaction() throws RegistryException;
+
+ /**
+ * Commit the currently active transaction
+ *
+ * @throws RegistryException If an error occurs while committing a transaction
+ */
+ void commitTransaction() throws RegistryException;
+
+ /**
+ * Rollback the currently active transaction
+ *
+ * @throws RegistryException If an error occurs while rolling back a transaction
+ */
+ void rollbackTransaction() throws RegistryException;
}
Modified: trunk/registry/modules/core/src/main/java/org/wso2/registry/app/RemoteRegistry.java
==============================================================================
--- trunk/registry/modules/core/src/main/java/org/wso2/registry/app/RemoteRegistry.java (original)
+++ trunk/registry/modules/core/src/main/java/org/wso2/registry/app/RemoteRegistry.java Thu Apr 3 01:55:13 2008
@@ -932,6 +932,21 @@
}
}
+ public void beginTransaction() throws RegistryException {
+ //TODO: Method implementation
+
+ }
+
+ public void commitTransaction() throws RegistryException {
+ //TODO: Method implementation
+
+ }
+
+ public void rollbackTransaction() throws RegistryException {
+ //TODO: Method implementation
+
+ }
+
public String[] getAspectActions(String resourcePath, String aspectName)
throws RegistryException {
Abdera abdera = new Abdera();
Modified: trunk/registry/modules/core/src/main/java/org/wso2/registry/jdbc/JDBCRegistry.java
==============================================================================
--- trunk/registry/modules/core/src/main/java/org/wso2/registry/jdbc/JDBCRegistry.java (original)
+++ trunk/registry/modules/core/src/main/java/org/wso2/registry/jdbc/JDBCRegistry.java Thu Apr 3 01:55:13 2008
@@ -1395,4 +1395,19 @@
context.setResource(resource);
return aspect.getAvailableActions(context);
}
+
+ public void beginTransaction() throws RegistryException {
+ //TODO: Method implementation
+
+ }
+
+ public void commitTransaction() throws RegistryException {
+ //TODO: Method implementation
+
+ }
+
+ public void rollbackTransaction() throws RegistryException {
+ //TODO: Method implementation
+
+ }
}
Modified: trunk/registry/modules/core/src/main/java/org/wso2/registry/secure/SecureRegistry.java
==============================================================================
--- trunk/registry/modules/core/src/main/java/org/wso2/registry/secure/SecureRegistry.java (original)
+++ trunk/registry/modules/core/src/main/java/org/wso2/registry/secure/SecureRegistry.java Thu Apr 3 01:55:13 2008
@@ -756,4 +756,19 @@
public Association[] getAllAssociation(String resourcePath, String associationType) throws RegistryException {
return registry.getAllAssociation(resourcePath, associationType);
}
+
+ public void beginTransaction() throws RegistryException {
+ //TODO: Method implementation
+
+ }
+
+ public void commitTransaction() throws RegistryException {
+ //TODO: Method implementation
+
+ }
+
+ public void rollbackTransaction() throws RegistryException {
+ //TODO: Method implementation
+
+ }
}
More information about the Registry-dev
mailing list