KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > infoglue > cms > entities > management > ContentTypeAttribute


1 /* ===============================================================================
2  *
3  * Part of the InfoGlue Content Management Platform (www.infoglue.org)
4  *
5  * ===============================================================================
6  *
7  * Copyright (C)
8  *
9  * This program is free software; you can redistribute it and/or modify it under
10  * the terms of the GNU General Public License version 2, as published by the
11  * Free Software Foundation. See the file LICENSE.html for more information.
12  *
13  * This program is distributed in the hope that it will be useful, but WITHOUT
14  * ANY WARRANTY, including the implied warranty of MERCHANTABILITY or FITNESS
15  * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
16  *
17  * You should have received a copy of the GNU General Public License along with
18  * this program; if not, write to the Free Software Foundation, Inc. / 59 Temple
19  * Place, Suite 330 / Boston, MA 02111-1307 / USA.
20  *
21  * ===============================================================================
22  */

23
24 package org.infoglue.cms.entities.management;
25
26 import java.util.ArrayList JavaDoc;
27 import java.util.Iterator JavaDoc;
28 import java.util.LinkedHashMap JavaDoc;
29 import java.util.List JavaDoc;
30 import java.util.Map JavaDoc;
31
32 /**
33  * This is a pure javabean carrying the information about one content type attribute.
34  */

35
36 public class ContentTypeAttribute
37 {
38     /*
39     public static final String TEXTFIELD = "textfield";
40     public static final String TEXTAREA = "textarea";
41     public static final String TEXTFIELD = "textfield";
42     public static final String TEXTFIELD = "textfield";
43     public static final String TEXTFIELD = "textfield";
44     public static final String TEXTFIELD = "textfield";
45     public static final String TEXTFIELD = "textfield";
46     public static final String TEXTFIELD = "textfield";
47     public static final String TEXTFIELD = "textfield";
48     public static final String TEXTFIELD = "textfield";
49     */

50     
51     private int position = 0;
52     private String JavaDoc name = "";
53     private String JavaDoc inputType = "";
54     private Map JavaDoc contentTypeAttributeParameters = new LinkedHashMap JavaDoc();
55     private List JavaDoc validators = new ArrayList JavaDoc();
56     
57     public ContentTypeAttribute()
58     {
59     }
60
61     public int getPosition()
62     {
63         return this.position;
64     }
65
66     public void setPosition(int position)
67     {
68         this.position = position;
69     }
70     
71     public String JavaDoc getName()
72     {
73         return this.name;
74     }
75
76     public void setName(String JavaDoc name)
77     {
78         this.name = name;
79     }
80
81     public String JavaDoc getInputType()
82     {
83         return this.inputType;
84     }
85     
86     public void setInputType(String JavaDoc inputType)
87     {
88         this.inputType = inputType;
89     }
90
91     public void putContentTypeAttributeParameter(String JavaDoc key, ContentTypeAttributeParameter contentTypeAttributeParameter)
92     {
93         this.contentTypeAttributeParameters.put(key, contentTypeAttributeParameter);
94     }
95     
96     public ContentTypeAttributeParameter getContentTypeAttribute(String JavaDoc key)
97     {
98         return (ContentTypeAttributeParameter)contentTypeAttributeParameters.get(key);
99     }
100
101     public List JavaDoc getContentTypeAttributeParameters()
102     {
103         List JavaDoc extraParameters = new ArrayList JavaDoc();
104         for (Iterator JavaDoc i = contentTypeAttributeParameters.entrySet().iterator(); i.hasNext();)
105         {
106             Map.Entry JavaDoc e = (Map.Entry JavaDoc) i.next();
107             extraParameters.add(e);
108         }
109                 
110         return extraParameters;
111     }
112
113     public List JavaDoc getValidators()
114     {
115         return validators;
116     }
117 }
Popular Tags