You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@continuum.apache.org by ri...@apache.org on 2006/12/28 07:08:30 UTC
svn commit: r490659 - in
/maven/continuum/branches/key-based-refactor/continuum-api/src/main/java/org/apache/maven/continuum/store:
ProjectGroupStore.java ProjectStore.java SystemStore.java
Author: rinku
Date: Wed Dec 27 22:08:29 2006
New Revision: 490659
URL: http://svn.apache.org/viewvc?view=rev&rev=490659
Log:
o moved operations to separate store interfaces.
Modified:
maven/continuum/branches/key-based-refactor/continuum-api/src/main/java/org/apache/maven/continuum/store/ProjectGroupStore.java
maven/continuum/branches/key-based-refactor/continuum-api/src/main/java/org/apache/maven/continuum/store/ProjectStore.java
maven/continuum/branches/key-based-refactor/continuum-api/src/main/java/org/apache/maven/continuum/store/SystemStore.java
Modified: maven/continuum/branches/key-based-refactor/continuum-api/src/main/java/org/apache/maven/continuum/store/ProjectGroupStore.java
URL: http://svn.apache.org/viewvc/maven/continuum/branches/key-based-refactor/continuum-api/src/main/java/org/apache/maven/continuum/store/ProjectGroupStore.java?view=diff&rev=490659&r1=490658&r2=490659
==============================================================================
--- maven/continuum/branches/key-based-refactor/continuum-api/src/main/java/org/apache/maven/continuum/store/ProjectGroupStore.java (original)
+++ maven/continuum/branches/key-based-refactor/continuum-api/src/main/java/org/apache/maven/continuum/store/ProjectGroupStore.java Wed Dec 27 22:08:29 2006
@@ -3,6 +3,8 @@
*/
package org.apache.maven.continuum.store;
+import org.apache.maven.continuum.key.GroupProjectKey;
+import org.apache.maven.continuum.model.project.Project;
import org.apache.maven.continuum.model.project.ProjectGroup;
/**
@@ -17,6 +19,46 @@
{
public static final String ROLE = ProjectGroupStore.class.getName();
+
+ /**
+ * Removes the passed {@link ProjectGroup} instance from the underlying
+ * store.
+ *
+ * @param project {@link ProjectGroup} instance to remove.
+ * @throws ContinuumStoreException if there was an error removing the
+ * entity.
+ */
+ public void deleteProjectGroup( ProjectGroup project ) throws ContinuumStoreException;
+
+ /**
+ * Looks up the underlying store and returns a {@link Project} instance that
+ * matches the key specified by the passed in {@link GroupProjectKey}.
+ * <p>
+ * The key is the {@link ProjectGroup}'s key that is obtained from
+ * {@link GroupProjectKey#getGroupKey()}.
+ *
+ * @param key Composite key that identifies the target project group.
+ * @return {@link ProjectGroup} instance that matches the specified key.
+ * @throws ContinuumObjectNotFoundException if the instance could not be
+ * looked up.
+ * @throws ContinuumStoreException
+ */
+ public ProjectGroup lookupProjectGroup( GroupProjectKey key )
+ throws ContinuumObjectNotFoundException, ContinuumStoreException;
+
+ /**
+ * Persists the passed in {@link ProjectGroup} instance to the underlying
+ * store.
+ * <p>
+ * If the entity instance already exists in the database it is updated, else
+ * a new instance is created and an store-generated identifier assigned to
+ * it.
+ *
+ * @param project {@link ProjectGroup} instance to be created/saved.
+ * @return updated {@link ProjectGroup} instance.
+ * @throws ContinuumStoreException if there was an error saving the entity.
+ */
+ public ProjectGroup saveProjectGroup( ProjectGroup projectGroup ) throws ContinuumStoreException;
}
Modified: maven/continuum/branches/key-based-refactor/continuum-api/src/main/java/org/apache/maven/continuum/store/ProjectStore.java
URL: http://svn.apache.org/viewvc/maven/continuum/branches/key-based-refactor/continuum-api/src/main/java/org/apache/maven/continuum/store/ProjectStore.java?view=diff&rev=490659&r1=490658&r2=490659
==============================================================================
--- maven/continuum/branches/key-based-refactor/continuum-api/src/main/java/org/apache/maven/continuum/store/ProjectStore.java (original)
+++ maven/continuum/branches/key-based-refactor/continuum-api/src/main/java/org/apache/maven/continuum/store/ProjectStore.java Wed Dec 27 22:08:29 2006
@@ -17,12 +17,7 @@
*/
import org.apache.maven.continuum.key.GroupProjectKey;
-import org.apache.maven.continuum.model.project.Profile;
import org.apache.maven.continuum.model.project.Project;
-import org.apache.maven.continuum.model.project.ProjectGroup;
-import org.apache.maven.continuum.model.project.Schedule;
-import org.apache.maven.continuum.model.system.Installation;
-import org.apache.maven.continuum.model.system.SystemConfiguration;
/**
* Defines the contract consisting of operations that can be performed on
@@ -51,71 +46,6 @@
throws ContinuumObjectNotFoundException, ContinuumStoreException;
/**
- * Looks up the underlying store and returns a {@link Project} instance that
- * matches the key specified by the passed in {@link GroupProjectKey}.
- * <p>
- * The key is the {@link ProjectGroup}'s key that is obtained from
- * {@link GroupProjectKey#getGroupKey()}.
- *
- * @param key Composite key that identifies the target project group.
- * @return {@link ProjectGroup} instance that matches the specified key.
- * @throws ContinuumObjectNotFoundException if the instance could not be
- * looked up.
- * @throws ContinuumStoreException
- */
- public ProjectGroup lookupProjectGroup( GroupProjectKey key )
- throws ContinuumObjectNotFoundException, ContinuumStoreException;
-
- /**
- * Looks up the underlying store and returns a {@link Schedule} instance
- * that matches the specified id.
- *
- * @param id {@link Schedule} id to match.
- * @return matching {@link Schedule} instance.
- * @throws ContinuumObjectNotFoundException if the instance could not be
- * looked up.
- * @throws ContinuumStoreException
- */
- public Schedule lookupSchedule( long id ) throws ContinuumObjectNotFoundException, ContinuumStoreException;
-
- /**
- * Looks up the underlying store and returns a {@link Profile} instance that
- * matches the specified id.
- *
- * @param id {@link Profile} id to match.
- * @return matching {@link Profile} instance.
- * @throws ContinuumObjectNotFoundException if the instance could not be
- * looked up.
- * @throws ContinuumStoreException
- */
- public Profile lookupProfile( long id ) throws ContinuumObjectNotFoundException, ContinuumStoreException;
-
- /**
- * Looks up the underlying store and returns a {@link Installation} instance
- * that matches the specified id.
- *
- * @param id {@link Installation} id to match.
- * @return matching {@link Installation} instance.
- * @throws ContinuumObjectNotFoundException if the instance could not be
- * looked up.
- * @throws ContinuumStoreException
- */
- public Installation lookupInstallation( long id ) throws ContinuumObjectNotFoundException, ContinuumStoreException;
-
- /**
- * Looks up the underlying store and returns a {@link SystemConfiguration}
- * instance that matches the specified id.
- *
- * @param id {@link SystemConfiguration} id to match.
- * @return matching {@link SystemConfiguration} instance.
- * @throws ContinuumObjectNotFoundException if the instance could not be
- * looked up.
- * @throws ContinuumStoreException
- */
- public SystemConfiguration lookupSystemConfiguration( long id )
- throws ContinuumObjectNotFoundException, ContinuumStoreException;
-
- /**
* Persists the passed in {@link Project} instance to the underlying store.
* <p>
* If the entity instance already exists in the database it is updated, else
@@ -129,75 +59,6 @@
public Project saveProject( Project project ) throws ContinuumStoreException;
/**
- * Persists the passed in {@link ProjectGroup} instance to the underlying
- * store.
- * <p>
- * If the entity instance already exists in the database it is updated, else
- * a new instance is created and an store-generated identifier assigned to
- * it.
- *
- * @param project {@link ProjectGroup} instance to be created/saved.
- * @return updated {@link ProjectGroup} instance.
- * @throws ContinuumStoreException if there was an error saving the entity.
- */
- public ProjectGroup saveProjectGroup( ProjectGroup projectGroup ) throws ContinuumStoreException;
-
- /**
- * Persists the passed in {@link Schedule} instance to the underlying store.
- * <p>
- * If the entity instance already exists in the database it is updated, else
- * a new instance is created and an store-generated identifier assigned to
- * it.
- *
- * @param project {@link Schedule} instance to be created/saved.
- * @return updated {@link Schedule} instance.
- * @throws ContinuumStoreException if there was an error saving the entity.
- */
- public Schedule saveSchedule( Schedule schedule ) throws ContinuumStoreException;
-
- /**
- * Persists the passed in {@link Profile} instance to the underlying store.
- * <p>
- * If the entity instance already exists in the database it is updated, else
- * a new instance is created and an store-generated identifier assigned to
- * it.
- *
- * @param project {@link Profile} instance to be created/saved.
- * @return updated {@link Profile} instance.
- * @throws ContinuumStoreException if there was an error saving the entity.
- */
- public Profile saveProfile( Profile profile ) throws ContinuumStoreException;
-
- /**
- * Persists the passed in {@link Installation} instance to the underlying
- * store.
- * <p>
- * If the entity instance already exists in the database it is updated, else
- * a new instance is created and an store-generated identifier assigned to
- * it.
- *
- * @param project {@link Installation} instance to be created/saved.
- * @return updated {@link Installation} instance.
- * @throws ContinuumStoreException if there was an error saving the entity.
- */
- public Installation saveInstallation( Installation installation ) throws ContinuumStoreException;
-
- /**
- * Persists the passed in {@link SystemConfiguration} instance to the
- * underlying store.
- * <p>
- * If the entity instance already exists in the database it is updated, else
- * a new instance is created and an store-generated identifier assigned to
- * it.
- *
- * @param project {@link SystemConfiguration} instance to be created/saved.
- * @return updated {@link SystemConfiguration} instance.
- * @throws ContinuumStoreException if there was an error saving the entity.
- */
- public SystemConfiguration saveSystemConfiguration( SystemConfiguration systemConfiguration )
- throws ContinuumStoreException;
-
- /**
* Removes the passed {@link Project} instance from the underlying store.
*
* @param project {@link Project} instance to remove.
@@ -205,53 +66,5 @@
* entity.
*/
public void deleteProject( Project project ) throws ContinuumStoreException;
-
- /**
- * Removes the passed {@link ProjectGroup} instance from the underlying
- * store.
- *
- * @param project {@link ProjectGroup} instance to remove.
- * @throws ContinuumStoreException if there was an error removing the
- * entity.
- */
- public void deleteProjectGroup( ProjectGroup project ) throws ContinuumStoreException;
-
- /**
- * Removes the passed {@link Schedule} instance from the underlying store.
- *
- * @param project {@link Schedule} instance to remove.
- * @throws ContinuumStoreException if there was an error removing the
- * entity.
- */
- public void deleteSchedule( Schedule schedule ) throws ContinuumStoreException;
-
- /**
- * Removes the passed {@link Profile} instance from the underlying store.
- *
- * @param project {@link Profile} instance to remove.
- * @throws ContinuumStoreException if there was an error removing the
- * entity.
- */
- public void deleteProfile( Profile profile ) throws ContinuumStoreException;
-
- /**
- * Removes the passed {@link Installation} instance from the underlying
- * store.
- *
- * @param project {@link Installation} instance to remove.
- * @throws ContinuumStoreException if there was an error removing the
- * entity.
- */
- public void deleteInstallation( Installation installation ) throws ContinuumStoreException;
-
- /**
- * Removes the passed {@link SystemConfiguration} instance from the
- * underlying store.
- *
- * @param project {@link SystemConfiguration} instance to remove.
- * @throws ContinuumStoreException if there was an error removing the
- * entity.
- */
- public void deleteSystemConfiguration( SystemConfiguration systemConfiguration ) throws ContinuumStoreException;
}
Modified: maven/continuum/branches/key-based-refactor/continuum-api/src/main/java/org/apache/maven/continuum/store/SystemStore.java
URL: http://svn.apache.org/viewvc/maven/continuum/branches/key-based-refactor/continuum-api/src/main/java/org/apache/maven/continuum/store/SystemStore.java?view=diff&rev=490659&r1=490658&r2=490659
==============================================================================
--- maven/continuum/branches/key-based-refactor/continuum-api/src/main/java/org/apache/maven/continuum/store/SystemStore.java (original)
+++ maven/continuum/branches/key-based-refactor/continuum-api/src/main/java/org/apache/maven/continuum/store/SystemStore.java Wed Dec 27 22:08:29 2006
@@ -24,5 +24,148 @@
*/
public interface SystemStore
{
+ public static final String ROLE = SystemStore.class.getName();
+
+ /**
+ * Removes the passed {@link Installation} instance from the underlying
+ * store.
+ *
+ * @param project {@link Installation} instance to remove.
+ * @throws ContinuumStoreException if there was an error removing the
+ * entity.
+ */
+ public void deleteInstallation( Installation installation ) throws ContinuumStoreException;
+
+ /**
+ * Removes the passed {@link Profile} instance from the underlying store.
+ *
+ * @param project {@link Profile} instance to remove.
+ * @throws ContinuumStoreException if there was an error removing the
+ * entity.
+ */
+ public void deleteProfile( Profile profile ) throws ContinuumStoreException;
+
+ /**
+ * Removes the passed {@link Schedule} instance from the underlying store.
+ *
+ * @param project {@link Schedule} instance to remove.
+ * @throws ContinuumStoreException if there was an error removing the
+ * entity.
+ */
+ public void deleteSchedule( Schedule schedule ) throws ContinuumStoreException;
+
+ /**
+ * Removes the passed {@link SystemConfiguration} instance from the
+ * underlying store.
+ *
+ * @param project {@link SystemConfiguration} instance to remove.
+ * @throws ContinuumStoreException if there was an error removing the
+ * entity.
+ */
+ public void deleteSystemConfiguration( SystemConfiguration systemConfiguration ) throws ContinuumStoreException;
+
+ /**
+ * Looks up the underlying store and returns a {@link Installation} instance
+ * that matches the specified id.
+ *
+ * @param id {@link Installation} id to match.
+ * @return matching {@link Installation} instance.
+ * @throws ContinuumObjectNotFoundException if the instance could not be
+ * looked up.
+ * @throws ContinuumStoreException
+ */
+ public Installation lookupInstallation( long id ) throws ContinuumObjectNotFoundException, ContinuumStoreException;
+
+ /**
+ * Looks up the underlying store and returns a {@link Profile} instance that
+ * matches the specified id.
+ *
+ * @param id {@link Profile} id to match.
+ * @return matching {@link Profile} instance.
+ * @throws ContinuumObjectNotFoundException if the instance could not be
+ * looked up.
+ * @throws ContinuumStoreException
+ */
+ public Profile lookupProfile( long id ) throws ContinuumObjectNotFoundException, ContinuumStoreException;
+
+ /**
+ * Looks up the underlying store and returns a {@link Schedule} instance
+ * that matches the specified id.
+ *
+ * @param id {@link Schedule} id to match.
+ * @return matching {@link Schedule} instance.
+ * @throws ContinuumObjectNotFoundException if the instance could not be
+ * looked up.
+ * @throws ContinuumStoreException
+ */
+ public Schedule lookupSchedule( long id ) throws ContinuumObjectNotFoundException, ContinuumStoreException;
+
+ /**
+ * Looks up the underlying store and returns a {@link SystemConfiguration}
+ * instance that matches the specified id.
+ *
+ * @param id {@link SystemConfiguration} id to match.
+ * @return matching {@link SystemConfiguration} instance.
+ * @throws ContinuumObjectNotFoundException if the instance could not be
+ * looked up.
+ * @throws ContinuumStoreException
+ */
+ public SystemConfiguration lookupSystemConfiguration( long id )
+ throws ContinuumObjectNotFoundException, ContinuumStoreException;
+
+ /**
+ * Persists the passed in {@link Installation} instance to the underlying
+ * store.
+ * <p>
+ * If the entity instance already exists in the database it is updated, else
+ * a new instance is created and an store-generated identifier assigned to
+ * it.
+ *
+ * @param project {@link Installation} instance to be created/saved.
+ * @return updated {@link Installation} instance.
+ * @throws ContinuumStoreException if there was an error saving the entity.
+ */
+ public Installation saveInstallation( Installation installation ) throws ContinuumStoreException;
+
+ /**
+ * Persists the passed in {@link Profile} instance to the underlying store.
+ * <p>
+ * If the entity instance already exists in the database it is updated, else
+ * a new instance is created and an store-generated identifier assigned to
+ * it.
+ *
+ * @param project {@link Profile} instance to be created/saved.
+ * @return updated {@link Profile} instance.
+ * @throws ContinuumStoreException if there was an error saving the entity.
+ */
+ public Profile saveProfile( Profile profile ) throws ContinuumStoreException;
+
+ /**
+ * Persists the passed in {@link Schedule} instance to the underlying store.
+ * <p>
+ * If the entity instance already exists in the database it is updated, else
+ * a new instance is created and an store-generated identifier assigned to
+ * it.
+ *
+ * @param project {@link Schedule} instance to be created/saved.
+ * @return updated {@link Schedule} instance.
+ * @throws ContinuumStoreException if there was an error saving the entity.
+ */
+ public Schedule saveSchedule( Schedule schedule ) throws ContinuumStoreException;
+
+ /**
+ * Persists the passed in {@link SystemConfiguration} instance to the
+ * underlying store.
+ * <p>
+ * If the entity instance already exists in the database it is updated, else
+ * a new instance is created and an store-generated identifier assigned to
+ * it.
+ *
+ * @param project {@link SystemConfiguration} instance to be created/saved.
+ * @return updated {@link SystemConfiguration} instance.
+ * @throws ContinuumStoreException if there was an error saving the entity.
+ */
+ public SystemConfiguration saveSystemConfiguration( SystemConfiguration systemConfiguration )
+ throws ContinuumStoreException;
}