View Javadoc

1   /*
2    * Copyright 2008-2013 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  package de.smartics.maven.issues.cache;
17  
18  import org.eclipse.mylyn.tasks.core.data.TaskData;
19  
20  /**
21   * Interface to handle the persistency of task data information.
22   *
23   * @author <a href="mailto:robert.reiner@smartics.de">Robert Reiner</a>
24   * @version $Revision:591 $
25   */
26  public interface TaskDataStore
27  {
28    // ********************************* Fields *********************************
29  
30    // --- constants ------------------------------------------------------------
31  
32    // ****************************** Initializer *******************************
33  
34    // ****************************** Inner Classes *****************************
35  
36    // ********************************* Methods ********************************
37  
38    // --- get&set --------------------------------------------------------------
39  
40    // --- business -------------------------------------------------------------
41  
42    /**
43     * Persists the task information.
44     *
45     * @param task the task information to persist.
46     * @throws PersistenceException if the task cannot be persisted.
47     */
48    void persist(TaskData task) throws PersistenceException;
49  
50    /**
51     * Retrieves the task information.
52     *
53     * @param id the unique identifier of the task information.
54     * @return the requested task information with the given identifier or
55     *         <code>null</code> if no task data is stored for the given
56     *         identifier.
57     * @throws PersistenceException if the task information cannot be retrieved.
58     */
59    TaskData load(String id) throws PersistenceException;
60  
61    // --- object basics --------------------------------------------------------
62  
63  }