Subversion Repositories SmartDukaan

Rev

Rev 3599 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 3599 Rev 4273
Line 21... Line 21...
21
    	this.id = id;
21
    	this.id = id;
22
    }
22
    }
23
	
23
	
24
    public String getSnippets(){
24
    public String getSnippets(){
25
    	String itemIds = "";
25
    	String itemIds = "";
26
	    itemIds = ContentServingService.getSnippet(SnippetType.MOST_COMPARED_SNIPPET, id, sourceId);
26
    	itemIds = ContentServingService.getSnippet(SnippetType.MOST_COMPARED_SNIPPET, id, sourceId);
-
 
27
	    
27
	    if(!itemIds.equals("")){
28
	    if(!itemIds.equals(""))	{
28
	    	String[] items = itemIds.split("\\s|\\n|\\t");
29
	    	String[] items = itemIds.split("\\s|\\n|\\t");
-
 
30
	    	int count = 0;
29
	    	for(String item: items){
31
	    	for(String item: items)	{
-
 
32
	    		if (! item.equals(this.id) && count < 10)	{
30
	    		snippets = snippets + ContentServingService.getSnippet(SnippetType.WIDGET_SNIPPET, item, sourceId);
33
	    			snippets = snippets + ContentServingService.getSnippet(SnippetType.WIDGET_SNIPPET, item, sourceId);
-
 
34
	    			count ++;
-
 
35
	    		}
31
	    	}
36
	    	}
32
	    }	    
37
	    }	    
33
	    return snippets;
38
	    return snippets;
34
    }
39
    }
35
}
40
}
36
41