Author: ssolsagl
Date: 2007-04-30 14:53:09 +0200 (Mon, 30 Apr 2007)
New Revision: 4927
Modified:
trunk/core-api/src/main/java/no/schibstedsok/searchportal/view/velocity/URLVelocityTemplateLoader.java
Log:
added javadoc
Modified:
trunk/core-api/src/main/java/no/schibstedsok/searchportal/view/velocity/URLVelocityTemplateLoader.java
===================================================================
---
trunk/core-api/src/main/java/no/schibstedsok/searchportal/view/velocity/URLVelocityTemplateLoader.java
2007-04-30 12:40:15 UTC (rev 4926)
+++
trunk/core-api/src/main/java/no/schibstedsok/searchportal/view/velocity/URLVelocityTemplateLoader.java
2007-04-30 12:53:09 UTC (rev 4927)
@@ -51,14 +51,17 @@
@Override
public InputStream getResourceStream(String url)
throws ResourceNotFoundException {
-
+ // Enable/disable velocity debug
boolean VELOCITY_DEBUG =
"true".equals(System.getProperty("VELOCITY_DEBUG"));
+ // Activate debug (Show borders/debuginfo)
boolean VELOCITY_DEBUG_ON
="true".equals(System.getProperty("VELOCITY_DEBUG_ON"));
+ // Onmouseover style
boolean STYLE_ONMOUSEOVER
="onmouseover".equals(System.getProperty("VELOCITY_DEBUG_STYLE"));
+ // Silent style
boolean STYLE_SILENT
="silent".equals(System.getProperty("VELOCITY_DEBUG_STYLE"));
-
+ // Indicates if we found file local.(Can be edited)
boolean foundLocal = false;
-
+
if(!VELOCITY_DEBUG) {
return super.getResourceStream(url);
}
@@ -67,7 +70,6 @@
InputStream stream = null;
String filePath = url.replaceAll("http://(.*?)/",
"/").replace("localhost/", "");
-
File file = getFile(templatesDir, filePath);
if(file.exists()) {
@@ -76,7 +78,7 @@
}else{
stream = super.getResourceStream(url);
}
-
+ // If debug is not currently activated.
if(!VELOCITY_DEBUG_ON) {
return stream;
}
_______________________________________________
Kernel-commits mailing list
[email protected]
http://sesat.no/mailman/listinfo/kernel-commits