Author: mrisaliti
Date: Sun Jan 23 14:42:22 2011 New Revision: 1062435 URL: http://svn.apache.org/viewvc?rev=1062435&view=rev Log: Remove some java compilation warnings of ContentMapFacade (OFBIZ-4102) Modified: ofbiz/trunk/applications/content/src/org/ofbiz/content/content/ContentMapFacade.java Modified: ofbiz/trunk/applications/content/src/org/ofbiz/content/content/ContentMapFacade.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/content/src/org/ofbiz/content/content/ContentMapFacade.java?rev=1062435&r1=1062434&r2=1062435&view=diff ============================================================================== --- ofbiz/trunk/applications/content/src/org/ofbiz/content/content/ContentMapFacade.java (original) +++ ofbiz/trunk/applications/content/src/org/ofbiz/content/content/ContentMapFacade.java Sun Jan 23 14:42:22 2011 @@ -1,5 +1,5 @@ /* - Licensed to the Apache Software Foundation (ASF) under one +k Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file @@ -35,6 +35,7 @@ import javolution.util.FastSet; import org.ofbiz.base.util.Debug; import org.ofbiz.base.util.GeneralException; +import org.ofbiz.base.util.UtilGenerics; import org.ofbiz.base.util.UtilMisc; import org.ofbiz.content.data.DataResourceWorker; import org.ofbiz.entity.Delegator; @@ -49,7 +50,7 @@ import org.ofbiz.webapp.website.WebSiteW /** * ContentMapFacade */ -public class ContentMapFacade implements Map { +public class ContentMapFacade implements Map<Object, Object> { public static final String module = ContentMapFacade.class.getName(); @@ -70,7 +71,7 @@ public class ContentMapFacade implements protected final Delegator delegator; protected final String contentId; protected final GenericValue value; - protected final Map context; + protected final Map<String, Object> context; protected final Locale locale; protected final String mimeType; protected final boolean cache; @@ -88,7 +89,7 @@ public class ContentMapFacade implements private Content content; private GenericValue fields = null; - public ContentMapFacade(LocalDispatcher dispatcher, GenericValue content, Map context, Locale locale, String mimeTypeId, boolean cache) { + public ContentMapFacade(LocalDispatcher dispatcher, GenericValue content, Map<String, Object> context, Locale locale, String mimeTypeId, boolean cache) { this.dispatcher = dispatcher; this.value = content; this.context = context; @@ -101,7 +102,7 @@ public class ContentMapFacade implements init(); } - private ContentMapFacade(LocalDispatcher dispatcher, Delegator delegator, String contentId, Map context, Locale locale, String mimeTypeId, boolean cache) { + private ContentMapFacade(LocalDispatcher dispatcher, Delegator delegator, String contentId, Map<String, Object> context, Locale locale, String mimeTypeId, boolean cache) { this.dispatcher = dispatcher; this.delegator = delegator; this.contentId = contentId; @@ -164,7 +165,7 @@ public class ContentMapFacade implements return null; } - public void putAll(Map map) { + public void putAll(Map<?, ?> map) { Debug.logWarning("This method [putAll()] is not implemented in ContentMapFacade", module); } @@ -172,17 +173,17 @@ public class ContentMapFacade implements Debug.logWarning("This method [clear()] is not implemented in ContentMapFacade", module); } - public Set<String> keySet() { + public Set<Object> keySet() { // Debug.logWarning("This method [keySet()] is not completely implemented in ContentMapFacade", module); - return mapKeySet; + return UtilGenerics.checkSet(mapKeySet); } - public Collection values() { + public Collection<Object> values() { Debug.logWarning("This method [values()] is not implemented in ContentMapFacade", module); return null; } - public Set entrySet() { + public Set<Map.Entry<Object, Object>> entrySet() { Debug.logWarning("This method [entrySet()] is not implemented in ContentMapFacade", module); return null; } @@ -287,7 +288,7 @@ public class ContentMapFacade implements List<ContentMapFacade> subContent = FastList.newInstance(); List<GenericValue> subs = null; try { - Map expressions = FastMap.newInstance(); + Map<String, Object> expressions = FastMap.newInstance(); expressions.put("contentIdStart", contentId); if(!this.mapKeyFilter.equals("")) { expressions.put("caMapKey", this.mapKeyFilter); @@ -336,7 +337,7 @@ public class ContentMapFacade implements return "=========> " + errorMsg + " <========="; } // TODO: change to use the MapStack instead of a cloned Map - Map renderCtx = FastMap.newInstance(); + Map<String, Object> renderCtx = FastMap.newInstance(); renderCtx.putAll(context); if (this.decoratedContent != null) { renderCtx.put("decoratedContent", decoratedContent); @@ -362,7 +363,7 @@ public class ContentMapFacade implements return this.renderThis(); } - abstract class AbstractInfo implements Map { + abstract class AbstractInfo implements Map<Object, Object> { public int size() { return 1; } @@ -392,7 +393,7 @@ public class ContentMapFacade implements return null; } - public void putAll(Map map) { + public void putAll(Map<?, ?> map) { Debug.logWarning("This method [putAll()] is not implemented in ContentMapFacade.AbstractInfo", module); } @@ -400,17 +401,17 @@ public class ContentMapFacade implements Debug.logWarning("This method [clear()] is not implemented in ContentMapFacade.AbstractInfo", module); } - public Set keySet() { + public Set<Object> keySet() { Debug.logWarning("This method [keySet()] is not implemented in ContentMapFacade.AbstractInfo", module); return null; } - public Collection values() { + public Collection<Object> values() { Debug.logWarning("This method [values()] is not implemented in ContentMapFacade.AbstractInfo", module); return null; } - public Set entrySet() { + public Set<Map.Entry<Object, Object>> entrySet() { Debug.logWarning("This method [entrySet()] is not implemented in ContentMapFacade.AbstractInfo", module); return null; } @@ -462,9 +463,9 @@ public class ContentMapFacade implements } // key is the mapKey - List subs = null; + List<GenericValue> subs = null; try { - Map expressions = FastMap.newInstance(); + Map<String, Object> expressions = FastMap.newInstance(); expressions.put("contentIdStart", contentId); expressions.put("caMapKey", name); if(!this.statusFilter.equals("")) { @@ -512,7 +513,7 @@ public class ContentMapFacade implements return null; } String name = (String) key; - List metaData = null; + List<GenericValue> metaData = null; try { if (cache) { metaData = delegator.findByAndCache("ContentMetaData", UtilMisc.toMap("contentId", contentId, "metaDataPredicateId", name)); |
Free forum by Nabble | Edit this page |