KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > de > webman > util > legacy > Legacy


1 package de.webman.util.legacy;
2
3 import com.teamkonzept.lib.*;
4 import org.apache.log4j.Category;
5 import com.teamkonzept.db.TKQuery;
6 import com.teamkonzept.web.TKEventHandler;
7 import com.teamkonzept.webman.mainint.db.queries.*;
8 import de.webman.content.db.queries.*;
9 import com.teamkonzept.field.db.queries.*;
10 /**
11     Klasse, die alle Inkompatibilitaeten zwischen Versionen regelt
12     Bestimmung wird ueber Webman Properties geregelt
13  * @author $Author: alex $
14  * @version $Revision: 1.14 $
15 */

16 public class Legacy
17 {
18
19     /** default ist "leerer string = 1" space ausgeschaltet */
20     private boolean emptyString = false;
21
22     /** Logging Category */
23     private static Category LOG = Category.getInstance(Legacy.class);
24
25     /** Singleton Instanz */
26     private static Legacy instance = new Legacy();
27
28     private Legacy()
29     {
30         try
31         {
32             // Property abfragen
33
PropertyManager man = PropertyManager.getPropertyManager("LEGACY");
34
35             String JavaDoc update = man.getValue("UPDATE_1_5", "");
36             emptyString = update.equalsIgnoreCase("TRUE");
37         }
38         catch (Exception JavaDoc e)
39         {
40             // ist ok, es gibt die Gruppe nur nicht
41
LOG.debug("Legacy Property not set - XML is enabled, old empty string support disabled");
42         }
43     }
44
45     public static Legacy getInstance()
46     {
47         return instance;
48     }
49
50
51     public boolean isEmptyStringEnabled()
52     {
53         return emptyString;
54     }
55 }
56
Popular Tags