View Javadoc

1   package com.explosion.utilities.preferences.persist;
2   
3   import com.explosion.utilities.preferences.groups.PreferenceGroup;
4   import com.explosion.utilities.preferences.groups.PreferencePersistenceException;
5   
6   
7   
8   
9   /* =============================================================================
10   *       
11   *     Copyright 2004 Stephen Cowx
12   *
13   *     Licensed under the Apache License, Version 2.0 (the "License");
14   *     you may not use this file except in compliance with the License.
15   *     You may obtain a copy of the License at
16   *
17   *     http://www.apache.org/licenses/LICENSE-2.0
18   *
19   *     Unless required by applicable law or agreed to in writing, software
20   *     distributed under the License is distributed on an "AS IS" BASIS,
21   *     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
22   *     See the License for the specific language governing permissions and
23   *     limitations under the License.
24   * 
25   * =============================================================================
26   */
27  
28  /***
29   * @author Stephen Cowx
30   * Created on 14-Mar-2005
31   */
32  public interface PreferenceGroupPersister
33  {
34     /***
35       * Returns a reference to the backing store as understood by the PreferencePersister
36       * @return
37       */
38      public Object getReferenceToStore();
39      
40      /***
41       * Sets the reference to the backing store as understood by the PreferencePersister
42       * Effectively moving it from one store to another or moving it from one location in the same store to another
43       * @return
44       */
45      public void setReferenceToStore(Object referenceToStore);
46      
47      /***
48       * This method deletes the preferenceGroup from the backing store
49       * @param group
50       * @throws PreferencePersistenceException
51       */
52      public void deleteGroup(PreferenceGroup group) throws PreferencePersistenceException;
53      
54      /***
55       * This method saves a preference group in the store
56       * @param group
57       * @throws PreferencePersistenceException
58       */
59      public void saveGroup(PreferenceGroup group) throws PreferencePersistenceException;
60      
61      /***
62       * Renames the group
63       * @param referenceToStore
64       * @throws PreferencePersistenceException
65       */
66      public void renameGroup(PreferenceGroup group, String identifier) throws PreferencePersistenceException;
67  
68  }