KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > jboss > portal > portlet > metadata > PortletMetaData


1 /*****************************************
2  * *
3  * JBoss Portal: The OpenSource Portal *
4  * *
5  * Distributable under LGPL license. *
6  * See terms of license at gnu.org. *
7  * *
8  *****************************************/

9 package org.jboss.portal.portlet.metadata;
10
11 import java.util.ArrayList JavaDoc;
12 import java.util.HashMap JavaDoc;
13 import java.util.List JavaDoc;
14 import java.util.Map JavaDoc;
15
16 import org.jboss.portal.portlet.PortletConstants;
17 import org.jboss.portal.server.PortalConstants;
18 import org.jboss.portal.server.metadata.ComponentMetaData;
19 import org.jboss.portal.server.metadata.ContentTypesMetaData;
20
21 /**
22  * @author <a HREF="mailto:julien@jboss.org">Julien Viet</a>
23  * @version $Revision: 1.2 $
24  */

25 public class PortletMetaData extends ComponentMetaData
26 {
27
28    private String JavaDoc className;
29    private Map JavaDoc descriptions;
30    private Map JavaDoc parameters;
31    private List JavaDoc displayNames;
32    private List JavaDoc securityRoleRefs;
33
34    public PortletMetaData(String JavaDoc applicationName, String JavaDoc name)
35    {
36       super(applicationName, name);
37       this.descriptions = new HashMap JavaDoc();
38       this.parameters = new HashMap JavaDoc();
39       this.displayNames = new ArrayList JavaDoc();
40       this.securityRoleRefs = new ArrayList JavaDoc();
41    }
42
43    public String JavaDoc getClassName()
44    {
45       return className;
46    }
47
48    public void setClassName(String JavaDoc className)
49    {
50       this.className = className;
51    }
52
53    public ContentTypesMetaData getContentTypes()
54    {
55       return (ContentTypesMetaData)getPlugin(PortalConstants.PLUGIN_CONTENT_TYPES);
56    }
57
58    public void setContentTypes(ContentTypesMetaData contentTypes)
59    {
60       addPlugin(PortalConstants.PLUGIN_CONTENT_TYPES, contentTypes);
61    }
62
63    public PortletPreferencesMetaData getPreferences()
64    {
65       return (PortletPreferencesMetaData)getPlugin(PortalConstants.PLUGIN_PREFS);
66    }
67
68    public void setPreferences(PortletPreferencesMetaData preferences)
69    {
70       addPlugin(PortalConstants.PLUGIN_PREFS, preferences);
71    }
72
73    public LanguagesMetaData getLanguages()
74    {
75       return (LanguagesMetaData)getPlugin(PortletConstants.PLUGIN_LANG);
76    }
77
78    public void setLanguages(LanguagesMetaData languages)
79    {
80       addPlugin(PortletConstants.PLUGIN_LANG, languages);
81    }
82
83    public Map JavaDoc getDescriptions()
84    {
85       return descriptions;
86    }
87
88    public Map JavaDoc getParameters()
89    {
90       return parameters;
91    }
92
93    public List JavaDoc getDisplayNames()
94    {
95       return displayNames;
96    }
97
98    public List JavaDoc getSecurityRoleRefs()
99    {
100       return securityRoleRefs;
101    }
102 }
103
Popular Tags