Subversion Repositories SmartDukaan

Rev

Go to most recent revision | 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/";
163 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
163 naveen 61
	/**
70 naveen 62
	public static final String CONTENT_DB_PATH =  
163 naveen 63
		"/var/lib/tomcat6/webapps/db/entities/";
70 naveen 64
 
65
	public static final String DEFINITIONS_DB_PATH = 
163 naveen 66
		"/var/lib/tomcat6/webapps/db/definitions/";
70 naveen 67
 
68
	public static final String ENTITIES_DB_PATH = 
163 naveen 69
		"/var/lib/tomcat6/webapps/db/entities/";
70
 
71
	public static final String COMPARISONS_DB_PATH = 
72
		"/var/lib/tomcat6/webapps/db/comparisons/";
70 naveen 73
	*/
163 naveen 74
 
70 naveen 75
	// Validation tool
76
	/** 
77
	public static final String CONTENT_DB_PATH = "./db/entities/";
78
	public static final String DEFINITIONS_DB_PATH = "./db/definitions/";
79
	public static final String ENTITIES_DB_PATH = "./db/entities/";
80
	public static final String CONTENT_SRC_PPT_PATH = "./ppt/";
81
	*/
108 naveen 82
 
83
	public static String VTL_SRC_PATH = "src/velocity/";
70 naveen 84
 
108 naveen 85
	public static String EXPORT_ENTITIES_PATH = 
86
		"/home/naveen/workspace/eclipse/export/html/entities/";
87
 
88
	public static String EXPORT_DEFINITIONS_PATH = 
89
		"/home/naveen/workspace/eclipse/export/html/definitions/";
90
 
91
	public static String EXPORT_CATEGORY_HOMES_PATH = 
92
		"/home/naveen/workspace/eclipse/export/html/category_homes/";
109 naveen 93
 
94
	public static final String EXPORT_DIFF_PATH = 
95
		"/home/naveen/workspace/eclipse/export/html/diff/";
108 naveen 96
 
97
	public static long SNIPPETS_FEATURE_DEFINITIONID = 120081;
98
 
70 naveen 99
	/**
100
	 * Jython source path
101
	 */
102
	public static String JYTHON_SRC_PATH = "src/jython/";
103
 
104
	/**
81 naveen 105
	 * Brand's feature definition, is not referred directly by content models
106
	 */
107
	public static final long BRAND_FEATURE_DEFINITION_ID = 120080;
108
 
109
	/**
110
	 * Brand's facet definition
111
	 */
112
	public static final long BRAND_FACET_DEFINITION_ID = 50001;
113
 
114
	/**
49 naveen 115
	 * Singleton Logger instance
116
	 */
18 naveen 117
	public static Logger logger = Logger.getLogger(Logger.GLOBAL_LOGGER_NAME);
41 naveen 118
 
49 naveen 119
	/**
120
	 * INFO type message
121
	 * 
122
	 * @param obj
123
	 */
41 naveen 124
	public static void info(Object obj) {
75 naveen 125
		System.out.println("INFO: " + obj.toString());
41 naveen 126
	}
127
 
49 naveen 128
	/**
129
	 * SEVERE type message
130
	 * 
131
	 * @param obj
132
	 */
41 naveen 133
	public static void severe(Object obj) {
134
		System.out.println("SEVERE: " + obj.toString());
135
	}
49 naveen 136
 
137
	/**
138
	 * MANDATORY type message
139
	 * 
140
	 * @param obj
141
	 */
41 naveen 142
	public static void warning(Object obj) {
143
		System.out.println("WARNING: " + obj.toString());
144
	}
18 naveen 145
}