/** * Terminate server component manager. * * @throws Exception */ public void terminate() throws Exception { // tear down jetspeed component manager scm.stop(); }
/** * <p> * containsComponent * </p> * * @see org.apache.jetspeed.components.ComponentManagement#containsComponent(java.lang.Object, * java.lang.Object) * @param containerName * @param componentName * @return */ public boolean containsComponent(Object containerName, Object componentName) { return containsComponent(componentName); }
/** * <p> * getComponent * </p> * * @see org.apache.jetspeed.components.ComponentManagement#getComponent(java.lang.Object, * java.lang.Object) * @param containerName * @param componentName * @return */ public Object getComponent(Object containerName, Object componentName) { return getComponent(componentName); }
/** * Initialize server component manager and script context. * * @throws Exception */ public void initialize() throws Exception { // setup jetspeed test component manager JetspeedBeanDefinitionFilter beanDefinitionFilter = new JetspeedBeanDefinitionFilter(getBeanDefinitionFilterCategories()); String [] bootConfigurations = getBootConfigurations(); String [] configurations = getConfigurations(); baseDir = System.getProperty("basedir"); if ((baseDir == null) || (baseDir.length() == 0)) { baseDir = System.getProperty("user.dir"); } String appRoot = baseDir+"/target/test-classes/webapp"; scm = new SpringComponentManager(beanDefinitionFilter, bootConfigurations, configurations, appRoot, false); scm.start(); // create jexl context jexlContext = new MapContext(getContextVars()); }
/** * The main startup routine. * Establishes a JNDI connection based on the following System parameters: * <p> org.apache.jetspeed.database.url * <p> org.apache.jetspeed.database.driver * <p> org.apache.jetspeed.database.user * <p> org.apache.jetspeed.database.password * @throws Exception */ public void setUp() throws Exception { setupJNDI(); scm = new SpringComponentManager(null, bootConfig, appConfig, appRoot, true ); }
/** * setup Spring context as part of test setup */ protected void setUp() throws Exception { super.setUp(); String [] configurations = getConfigurations(); if ((configurations != null) && (configurations.length > 0)) { scm = new SpringComponentManager(getBeanDefinitionFilter(), getBootConfigurations(), getConfigurations(), getBaseDir() + "target/test-classes/webapp", getInitProperties(), false); scm.start(); new JetspeedActions(getSupportedPortletModes(), getSupportedWindowStates()); } }
Properties initProperties = new Properties(); initProperties.put(JETSPEED_PROPERTIES_PATH_KEY, configuration.getString(JETSPEED_PROPERTIES_PATH_KEY)); SpringComponentManager cm = new SpringComponentManager(filter, bootConfigs, appConfigs, servletContext, appRoot, initProperties);
/** * close Spring context as part of test teardown */ protected void tearDown() throws Exception { if (scm != null) { scm.stop(); } super.tearDown(); }