1 29 30 package com.caucho.ejb.gen; 31 32 import com.caucho.bytecode.JClass; 33 import com.caucho.ejb.cfg.EjbSessionBean; 34 import com.caucho.util.L10N; 35 36 39 public class SessionAssembler extends BeanAssembler { 40 private static final L10N L = new L10N(SessionAssembler.class); 41 42 public SessionAssembler(EjbSessionBean bean, String fullClassName) 43 { 44 super(bean, fullClassName); 45 46 setSuperClass(); 47 } 48 49 52 protected void setSuperClass() 53 { 54 _genClass.setSuperClassName("com.caucho.ejb.session.StatefulContext"); 55 } 56 57 60 public void addHeaderComponent(JClass beanClass, 61 String contextClassName, 62 String implClassName) 63 { 64 _genClass.addComponent(new SessionBean(beanClass, contextClassName)); 65 } 66 67 70 public ViewClass createHomeView(JClass homeClass, 71 String fullClassName, 72 String viewPrefix) 73 { 74 SessionHomeView homeView = new SessionHomeView(homeClass, 75 fullClassName, 76 viewPrefix, 77 false); 78 79 _genClass.addComponent(homeView); 80 81 return homeView; 82 } 83 84 87 public ViewClass createView(JClass homeClass, 88 String fullClassName, 89 String viewPrefix) 90 { 91 SessionView view = new SessionView(homeClass, 92 fullClassName, 93 viewPrefix, 94 false); 95 96 _genClass.addComponent(view); 97 98 return view; 99 } 100 } 101 | Popular Tags |