Subversion Repositories SmartDukaan

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
18 naveen 1
/**
2
 * 
3
 */
4
package in.shop2020.util;
5
 
6
import java.util.logging.Logger;
7
 
8
/**
49 naveen 9
 * Utility functions and wrappers 
10
 * 
18 naveen 11
 * @author naveen
12
 *
13
 */
14
public class Utils {
70 naveen 15
 
16
	// LOCAL	
49 naveen 17
	/**
70 naveen 18
	 * Path to XML definitions
19
	 */
20
	public static final String DEFINITIONS_SRC_PATH = 
21
		"/home/naveen/workspace/eclipse/webapp/src/xml/model/";
22
 
23
	/**
24
	 * Path to serialized Definition objects
25
	 */
26
	public static final String DEFINITIONS_DB_PATH = 
27
		"/home/naveen/workspace/eclipse/db/definitions/";
28
 
29
	/**
30
	 * Path to serialized Entity objects
31
	 */
32
	public static final String ENTITIES_DB_PATH = 
33
		"/home/naveen/workspace/eclipse/db/entities/";
34
 
35
	/**
36
	 * Path to serialized Entity objects
37
	 */
38
	public static final String COMPARISONS_DB_PATH = 
39
		"/home/naveen/workspace/eclipse/db/comparisons/";
40
 
41
	/**
42
	 * Path to where PPT files will be picked
43
	 */
44
	public static final String CONTENT_SRC_PPT_PATH = 
45
		"/home/naveen/workspace/eclipse/content/ppt/";
46
 
47
	/**
48
	 * Path where exported HTML files are kept
49
	 */
50
	public static final String CONTENT_SRC_HTML_PATH = 
51
		"/home/naveen/workspace/eclipse/content/html/";
52
 
53
	/**
54
	 * IR XML export path
55
	 */
56
	public static String EXPORT_IR_PATH = 
57
		"/home/naveen/workspace/eclipse/export/ir/";
58
 
59
	// WEB
60
	/** 
61
	public static final String CONTENT_DB_PATH =  
62
		"/var/lib/tomcat6/webapps/shop2020/db/entities/";
63
 
64
	public static final String DEFINITIONS_DB_PATH = 
65
		"/var/lib/tomcat6/webapps/shop2020/db/definitions/";
66
 
67
	public static final String ENTITIES_DB_PATH = 
68
		"/var/lib/tomcat6/webapps/shop2020/db/entities/";
69
	*/
70
 
71
	// Validation tool
72
	/** 
73
	public static final String CONTENT_DB_PATH = "./db/entities/";
74
	public static final String DEFINITIONS_DB_PATH = "./db/definitions/";
75
	public static final String ENTITIES_DB_PATH = "./db/entities/";
76
	public static final String CONTENT_SRC_PPT_PATH = "./ppt/";
77
	*/
108 naveen 78
 
79
	public static String VTL_SRC_PATH = "src/velocity/";
70 naveen 80
 
108 naveen 81
	public static String EXPORT_ENTITIES_PATH = 
82
		"/home/naveen/workspace/eclipse/export/html/entities/";
83
 
84
	public static String EXPORT_DEFINITIONS_PATH = 
85
		"/home/naveen/workspace/eclipse/export/html/definitions/";
86
 
87
	public static String EXPORT_CATEGORY_HOMES_PATH = 
88
		"/home/naveen/workspace/eclipse/export/html/category_homes/";
109 naveen 89
 
90
	public static final String EXPORT_DIFF_PATH = 
91
		"/home/naveen/workspace/eclipse/export/html/diff/";
108 naveen 92
 
93
	public static long SNIPPETS_FEATURE_DEFINITIONID = 120081;
94
 
70 naveen 95
	/**
96
	 * Jython source path
97
	 */
98
	public static String JYTHON_SRC_PATH = "src/jython/";
99
 
100
	/**
81 naveen 101
	 * Brand's feature definition, is not referred directly by content models
102
	 */
103
	public static final long BRAND_FEATURE_DEFINITION_ID = 120080;
104
 
105
	/**
106
	 * Brand's facet definition
107
	 */
108
	public static final long BRAND_FACET_DEFINITION_ID = 50001;
109
 
110
	/**
49 naveen 111
	 * Singleton Logger instance
112
	 */
18 naveen 113
	public static Logger logger = Logger.getLogger(Logger.GLOBAL_LOGGER_NAME);
41 naveen 114
 
49 naveen 115
	/**
116
	 * INFO type message
117
	 * 
118
	 * @param obj
119
	 */
41 naveen 120
	public static void info(Object obj) {
75 naveen 121
		System.out.println("INFO: " + obj.toString());
41 naveen 122
	}
123
 
49 naveen 124
	/**
125
	 * SEVERE type message
126
	 * 
127
	 * @param obj
128
	 */
41 naveen 129
	public static void severe(Object obj) {
130
		System.out.println("SEVERE: " + obj.toString());
131
	}
49 naveen 132
 
133
	/**
134
	 * MANDATORY type message
135
	 * 
136
	 * @param obj
137
	 */
41 naveen 138
	public static void warning(Object obj) {
139
		System.out.println("WARNING: " + obj.toString());
140
	}
18 naveen 141
}