View Javadoc

1   package com.explosion.expf.preferences.Utils;
2   
3   import java.util.Properties;
4   
5   
6   /* =============================================================================
7    *       
8    *     Copyright 2004 Stephen Cowx
9    *
10   *     Licensed under the Apache License, Version 2.0 (the "License");
11   *     you may not use this file except in compliance with the License.
12   *     You may obtain a copy of the License at
13   *
14   *     http://www.apache.org/licenses/LICENSE-2.0
15   *
16   *     Unless required by applicable law or agreed to in writing, software
17   *     distributed under the License is distributed on an "AS IS" BASIS,
18   *     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
19   *     See the License for the specific language governing permissions and
20   *     limitations under the License.
21   * 
22   * =============================================================================
23   */
24  
25  /***
26   * @author Stephen Cowx
27   * Created on 18-Oct-2004
28   * This class helps the application author with version maintenance.
29   * 
30   * The utility is run every time the application starts up and allows preference entries to 
31   * be upgraded.
32   * It can
33   * 1) Delete existing entries
34   * 2) Move existing entries
35   * 3) Add new entries 
36   * 4) Update existing entries
37   * 
38   * It does this by reading the specific items specified in the expf.properties file at application startup.
39   * The file needs to be structured as follows:
40   * 
41   * preference.maintenance.add.itemcount=2
42   * preference.maintenance.add.1.path=
43   * preference.maintenance.add.1.value=
44   * preference.maintenance.add.2.path=
45   * preference.maintenance.add.2.value=
46   * 
47   * preference.maintenance.delete.itemcount=n
48   * preference.maintenance.move.itemcount=n
49   * preference.maintenance.update.itemcount=n
50   * 
51   * Etc
52   */
53  public class PreferenceMaintenanceUtility
54  {
55      /***
56       * 
57       */
58      public PreferenceMaintenanceUtility()
59      {
60          super();
61      }
62      
63      /***
64       * Invoking this method will emsure that the maintenance occurs
65       * @param path
66       * @param properties
67       */
68      public void maintain(String path, Properties properties)
69      {
70          
71      }
72  
73  }