mcardle 2005/08/19 09:52:40 CEST
Modified files:
core/src/java/org/jahia/settings SettingsBean.java
Log:
update for ESI support
Revision Changes Path
1.17 +106 -2 jahia/core/src/java/org/jahia/settings/SettingsBean.java
http://jahia.mine.nu:8080/cgi-bin/cvsweb.cgi/jahia/core/src/java/org/jahia/settings/SettingsBean.java.diff?r1=1.16&r2=1.17&f=h
Index: SettingsBean.java
===================================================================
RCS file:
/home/cvs/repository/jahia/core/src/java/org/jahia/settings/SettingsBean.java,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -r1.16 -r1.17
--- SettingsBean.java 8 Jul 2005 16:12:39 -0000 1.16
+++ SettingsBean.java 19 Aug 2005 07:52:39 -0000 1.17
@@ -1,4 +1,4 @@
-// $Id: SettingsBean.java,v 1.16 2005/07/08 16:12:39 shuber Exp $
+// $Id: SettingsBean.java,v 1.17 2005/08/19 07:52:39 mcardle Exp $
//
// ____.
// __/\ ______| |__/\. _______
@@ -138,6 +138,28 @@
// Output cache activation / deactivation
final public static String OUTPUT_CACHE_ACTIVATED =
"outputCacheActivated";
+ // ESI cache activation / deactivation
+ final public static String ESI_CACHE_ACTIVATED = "esiCacheActivated";
+
+ // ESI server public access port
+ private String esiServerPort = "esiServerPort";
+
+ // ESI server SOAP invalidation port
+ private String esiInvalidationPort = "esiInvalidationPort";
+
+ // ESI server IP
+ private String esiServerIP = "esiServerIP";
+
+ // ESI server invalidation login name
+ private String esiCacheServerLogin = "esiCacheServerLogin";
+
+ // ESI server invalidation login password
+ private String esiCacheServerPassword = "esiCacheServerPassword";
+
+ // ESI Display an HTML fieldset box around fragment tags (useful for
debugging purposes only)
+ private String esiDisplayFragmentDelimiters =
"esiDisplayFragmentDelimiters";
+
+
// Output cache expiration delay in milliseconds
private long outputCacheDefaultExpirationDelay;
@@ -370,11 +392,43 @@
// output cache activation / deactivation
settings.put(OUTPUT_CACHE_ACTIVATED,
- new Boolean (getBoolean(OUTPUT_CACHE_ACTIVATED, true)));
+ new Boolean (getBoolean(OUTPUT_CACHE_ACTIVATED, false)));
// output cache default expiration delay
outputCacheDefaultExpirationDelay = getLong
("outputCacheDefaultExpirationDelay", -1);
+ // output cache activation / deactivation
+ settings.put(ESI_CACHE_ACTIVATED,
+ new Boolean (getBoolean(ESI_CACHE_ACTIVATED, false)));
+
+ //Sanity check: cannot have jahia cache and ESI cache both
activated
+ if ((lookupBoolean(ESI_CACHE_ACTIVATED)) ==
lookupBoolean(OUTPUT_CACHE_ACTIVATED)) {
+ logger.error("Cannot have Jahia HTMLCache and ESI cache both
activated at the same time. " +
+ "Check the outputCacheActivated and
esiCacheActivated entries in your jahia.properties file."+
+ "Fallback behaviour : Activating HTMLCache.");
+ settings.put(OUTPUT_CACHE_ACTIVATED, new Boolean (true));
+ }
+
+ if (lookupBoolean(ESI_CACHE_ACTIVATED)) {
+ // ESI server public access port
+ esiServerPort = getString( "esiServerPort");
+
+ // ESI server SOAP invalidation port
+ esiInvalidationPort = getString("esiInvalidationPort");
+
+ // ESI server IP
+ esiServerIP = getString("esiServerIP");
+
+ // ESI server invalidation login name
+ esiCacheServerLogin = getString("esiCacheServerLogin");
+
+ // ESI server invalidation login password
+ esiCacheServerPassword = getString("esiCacheServerPassword");
+
+ // ESI Display an HTML fieldset box around fragment tags
(useful for debugging purposes only)
+ esiDisplayFragmentDelimiters =getString
("esiDisplayFragmentDelimiters");
+ }
+
// activation / deactivation of site ID in URL
siteIDInURL = getBoolean ("siteIDInURL", false);
@@ -1096,6 +1150,56 @@
return jahiaTemplatesAutoDeploy;
}
+ /**
+ * Used to get ESI server public access port
+ *
+ */
+ public String getEsiServerPort() {
+ return esiServerPort;
+ }
+
+ /**
+ * Used to get ESI server SOAP invalidation port
+ *
+ */
+ public String getEsiInvalidationPort() {
+ return esiInvalidationPort;
+ }
+
+ /**
+ * Used to get ESI server IP
+ *
+ */
+ public String getEsiServerIP () {
+ return esiServerIP;
+ }
+
+ /**
+ * Used to get ESI server invalidation login name
+ *
+ */
+ public String getEsiCacheServerLogin () {
+ return esiCacheServerLogin;
+ }
+
+ /**
+ * Used to get ESI server invalidation login password
+ *
+ */
+ public String getEsiCacheServerPassword () {
+ return esiCacheServerPassword;
+ }
+
+ /**
+ * Used to get ESI Display an HTML fieldset box around fragment tags
(useful for debugging purposes only
+ *
+ */
+ public String getEsiDisplayFragmentDelimiters () {
+ return esiDisplayFragmentDelimiters;
+ }
+
+
+
/*
public ServletConfig getConfig() {
return config;