View Javadoc

1   /*
2    * Copyright 2008-2010 smartics, Kronseder & Reiner GmbH
3    *
4    * Licensed under the Apache License, Version 2.0 (the "License");
5    * you may not use this file except in compliance with the License.
6    * You may obtain a copy of the License at
7    *
8    *     http://www.apache.org/licenses/LICENSE-2.0
9    *
10   * Unless required by applicable law or agreed to in writing, software
11   * distributed under the License is distributed on an "AS IS" BASIS,
12   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13   * See the License for the specific language governing permissions and
14   * limitations under the License.
15   */
16  
17  package de.smartics.maven.issues.cache;
18  
19  import org.eclipse.mylyn.tasks.core.data.TaskData;
20  
21  /**
22   * Interface to handle the persistency of task data information.
23   *
24   * @author <a href="mailto:robert.reiner@smartics.de">Robert Reiner</a>
25   * @version $Revision:591 $
26   */
27  public interface TaskDataStore
28  {
29    // ********************************* Fields *********************************
30  
31    // --- constants ------------------------------------------------------------
32  
33    // ****************************** Initializer *******************************
34  
35    // ****************************** Inner Classes *****************************
36  
37    // ********************************* Methods ********************************
38  
39    // --- get&set --------------------------------------------------------------
40  
41    // --- business -------------------------------------------------------------
42  
43    /**
44     * Persists the task information.
45     *
46     * @param task the task information to persist.
47     * @throws PersistenceException if the task cannot be persisted.
48     */
49    void persist(TaskData task) throws PersistenceException;
50  
51    /**
52     * Retrieves the task information.
53     *
54     * @param id the unique identifier of the task information.
55     * @return the requested task information with the given identifier or
56     *         <code>null</code> if no task data is stored for the given
57     *         identifier.
58     * @throws PersistenceException if the task information cannot be retrieved.
59     */
60    TaskData load(String id) throws PersistenceException;
61  
62    // --- object basics --------------------------------------------------------
63  
64  }