@Override public FedizContext getFedizContext(String context) { FedizContext ctx = configurator.getFedizContext(context); if (ctx == null) { LOG.error("Federation context '" + context + "' not found."); throw new IllegalStateException("Federation context '" + context + "' not found."); } initializeRelativePath(ctx); return ctx; }
@Override public List<FedizContext> getFedizContextList() { return configurator.getFedizContextList(); }
@Override protected synchronized void startInternal() throws LifecycleException { try { File f = new File(getConfigFile()); if (!f.exists()) { String catalinaBase = System.getProperty("catalina.base"); if (catalinaBase != null && catalinaBase.length() > 0) { f = new File(catalinaBase.concat(File.separator + getConfigFile())); } } configurator = new FedizConfigurator(); configurator.loadConfig(f); LOG.debug("Fediz configuration read from " + f.getAbsolutePath()); } catch (JAXBException | IOException e) { throw new LifecycleException("Failed to load Fediz configuration", e); } super.startInternal(); }
public void init() { Assert.notNull(this.configFile, "property 'configFile' mandatory"); try { configurator.loadConfig(this.configFile.getFile()); } catch (Exception e) { LOG.error("Failed to parse '" + configFile.getDescription() + "'", e); throw new BeanCreationException("Failed to parse '" + configFile.getDescription() + "'", e); } }
@Override protected synchronized void startInternal() throws LifecycleException { try { File f = new File(getConfigFile()); if (!f.exists()) { String catalinaBase = System.getProperty("catalina.base"); if (catalinaBase != null && catalinaBase.length() > 0) { f = new File(catalinaBase.concat(File.separator + getConfigFile())); } } configurator = new FedizConfigurator(); configurator.loadConfig(f); LOG.debug("Fediz configuration read from " + f.getAbsolutePath()); } catch (JAXBException | IOException e) { throw new LifecycleException("Failed to load Fediz configuration", e); } super.startInternal(); }
public void init() { Assert.notNull(this.configFile, "property 'configFile' mandatory"); try { configurator.loadConfig(this.configFile.getFile()); } catch (Exception e) { LOG.error("Failed to parse '" + configFile.getDescription() + "'", e); throw new BeanCreationException("Failed to parse '" + configFile.getDescription() + "'"); } }
@Override public FedizContext getFedizContext(String context) { FedizContext ctx = configurator.getFedizContext(context); if (ctx == null) { LOG.error("Federation context '" + context + "' not found."); throw new IllegalStateException("Federation context '" + context + "' not found."); } initializeRelativePath(ctx); return ctx; }
/** * */ @Override public void setConfiguration(AuthConfiguration configuration) { super.setConfiguration(configuration); // is called after the bean setting -> do initialization here LOG.debug(configuration.getInitParameterNames().toString()); try { File f = new File(getConfigFile()); if (!f.exists()) { String jettyHome = System.getProperty("jetty.home"); if (jettyHome != null && jettyHome.length() > 0) { f = new File(jettyHome.concat(File.separator + getConfigFile())); } } configurator = new FedizConfigurator(); configurator.loadConfig(f); LOG.debug("Fediz configuration read from " + f.getAbsolutePath()); } catch (JAXBException | IOException e) { //[TODO] use other exception throw new RuntimeException("Failed to load Fediz configuration", e); //throw new ServerAuthException("Failed to load Fediz configuration", // e); } }
public void init() { Assert.notNull(this.configFile, "property 'configFile' mandatory"); try { configurator.loadConfig(this.configFile.getFile()); } catch (Exception e) { LOG.error("Failed to parse '" + configFile.getDescription() + "'", e); throw new BeanCreationException("Failed to parse '" + configFile.getDescription() + "'", e); } }
@Override public List<FedizContext> getFedizContextList() { return configurator.getFedizContextList(); }
@Override public FedizContext getFedizContext(String context) { FedizContext ctx = configurator.getFedizContext(context); if (ctx == null) { LOG.error("Federation context '" + context + "' not found."); throw new IllegalStateException("Federation context '" + context + "' not found."); } initializeRelativePath(ctx); return ctx; }
configurator = new FedizConfigurator(); configurator.loadConfig(f); LOG.debug("Fediz configuration read from " + f.getAbsolutePath()); } catch (JAXBException e) {
@Override public List<FedizContext> getFedizContextList() { return configurator.getFedizContextList(); }
protected synchronized FedizContext getContextConfiguration(String contextName) { if (configurator == null) { throw new IllegalStateException("No Fediz configuration available"); } FedizContext config = configurator.getFedizContext(contextName); if (config == null) { throw new IllegalStateException("No Fediz configuration for context :" + contextName); } String catalinaBase = System.getProperty("catalina.base"); if (catalinaBase != null && catalinaBase.length() > 0) { config.setRelativePath(catalinaBase); } return config; }
/** * */ @Override public void setConfiguration(AuthConfiguration configuration) { super.setConfiguration(configuration); // is called after the bean setting -> do initialization here LOG.debug(configuration.getInitParameterNames().toString()); try { File f = new File(getConfigFile()); if (!f.exists()) { String jettyHome = System.getProperty("jetty.home"); if (jettyHome != null && jettyHome.length() > 0) { f = new File(jettyHome.concat(File.separator + getConfigFile())); } } configurator = new FedizConfigurator(); configurator.loadConfig(f); LOG.debug("Fediz configuration read from " + f.getAbsolutePath()); } catch (JAXBException | IOException e) { //[TODO] use other exception throw new RuntimeException("Failed to load Fediz configuration", e); //throw new ServerAuthException("Failed to load Fediz configuration", // e); } }
@Override protected synchronized void stopInternal() throws LifecycleException { if (configurator != null) { List<FedizContext> fedContextList = configurator.getFedizContextList(); if (fedContextList != null) { for (FedizContext fedContext : fedContextList) { try { fedContext.close(); } catch (IOException ex) { // } } } } super.stopInternal(); }
private FedizContext getContextConfiguration(String contextName) { if (configurator == null) { throw new IllegalStateException("No Fediz configuration available"); } FedizContext config = configurator.getFedizContext(contextName); if (config == null) { throw new IllegalStateException("No Fediz configuration for context :" + contextName); } String jettyHome = System.getProperty("jetty.home"); if (jettyHome != null && jettyHome.length() > 0) { config.setRelativePath(jettyHome); } return config; }
@Override protected synchronized void stopInternal() throws LifecycleException { if (configurator != null) { List<FedizContext> fedContextList = configurator.getFedizContextList(); if (fedContextList != null) { for (FedizContext fedContext : fedContextList) { try { fedContext.close(); } catch (IOException ex) { // } } } } super.stopInternal(); }
private FedizContext getContextConfiguration(String contextName) { if (configurator == null) { throw new IllegalStateException("No Fediz configuration available"); } FedizContext config = configurator.getFedizContext(contextName); if (config == null) { throw new IllegalStateException("No Fediz configuration for context :" + contextName); } String jettyHome = System.getProperty("jetty.home"); if (jettyHome != null && jettyHome.length() > 0) { config.setRelativePath(jettyHome); } return config; }
protected synchronized FedizContext getContextConfiguration(String contextName) { if (configurator == null) { throw new IllegalStateException("No Fediz configuration available"); } FedizContext config = configurator.getFedizContext(contextName); if (config == null) { throw new IllegalStateException("No Fediz configuration for context :" + contextName); } String catalinaBase = System.getProperty("catalina.base"); if (catalinaBase != null && catalinaBase.length() > 0) { config.setRelativePath(catalinaBase); } return config; }