Subversion Repositories SmartDukaan

Rev

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

Rev 5117 Rev 5155
Line 18... Line 18...
18
	private DefinitionsContainer defContainer = Catalog.getInstance().getDefinitionsContainer();
18
	private DefinitionsContainer defContainer = Catalog.getInstance().getDefinitionsContainer();
19
	List<Entity> entities;
19
	List<Entity> entities;
20
	private Map<Long, Long> categorySlides = new HashMap<Long, Long>();
20
	private Map<Long, Long> categorySlides = new HashMap<Long, Long>();
21
	private Map<Long, String> categoryLabels = new HashMap<Long, String>();
21
	private Map<Long, String> categoryLabels = new HashMap<Long, String>();
22
	
22
	
23
	public CompatibleAccessoriesIndexGenerator() throws Exception	{
23
	public CompatibleAccessoriesIndexGenerator(List<Entity> entities) throws Exception	{
24
		
24
		
25
		categorySlides.put((long) 10014, (long) 130067);
25
		categorySlides.put((long) 10014, (long) 130067);
26
		categorySlides.put((long) 10018, (long) 130073);
26
		categorySlides.put((long) 10018, (long) 130073);
27
		
27
		
28
		categoryLabels.put((long) 10014, "Battery");
28
		categoryLabels.put((long) 10014, "Battery");
29
		categoryLabels.put((long) 10018, "Carrying Case");
29
		categoryLabels.put((long) 10018, "Carrying Case");
30
		
30
		
31
		entities = new ArrayList<Entity>(CreationUtils.getEntities().values());
31
		this.entities = entities;
32
	}
32
	}
33
	
33
	
34
	public void generate()	{
34
	public void generate()	{
35
		StringBuilder sb = new StringBuilder();
35
		StringBuilder sb = new StringBuilder();
36
		
36
		
Line 114... Line 114...
114
		return names;
114
		return names;
115
	}
115
	}
116
	
116
	
117
	public static void main(String[] args) {
117
	public static void main(String[] args) {
118
		try {
118
		try {
-
 
119
			List<Entity> entities = new ArrayList<Entity>(CreationUtils.getEntities().values());
119
			CompatibleAccessoriesIndexGenerator generator = new CompatibleAccessoriesIndexGenerator();
120
			CompatibleAccessoriesIndexGenerator generator = new CompatibleAccessoriesIndexGenerator(entities);
120
			generator.generate();
121
			generator.generate();
121
		} catch (Exception e) {
122
		} catch (Exception e) {
122
			e.printStackTrace();
123
			e.printStackTrace();
123
		}
124
		}
124
	}
125
	}