continuum-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ri...@apache.org
Subject svn commit: r490405 - /maven/continuum/branches/key-based-refactor/continuum-api/src/main/java/org/apache/maven/continuum/store/RefactoredContinuumStore.java
Date Tue, 26 Dec 2006 23:57:41 GMT
Author: rinku
Date: Tue Dec 26 15:57:41 2006
New Revision: 490405

URL: http://svn.apache.org/viewvc?view=rev&rev=490405
Log:
o  added operations for Schedule, Profile, Installation and SystemConfiguration.

Modified:
    maven/continuum/branches/key-based-refactor/continuum-api/src/main/java/org/apache/maven/continuum/store/RefactoredContinuumStore.java

Modified: maven/continuum/branches/key-based-refactor/continuum-api/src/main/java/org/apache/maven/continuum/store/RefactoredContinuumStore.java
URL: http://svn.apache.org/viewvc/maven/continuum/branches/key-based-refactor/continuum-api/src/main/java/org/apache/maven/continuum/store/RefactoredContinuumStore.java?view=diff&rev=490405&r1=490404&r2=490405
==============================================================================
--- maven/continuum/branches/key-based-refactor/continuum-api/src/main/java/org/apache/maven/continuum/store/RefactoredContinuumStore.java
(original)
+++ maven/continuum/branches/key-based-refactor/continuum-api/src/main/java/org/apache/maven/continuum/store/RefactoredContinuumStore.java
Tue Dec 26 15:57:41 2006
@@ -21,12 +21,12 @@
 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
  * system's entities.
- * <p>
- * TODO: Add operations for {@link Schedule}, {@link Profile} etc.
  * 
  * @author <a href='mailto:rahul.thakur.xdev@gmail.com'>Rahul Thakur</a>
  * @version $Id$
@@ -34,6 +34,7 @@
  */
 public interface RefactoredContinuumStore
 {
+    String ROLE = RefactoredContinuumStore.class.getName();
 
     /**
      * Looks up the underlying store and returns a {@link Project} instance that
@@ -44,6 +45,7 @@
      * @return {@link Project} instance that matches the specified key.
      * @throws ContinuumObjectNotFoundException if the instance could not be
      *             looked up.
+     * @throws ContinuumStoreException
      */
     public Project lookupProject( GroupProjectKey key )
         throws ContinuumObjectNotFoundException, ContinuumStoreException;
@@ -59,11 +61,61 @@
      * @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( int 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( int 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( int 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( int 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
@@ -91,6 +143,61 @@
     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.
@@ -108,5 +215,43 @@
      *             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;
 
 }



Mime
View raw message