1 9 package org.jboss.portal.portlet.metadata; 10 11 import java.util.ArrayList ; 12 import java.util.HashMap ; 13 import java.util.List ; 14 import java.util.Map ; 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 25 public class PortletMetaData extends ComponentMetaData 26 { 27 28 private String className; 29 private Map descriptions; 30 private Map parameters; 31 private List displayNames; 32 private List securityRoleRefs; 33 34 public PortletMetaData(String applicationName, String name) 35 { 36 super(applicationName, name); 37 this.descriptions = new HashMap (); 38 this.parameters = new HashMap (); 39 this.displayNames = new ArrayList (); 40 this.securityRoleRefs = new ArrayList (); 41 } 42 43 public String getClassName() 44 { 45 return className; 46 } 47 48 public void setClassName(String 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 getDescriptions() 84 { 85 return descriptions; 86 } 87 88 public Map getParameters() 89 { 90 return parameters; 91 } 92 93 public List getDisplayNames() 94 { 95 return displayNames; 96 } 97 98 public List getSecurityRoleRefs() 99 { 100 return securityRoleRefs; 101 } 102 } 103 | Popular Tags |