1 13 package org.jahia.services.fields; 14 15 import java.util.Hashtable ; 16 17 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; public static final int AUDIO = 8; public static final int VIDEO = 9; 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 52 private Hashtable fieldClassNames; 53 54 57 private ContentFieldTypes () { 58 fieldClassNames = new Hashtable (); 59 fieldClassNames.put (new Integer (UNDEFINED), 60 "org.jahia.services.fields.ContentUndefinedField"); 61 fieldClassNames.put (new Integer (INTEGER), 62 "org.jahia.services.fields.ContentIntegerField"); 63 fieldClassNames.put (new Integer (SMALLTEXT), 64 "org.jahia.services.fields.ContentSmallTextField"); 65 fieldClassNames.put (new Integer (BIGTEXT), 66 "org.jahia.services.fields.ContentBigTextField"); 67 fieldClassNames.put (new Integer (PAGE), "org.jahia.services.fields.ContentPageField"); 68 fieldClassNames.put (new Integer (FILE), "org.jahia.services.fields.ContentFileField"); 69 fieldClassNames.put (new Integer (APPLICATION), 70 "org.jahia.services.fields.ContentApplicationField"); 71 fieldClassNames.put (new Integer (FLOAT), 72 "org.jahia.services.fields.ContentFloatField"); 73 fieldClassNames.put (new Integer (BOOLEAN), 74 "org.jahia.services.fields.ContentBooleanField"); 75 fieldClassNames.put (new Integer (DATE), "org.jahia.services.fields.ContentDateField"); 76 fieldClassNames.put (new Integer (COLOR), 77 "org.jahia.services.fields.ContentColorField"); 78 fieldClassNames.put (new Integer (SMALLTEXT_SHARED_LANG), 79 "org.jahia.services.fields.ContentSmallTextSharedLangField"); 80 } 81 82 85 public static synchronized ContentFieldTypes getInstance () { 86 if (theObject == null) { 87 theObject = new ContentFieldTypes (); 88 } 89 return theObject; 90 } 91 92 95 public Hashtable getFieldClassNames () { 96 return fieldClassNames; 97 } 98 99 } 100 | Popular Tags |