/** * {@inheritDoc} */ @Override protected BeanConfig parseBeanConfig(Element parent, String name) throws ConfigurationException { BeanConfig cfg = super.parseBeanConfig(parent, name); cfg.setConnectionFactory(connectionFactory); cfg.setInstanceFactory(beanFactory); configVisitor.visit(cfg); return cfg; }
/** * Parses the PersistenceManager config. * * @param parent parent of the <code>PersistenceManager</code> element * @return persistence manager configuration * @throws ConfigurationException if the configuration is broken */ protected PersistenceManagerConfig parsePersistenceManagerConfig( Element parent) throws ConfigurationException { return new PersistenceManagerConfig( parseBeanConfig(parent, PERSISTENCE_MANAGER_ELEMENT)); }
/** * {@inheritDoc} */ public String getName() { return wspConfig.getName(); }
/** * Test that a RepositoryConfig can be copied into a new instance. * * @throws Exception if an unexpected error occurs during the test */ public void testCopyConfig() throws Exception { RepositoryConfig copyConfig = RepositoryConfig.create(config); assertNotNull("Configuration not created properly", copyConfig); assertRepositoryConfiguration(copyConfig); }
/** * @return The <code>SecurityManagerConfig</code> configured for the * repository this manager has been created for. */ protected SecurityManagerConfig getConfig() { return repository.getConfig().getSecurityConfig().getSecurityManagerConfig(); }
/** * Returns the repository name. The repository name can be used for * JAAS app-entry configuration. * * @return repository name * @deprecated Use {@link SecurityConfig#getAppName()} instead. */ public String getAppName() { return sec.getAppName(); }
public void testDuplicateLogicalName() throws ConfigurationException { cfg.addDataSourceDefinition("ds", minimalProps); try { cfg.addDataSourceDefinition("ds", minimalProps2); fail(); } catch (ConfigurationException e) { // expected } }
public void testCreateDuplicateWorkspaceConfig() throws Exception { try { config.createWorkspaceConfig("default", (StringBuffer) null); fail("No exception thrown when creating a duplicate workspace"); } catch (ConfigurationException e) { // test passed } }
/** * This method is called when there is a warning parsing the configuration file. * The relevant information is written to the log file. */ public void warning(SAXParseException exception) throws SAXException { log("Warning", exception); }
/** * Creates an access manager configuration object from the * given bean configuration. * * @param config bean configuration */ public LoginModuleConfig(BeanConfig config) { super(config); setValidate(false); // JCR-1920 }
public UserManagerConfig(BeanConfig config, BeanConfig[] actionConfig) { super(config); setValidate(false); // omit validation of the config properties this.actionConfig = actionConfig; }
/** * {@inheritDoc} */ @Override protected BeanConfig parseBeanConfig(Element parent, String name) throws ConfigurationException { BeanConfig cfg = super.parseBeanConfig(parent, name); cfg.setConnectionFactory(connectionFactory); cfg.setInstanceFactory(beanFactory); configVisitor.visit(cfg); return cfg; }
public void testNullLogicalName() throws ConfigurationException { try { cfg.addDataSourceDefinition(null, minimalProps); fail(); } catch (ConfigurationException e) { // expected } }
/** * Parses the PersistenceManager config. * * @param parent parent of the <code>PersistenceManager</code> element * @return persistence manager configuration * @throws ConfigurationException if the configuration is broken */ protected PersistenceManagerConfig parsePersistenceManagerConfig( Element parent) throws ConfigurationException { return new PersistenceManagerConfig( parseBeanConfig(parent, PERSISTENCE_MANAGER_ELEMENT)); }
/** * Returns the workspace name. * * @return the workspace name */ protected String getName() { return config.getName(); }
/** * This method is called when there is an error parsing the configuration file. * The relevant information is written to the log file. */ public void error(SAXParseException exception) throws SAXException { log("Warning", exception); }
/** * {@inheritDoc} */ @Override protected BeanConfig parseBeanConfig(Element element) throws ConfigurationException { BeanConfig cfg = super.parseBeanConfig(element); cfg.setConnectionFactory(connectionFactory); cfg.setInstanceFactory(beanFactory); configVisitor.visit(cfg); return cfg; }
public void testEmptyLogicalName() throws ConfigurationException { try { cfg.addDataSourceDefinition(" ", minimalProps); fail(); } catch (ConfigurationException e) { // expected } }
/** * Returns the workspace name. * * @return the workspace name */ protected String getName() { return config.getName(); }
/** * {@inheritDoc} */ @Override protected BeanConfig parseBeanConfig(Element element) throws ConfigurationException { BeanConfig cfg = super.parseBeanConfig(element); cfg.setConnectionFactory(connectionFactory); cfg.setInstanceFactory(beanFactory); configVisitor.visit(cfg); return cfg; }