1 48 49 package org.jpublish.component; 50 51 import org.jpublish.RequestContext; 52 import org.jpublish.SiteContext; 53 54 59 60 public class ComponentMap { 61 62 private RequestContext context; 63 64 69 70 public ComponentMap(RequestContext context) { 71 this.context = context; 72 } 73 74 80 81 public ComponentWrapper get(String id) throws ComponentNotFoundException { 82 SiteContext siteContext = context.getSiteContext(); 83 ComponentManager componentManager = siteContext.getComponentManager(); 84 Component component = componentManager.getComponent(id); 85 return new ComponentWrapper(component, context); 86 } 87 88 } 89 | Popular Tags |