01: package de.webman.util.legacy;
02:
03: import com.teamkonzept.lib.*;
04: import org.apache.log4j.Category;
05: import com.teamkonzept.db.TKQuery;
06: import com.teamkonzept.web.TKEventHandler;
07: import com.teamkonzept.webman.mainint.db.queries.*;
08: import de.webman.content.db.queries.*;
09: import com.teamkonzept.field.db.queries.*;
10:
11: /**
12: Klasse, die alle Inkompatibilitaeten zwischen Versionen regelt
13: Bestimmung wird ueber Webman Properties geregelt
14: * @author $Author: alex $
15: * @version $Revision: 1.14 $
16: */
17: public class Legacy {
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: try {
30: // Property abfragen
31: PropertyManager man = PropertyManager
32: .getPropertyManager("LEGACY");
33:
34: String update = man.getValue("UPDATE_1_5", "");
35: emptyString = update.equalsIgnoreCase("TRUE");
36: } catch (Exception e) {
37: // ist ok, es gibt die Gruppe nur nicht
38: LOG
39: .debug("Legacy Property not set - XML is enabled, old empty string support disabled");
40: }
41: }
42:
43: public static Legacy getInstance() {
44: return instance;
45: }
46:
47: public boolean isEmptyStringEnabled() {
48: return emptyString;
49: }
50: }
|