Subversion Repositories SmartDukaan

Rev

Rev 22124 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 22124 Rev 27285
Line 1... Line 1...
1
package com.spice.profitmandi.common.enumuration;
1
package com.spice.profitmandi.common.enumuration;
2
 
2
 
3
public enum ContentType{
3
public enum ContentType {
4
	PDF(0),
-
 
5
	JPEG(1),
4
	PDF(0), JPEG(1), PNG(2), DOC(3), DOCX(4), XLS(5), XLSX(6);
6
	PNG(2);
-
 
7
 
5
 
8
	private final int value;
6
	private final int value;
9
 
7
 
10
	private ContentType(int value) {
8
	private ContentType(int value) {
11
		this.value = value;
9
		this.value = value;
Line 13... Line 11...
13
 
11
 
14
	public int getValue() {
12
	public int getValue() {
15
		return value;
13
		return value;
16
	}
14
	}
17
 
15
 
18
	public static ContentType findByValue(int value) { 
16
	public static ContentType findByValue(int value) {
19
		switch (value) {
17
		switch (value) {
20
		case 0:
18
		case 0:
21
			return PDF;
19
			return PDF;
22
		case 1:
20
		case 1:
23
			return JPEG;
21
			return JPEG;
24
		case 2:
22
		case 2:
25
			return PNG;
23
			return PNG;
-
 
24
		case 3:
-
 
25
			return DOC;
-
 
26
		case 4:
-
 
27
			return DOCX;
-
 
28
		case 5:
-
 
29
			return XLS;
-
 
30
		case 6:
-
 
31
			return XLSX;
26
		default:
32
		default:
27
			return null;
33
			return null;
28
		}
34
		}
29
	}
35
	}
30
}
36
}
31
37