Ok, here's what we have.
Two of replaced strings ("00default_template00" and "template_service")
are used only in TemplateInfo.java.
The other two are also used elsewhere (inside FreeMarkerSite stuff :
FreeMarkerSitePage.java, FreeMarkerSiteLayout.java, NavigationModel.java
and BaseFreeMarkerNavigation.java) for parameter passing purposes, and
their values are identical to those in TemplateInfo.java only by pure
coincidence. AFAIK they are used for the same purpose (conceptually) that
TemplateInfo has been invented for, however it seem that these sources
are little outdated. Maybe someone really involved in FreeMarker
development should think of clean-up or reimplementaion of
FreeMarkerSite ? Sorry, I won't touch it :)
Here's updated patch (yes, it was tab/space issue, resolved by
converting tabs -> spaces).
Looking into FreeMaker*.java I decided, that however these constant are
not used elsewhere, we can safely make them public - maybe someone will
need them :)
Scooter.
P.S. Sorry for the response time, I had a really long and important
meeting :)
----------- !!! CUT HERE
diff -u -w -r1.1.1.1 TemplateInfo.java
--- TemplateInfo.java 2000/07/19 02:57:04 1.1.1.1
+++ TemplateInfo.java 2000/07/20 22:28:30
@@ -72,6 +72,11 @@
*/
public class TemplateInfo
{
+ /* tempStorage hashtable constants */
+ private static final String NAVIGATION_TEMPLATE = "00navigation_template00";
+ private static final String LAYOUT_TEMPLATE = "00layout_template00";
+ private static final String DEFAULT_TEMPLATE = "00default_template00";
+ private static final String SERVICE_NAME = "template_service";
/* Handle to the RunData object */
private RunData data = null;
/* Place to store information about templates */
@@ -93,7 +98,7 @@
*/
public String getNavigationTemplate()
{
- String temp = getString("00navigation_template00");
+ String temp = getString(TemplateInfo.NAVIGATION_TEMPLATE);
if ( temp != null )
{
temp = temp.replace(',', '/');
@@ -107,7 +112,7 @@
*/
public void setNavigationTemplate(String v)
{
- setTemp("00navigation_template00",v);
+ setTemp(TemplateInfo.NAVIGATION_TEMPLATE,v);
}
/**
@@ -143,7 +148,7 @@
*/
public String getLayoutTemplate()
{
- String value = getString("00layout_template00");
+ String value = getString(TemplateInfo.LAYOUT_TEMPLATE);
if ( value == null )
value = getDefaultTemplate();
return value;
@@ -155,7 +160,7 @@
*/
public void setLayoutTemplate(String v)
{
- setTemp("00layout_template00",v);
+ setTemp(TemplateInfo.LAYOUT_TEMPLATE,v);
}
/**
@@ -183,7 +188,7 @@
*/
public String getService()
{
- return getString("template_service");
+ return getString(TemplateInfo.SERVICE_NAME);
}
/**
@@ -192,7 +197,7 @@
*/
public void setService(String v)
{
- setTemp("template_service",v);
+ setTemp(TemplateInfo.SERVICE_NAME,v);
}
/**
@@ -201,7 +206,7 @@
*/
public String getDefaultTemplate()
{
- return getString("00default_template00");
+ return getString(TemplateInfo.DEFAULT_TEMPLATE);
}
/**
@@ -210,7 +215,7 @@
*/
public void setDefaultTemplate(String v)
{
- setTemp("00default_template00",v);
+ setTemp(TemplateInfo.DEFAULT_TEMPLATE,v);
}
/**
@@ -275,11 +280,3 @@
return value;
}
}
-
-
-
-
-
-
-
-
----------- !!! CUT HERE
------------------------------------------------------------
To subscribe: [EMAIL PROTECTED]
To unsubscribe: [EMAIL PROTECTED]
Search: <http://www.mail-archive.com/turbine%40list.working-dogs.com/>
Problems?: [EMAIL PROTECTED]