Author: mrisaliti
Date: Sat Jan 29 20:24:22 2011
New Revision: 1065100
URL: http://svn.apache.org/viewvc?rev=1065100&view=rev
Log:
Remove some java compilation warnings of InjectNodeTrailCsvTransform
(OFBIZ-4102)
Modified:
ofbiz/trunk/applications/content/src/org/ofbiz/content/webapp/ftl/InjectNodeTrailCsvTransform.java
Modified:
ofbiz/trunk/applications/content/src/org/ofbiz/content/webapp/ftl/InjectNodeTrailCsvTransform.java
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/applications/content/src/org/ofbiz/content/webapp/ftl/InjectNodeTrailCsvTransform.java?rev=1065100&r1=1065099&r2=1065100&view=diff
==============================================================================
---
ofbiz/trunk/applications/content/src/org/ofbiz/content/webapp/ftl/InjectNodeTrailCsvTransform.java
(original)
+++
ofbiz/trunk/applications/content/src/org/ofbiz/content/webapp/ftl/InjectNodeTrailCsvTransform.java
Sat Jan 29 20:24:22 2011
@@ -26,12 +26,12 @@ import java.util.Map;
import javax.servlet.http.HttpServletRequest;
import org.ofbiz.base.util.Debug;
+import org.ofbiz.base.util.UtilGenerics;
import org.ofbiz.base.util.UtilValidate;
import org.ofbiz.base.util.template.FreeMarkerWorker;
import org.ofbiz.content.content.ContentWorker;
import org.ofbiz.entity.Delegator;
import org.ofbiz.entity.GenericEntityException;
-import org.ofbiz.entity.GenericValue;
import org.ofbiz.webapp.ftl.LoopWriter;
import freemarker.core.Environment;
@@ -62,7 +62,7 @@ public class InjectNodeTrailCsvTransform
* @deprecated use FreeMarkerWorker.getArg()
*/
@Deprecated
- public static String getArg(Map args, String key, Environment env) {
+ public static String getArg(Map<String, ? extends Object> args, String
key, Environment env) {
return FreeMarkerWorker.getArg(args, key, env);
}
@@ -70,19 +70,18 @@ public class InjectNodeTrailCsvTransform
* @deprecated use FreeMarkerWorker.getArg()
*/
@Deprecated
- public static String getArg(Map args, String key, Map ctx) {
+ public static String getArg(Map<String, ? extends Object> args, String
key, Map<String, ? extends Object> ctx) {
return FreeMarkerWorker.getArg(args, key, ctx);
}
-
public Writer getWriter(final Writer out, Map args) {
final StringBuilder buf = new StringBuilder();
final Environment env = Environment.getCurrentEnvironment();
- final Map templateCtx = FreeMarkerWorker.getWrappedObject("context",
env);
+ final Map<String, Object> templateCtx =
FreeMarkerWorker.getWrappedObject("context", env);
//FreeMarkerWorker.convertContext(templateCtx);
final Delegator delegator =
FreeMarkerWorker.getWrappedObject("delegator", env);
final HttpServletRequest request =
FreeMarkerWorker.getWrappedObject("request", env);
- final GenericValue userLogin =
FreeMarkerWorker.getWrappedObject("userLogin", env);
+ //final GenericValue userLogin =
FreeMarkerWorker.getWrappedObject("userLogin", env);
FreeMarkerWorker.getSiteParameters(request, templateCtx);
FreeMarkerWorker.overrideWithArgs(templateCtx, args);
@@ -104,7 +103,7 @@ public class InjectNodeTrailCsvTransform
public int onStart() throws TemplateModelException, IOException {
String csvTrail = null;
- List trail = (List)templateCtx.get("globalNodeTrail");
+ List<Map<String, ? extends Object>> trail =
UtilGenerics.checkList(templateCtx.get("globalNodeTrail"));
if (Debug.infoOn()) Debug.logInfo("in InjectNodeTrailCsv(0),
trail:"+trail,module);
// This will build a nodeTrail if none exists
@@ -113,7 +112,7 @@ public class InjectNodeTrailCsvTransform
String redo = (String)templateCtx.get("redo");
if (UtilValidate.isEmpty(trail) || (redo != null &&
redo.equalsIgnoreCase("true"))) {
- String thisContentId = null;
+ // String thisContentId = null;
String subContentId =
(String)templateCtx.get("subContentId");
if (Debug.infoOn()) Debug.logInfo("in
InjectNodeTrailCsv(0), subContentId:"+subContentId,module);
String contentId = (String)templateCtx.get("contentId");
@@ -152,7 +151,7 @@ public class InjectNodeTrailCsvTransform
if (UtilValidate.isNotEmpty(lastPassedContentId)) {
if (UtilValidate.isNotEmpty(trail)) {
- Map nd = (Map)trail.get(0);
+ Map<String, ? extends Object> nd =
trail.get(0);
String firstTrailContentId =
(String)nd.get("contentId");
if
(UtilValidate.isNotEmpty(firstTrailContentId)
&&
UtilValidate.isNotEmpty(lastPassedContentId)
@@ -172,7 +171,6 @@ public class InjectNodeTrailCsvTransform
return TransformControl.EVALUATE_BODY;
}
-
@Override
public void close() throws IOException {
templateCtx.put("nodeTrailCsv", passedCsv);