KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > jahia > services > fields > ContentFieldTypes


1 //
2
// ____.
3
// __/\ ______| |__/\. _______
4
// __ .____| | \ | +----+ \
5
// _______| /--| | | - \ _ | : - \_________
6
// \\______: :---| : : | : | \________>
7
// |__\---\_____________:______: :____|____:_____\
8
// /_____|
9
//
10
// . . . i n j a h i a w e t r u s t . . .
11
//
12

13 package org.jahia.services.fields;
14
15 import java.util.Hashtable JavaDoc;
16
17 /**
18  * <p>Title: Jahia</p>
19  * <p>Description: CMS Enterprise Portal</p>
20  * <p>Copyright: Copyright (c) 2002</p>
21  * <p>Company: Jahia SA</p>
22  *
23  * @author Dada's
24  * @author Khue
25  * @author MAP
26  * @version 1.0
27  * @see org.jahia.data.fieldTypes
28  */

29 public class ContentFieldTypes {
30
31     public static final int UNDEFINED = 0;
32     public static final int INTEGER = 1;
33     public static final int SMALLTEXT = 2;
34     public static final int BIGTEXT = 3;
35     public static final int DATE = 4;
36     public static final int PAGE = 5;
37     public static final int FILE = 6;
38     public static final int IMAGE = 7; // not yet implemented
39
public static final int AUDIO = 8; // not yet implemented
40
public static final int VIDEO = 9; // not yet implemented
41
public static final int APPLICATION = 10;
42     public static final int FLOAT = 11;
43     public static final int BOOLEAN = 12;
44     public static final int COLOR = 13;
45     public static final int SMALLTEXT_SHARED_LANG = 20;
46
47     private static ContentFieldTypes theObject;
48
49     /**
50      * @associates String
51      */

52     private Hashtable JavaDoc fieldClassNames;
53
54     /**
55      *
56      */

57     private ContentFieldTypes () {
58         fieldClassNames = new Hashtable JavaDoc ();
59         fieldClassNames.put (new Integer JavaDoc (UNDEFINED),
60                 "org.jahia.services.fields.ContentUndefinedField");
61         fieldClassNames.put (new Integer JavaDoc (INTEGER),
62                 "org.jahia.services.fields.ContentIntegerField");
63         fieldClassNames.put (new Integer JavaDoc (SMALLTEXT),
64                 "org.jahia.services.fields.ContentSmallTextField");
65         fieldClassNames.put (new Integer JavaDoc (BIGTEXT),
66                 "org.jahia.services.fields.ContentBigTextField");
67         fieldClassNames.put (new Integer JavaDoc (PAGE), "org.jahia.services.fields.ContentPageField");
68         fieldClassNames.put (new Integer JavaDoc (FILE), "org.jahia.services.fields.ContentFileField");
69         fieldClassNames.put (new Integer JavaDoc (APPLICATION),
70                 "org.jahia.services.fields.ContentApplicationField");
71         fieldClassNames.put (new Integer JavaDoc (FLOAT),
72                 "org.jahia.services.fields.ContentFloatField");
73         fieldClassNames.put (new Integer JavaDoc (BOOLEAN),
74                 "org.jahia.services.fields.ContentBooleanField");
75         fieldClassNames.put (new Integer JavaDoc (DATE), "org.jahia.services.fields.ContentDateField");
76         fieldClassNames.put (new Integer JavaDoc (COLOR),
77                 "org.jahia.services.fields.ContentColorField");
78         fieldClassNames.put (new Integer JavaDoc (SMALLTEXT_SHARED_LANG),
79                 "org.jahia.services.fields.ContentSmallTextSharedLangField");
80     }
81
82     /**
83      * @return a single instance of the object
84      */

85     public static synchronized ContentFieldTypes getInstance () {
86         if (theObject == null) {
87             theObject = new ContentFieldTypes ();
88         }
89         return theObject;
90     }
91
92     /**
93      * @return the field class names initialized by the constructor.
94      */

95     public Hashtable JavaDoc getFieldClassNames () {
96         return fieldClassNames;
97     }
98
99 }
100
Popular Tags