1 9 package org.jboss.portal.server.metadata; 10 11 import java.util.Collection ; 12 import java.util.HashMap ; 13 import java.util.Map ; 14 15 import javax.servlet.ServletContext ; 16 17 import org.jboss.portal.server.ServerObjectID; 18 19 23 public class ApplicationMetaData extends ServerObjectMetaData 24 { 25 26 private ServletContext servletContext; 27 private String contextPath; 28 private ClassLoader classLoader; 29 private Map components; 30 31 public ApplicationMetaData(String name, 32 ServletContext servletContext, 33 String contextPath, 34 ClassLoader applicationClassLoader) 35 { 36 super(ServerObjectID.createApplicationID(name), name); 37 this.components = new HashMap (); 38 this.servletContext = servletContext; 39 this.contextPath = contextPath; 40 this.classLoader = applicationClassLoader; 41 this.depends.add(ServerObjectID.createPortalContainerID()); 42 } 43 44 public void addComponent(ComponentMetaData component) 45 { 46 components.put(component.getName(), component); 47 } 48 49 public ComponentMetaData getComponent(String name) 50 { 51 return (ComponentMetaData)components.get(name); 52 } 53 54 public Collection getComponents() 55 { 56 return components.values(); 57 } 58 59 public ServletContext getServletContext() 60 { 61 return servletContext; 62 } 63 64 public String getContextPath() 65 { 66 return contextPath; 67 } 68 69 public ClassLoader getClassLoader() 70 { 71 return classLoader; 72 } 73 74 } 75 | Popular Tags |