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
199 naveen 25
	 *
70 naveen 26
	public static final String DEFINITIONS_DB_PATH = 
27
		"/home/naveen/workspace/eclipse/db/definitions/";
28
 
29
	/**
30
	 * Path to serialized Entity objects
199 naveen 31
	 *
70 naveen 32
	public static final String ENTITIES_DB_PATH = 
33
		"/home/naveen/workspace/eclipse/db/entities/";
34
 
35
	/**
36
	 * Path to serialized Entity objects
199 naveen 37
	 *
70 naveen 38
	public static final String COMPARISONS_DB_PATH = 
39
		"/home/naveen/workspace/eclipse/db/comparisons/";
299 naveen 40
	*/
70 naveen 41
 
42
	/**
43
	 * Path to where PPT files will be picked
44
	 */
45
	public static final String CONTENT_SRC_PPT_PATH = 
46
		"/home/naveen/workspace/eclipse/content/ppt/";
47
 
48
	/**
49
	 * Path where exported HTML files are kept
50
	 */
51
	public static final String CONTENT_SRC_HTML_PATH = 
52
		"/home/naveen/workspace/eclipse/content/html/";
53
 
54
	/**
55
	 * IR XML export path
56
	 */
57
	public static String EXPORT_IR_PATH = 
58
		"/home/naveen/workspace/eclipse/export/ir/";
59
 
60
	// WEB
61
	public static final String CONTENT_DB_PATH =  
163 naveen 62
		"/var/lib/tomcat6/webapps/db/entities/";
209 naveen 63
 
64
	public static final String MEDIA_DB_PATH =  
65
		"/var/lib/tomcat6/webapps/db/media/";
66
 
70 naveen 67
	public static final String DEFINITIONS_DB_PATH = 
163 naveen 68
		"/var/lib/tomcat6/webapps/db/definitions/";
70 naveen 69
 
70
	public static final String ENTITIES_DB_PATH = 
163 naveen 71
		"/var/lib/tomcat6/webapps/db/entities/";
72
 
73
	public static final String COMPARISONS_DB_PATH = 
74
		"/var/lib/tomcat6/webapps/db/comparisons/";
75
 
70 naveen 76
	// Validation tool
77
	/** 
78
	public static final String CONTENT_DB_PATH = "./db/entities/";
79
	public static final String DEFINITIONS_DB_PATH = "./db/definitions/";
80
	public static final String ENTITIES_DB_PATH = "./db/entities/";
81
	public static final String CONTENT_SRC_PPT_PATH = "./ppt/";
82
	*/
108 naveen 83
 
84
	public static String VTL_SRC_PATH = "src/velocity/";
70 naveen 85
 
108 naveen 86
	public static String EXPORT_ENTITIES_PATH = 
87
		"/home/naveen/workspace/eclipse/export/html/entities/";
88
 
89
	public static String EXPORT_DEFINITIONS_PATH = 
90
		"/home/naveen/workspace/eclipse/export/html/definitions/";
91
 
92
	public static String EXPORT_CATEGORY_HOMES_PATH = 
93
		"/home/naveen/workspace/eclipse/export/html/category_homes/";
109 naveen 94
 
95
	public static final String EXPORT_DIFF_PATH = 
96
		"/home/naveen/workspace/eclipse/export/html/diff/";
108 naveen 97
 
98
	public static long SNIPPETS_FEATURE_DEFINITIONID = 120081;
99
 
70 naveen 100
	/**
101
	 * Jython source path
102
	 */
103
	public static String JYTHON_SRC_PATH = "src/jython/";
104
 
105
	/**
81 naveen 106
	 * Brand's feature definition, is not referred directly by content models
107
	 */
108
	public static final long BRAND_FEATURE_DEFINITION_ID = 120080;
109
 
110
	/**
111
	 * Brand's facet definition
112
	 */
113
	public static final long BRAND_FACET_DEFINITION_ID = 50001;
114
 
115
	/**
49 naveen 116
	 * Singleton Logger instance
117
	 */
18 naveen 118
	public static Logger logger = Logger.getLogger(Logger.GLOBAL_LOGGER_NAME);
41 naveen 119
 
49 naveen 120
	/**
121
	 * INFO type message
122
	 * 
123
	 * @param obj
124
	 */
41 naveen 125
	public static void info(Object obj) {
75 naveen 126
		System.out.println("INFO: " + obj.toString());
41 naveen 127
	}
128
 
49 naveen 129
	/**
130
	 * SEVERE type message
131
	 * 
132
	 * @param obj
133
	 */
41 naveen 134
	public static void severe(Object obj) {
135
		System.out.println("SEVERE: " + obj.toString());
136
	}
49 naveen 137
 
138
	/**
139
	 * MANDATORY type message
140
	 * 
141
	 * @param obj
142
	 */
41 naveen 143
	public static void warning(Object obj) {
144
		System.out.println("WARNING: " + obj.toString());
145
	}
18 naveen 146
}