Subversion Repositories SmartDukaan

Rev

Rev 4518 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 4518 Rev 4520
Line 12... Line 12...
12
 * @author Varun Gupta
12
 * @author Varun Gupta
13
 */
13
 */
14
public class ClearanceSaleController extends BaseController {
14
public class ClearanceSaleController extends BaseController {
15
 
15
 
16
	private List<String> entityIds = new ArrayList<String>();
16
	private List<String> entityIds = new ArrayList<String>();
17
	private Map<String, String> snippets;
17
	private Map<String, String> snippets = new HashMap<String, String>();
18
	
18
	
19
	public String index()	{		
19
	public String index()	{
20
		snippets = new HashMap<String, String>();
-
 
21
		
-
 
22
    	for(String docId: entityIds)	{
-
 
23
    	    String snippet = (String) SnippetCacheWrapper.getSnippet(CacheKeys.CATEGORY_SNIPPET_CACHE_KEY, docId, sourceId);
-
 
24
    	    if (snippet != null)	{
-
 
25
    	        snippets.put(docId, snippet);
-
 
26
    	    }
-
 
27
		}
-
 
28
		
-
 
29
		return "index";
20
		return "index";
30
	}
21
	}
31
	
22
	
32
	public void addEntityId(String entityId)	{
23
	public void addEntityId(String entityId)	{
33
		entityIds.add(entityId);
24
		entityIds.add(entityId);
-
 
25
 
-
 
26
	    String snippet = (String) SnippetCacheWrapper.getSnippet(CacheKeys.CATEGORY_SNIPPET_CACHE_KEY, entityId, sourceId);
-
 
27
	    
-
 
28
	    if (snippet != null)	{
-
 
29
	        snippets.put(entityId, snippet);
-
 
30
	    }
34
	}
31
	}
35
	
32
	
36
	public List<String> getEntityIds()	{
33
	public List<String> getEntityIds()	{
37
		return entityIds;
34
		return entityIds;
38
	}
35
	}
-
 
36
	
-
 
37
	public Map<String, String> getSnippets()	{
-
 
38
		return snippets;
-
 
39
	}
39
}
40
}
40
41