Subversion Repositories SmartDukaan

Rev

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

Rev 2094 Rev 2275
Line 1... Line 1...
1
package in.shop2020.metamodel.util;
1
package in.shop2020.metamodel.util;
2
 
2
 
3
import in.shop2020.metamodel.core.Entity;
3
import in.shop2020.metamodel.core.Entity;
4
import in.shop2020.metamodel.core.EntityState;
4
import in.shop2020.metamodel.core.EntityState;
5
import in.shop2020.metamodel.core.Feature;
5
import in.shop2020.metamodel.core.Feature;
-
 
6
import in.shop2020.metamodel.core.Helpdoc;
6
import in.shop2020.metamodel.core.Slide;
7
import in.shop2020.metamodel.core.Slide;
7
import in.shop2020.metamodel.definitions.Catalog;
8
import in.shop2020.metamodel.definitions.Catalog;
8
import in.shop2020.metamodel.definitions.Category;
9
import in.shop2020.metamodel.definitions.Category;
9
import in.shop2020.metamodel.definitions.CategorySlideDefinition;
10
import in.shop2020.metamodel.definitions.CategorySlideDefinition;
10
import in.shop2020.metamodel.util.CN;
11
import in.shop2020.metamodel.util.CN;
Line 31... Line 32...
31
	private static final String DEFAULT_ENTITY_SCORES = "DEFAULT_ENTITY_SCORES";
32
	private static final String DEFAULT_ENTITY_SCORES = "DEFAULT_ENTITY_SCORES";
32
	private static final String FACET_VALUES = "FACET_VALUES";
33
	private static final String FACET_VALUES = "FACET_VALUES";
33
	private static final String SLIDE_SCORES = "SLIDE_SCORES";
34
	private static final String SLIDE_SCORES = "SLIDE_SCORES";
34
	private static final String CONTENT_GENERATION_TIME = "CONTENT_GENERATION_TIME";
35
	private static final String CONTENT_GENERATION_TIME = "CONTENT_GENERATION_TIME";
35
	private static final String INCONSISTENT_ENTITIES = "INCONSISTENT_ENTITIES";
36
	private static final String INCONSISTENT_ENTITIES = "INCONSISTENT_ENTITIES";
36
	
-
 
-
 
37
	private static long helpDocId;
37
 
38
 
38
	/**
39
	/**
39
	 * 
40
	 * 
40
	 * @param aThrowable
41
	 * @param aThrowable
41
	 * @return
42
	 * @return
Line 324... Line 325...
324
	 */
325
	 */
325
	public static Collection<Entity> getEntities(long categoryId) throws Exception {
326
	public static Collection<Entity> getEntities(long categoryId) throws Exception {
326
		return StorageManager.getStorageManager().getEntitisByCategory(categoryId);
327
		return StorageManager.getStorageManager().getEntitisByCategory(categoryId);
327
	}
328
	}
328
 
329
 
-
 
330
	
-
 
331
	public static void storeHelpdoc(Helpdoc helpdoc) throws Exception {
-
 
332
		StorageManager.getStorageManager().updateHelpdoc(helpdoc);
-
 
333
	}
-
 
334
	
-
 
335
	public static Helpdoc getHelpdoc(Long helpdocId) throws Exception {
-
 
336
		return StorageManager.getStorageManager().getHelpdoc(helpdocId);
-
 
337
	}
-
 
338
 
-
 
339
	public static Map<Long, Helpdoc> getHelpdocs() throws Exception {
-
 
340
		return StorageManager.getStorageManager().getHelpdocs();
-
 
341
	}
-
 
342
	
-
 
343
	public static long getNewHelpdocId() {
-
 
344
		if(helpDocId == 0){
-
 
345
			helpDocId = 200000;
-
 
346
			Map<Long, Helpdoc> helpdocs = StorageManager.getStorageManager().getHelpdocs();
-
 
347
			if(helpdocs != null){
-
 
348
				for(long id : StorageManager.getStorageManager().getHelpdocs().keySet()){
-
 
349
					if(helpDocId <= id){
-
 
350
						helpDocId = id;
-
 
351
					}
-
 
352
				}
-
 
353
			}	
-
 
354
		}
-
 
355
		return ++helpDocId;
-
 
356
	}
-
 
357
 
-
 
358
	
329
	/**
359
	/**
330
	 * 
360
	 * 
331
	 * @param slide
361
	 * @param slide
332
	 * @param featureDefinitionID
362
	 * @param featureDefinitionID
333
	 * @return Feature
363
	 * @return Feature