/** * <p>A factory method made available to Spring to generate a <code>RemoteConfigElement</code> Spring Bean</p> * @return The "remote" element from the "Remote" Config returned by the <code>ConfigService</code> */ public RemoteConfigElement getRemoteConfig() { Config remoteConfig = configService.getConfig("Remote"); RemoteConfigElement remoteConfigElement = (RemoteConfigElement) remoteConfig.getConfigElement("remote"); return remoteConfigElement; }
public void setConfigService(ConfigService configService) { this.configService = configService; Config config = this.configService.getConfig("Server"); serverProperties = (ServerConfigElement)config.getConfigElement(ServerConfigElement.CONFIG_ELEMENT_ID); }
public void setConfigService(ConfigService configService) { this.configService = configService; Config config = this.configService.getConfig("Server"); serverProperties = (ServerConfigElement)config.getConfigElement(ServerConfigElement.CONFIG_ELEMENT_ID); }
/** * @return RemoteConfigElement */ protected RemoteConfigElement getRemoteConfig() { RemoteConfigElement remoteConfig = (RemoteConfigElement)configService.getConfig( "Remote").getConfigElement("remote"); return remoteConfig; }
/** * <p>A factory method made available to Spring to generate a <code>RemoteConfigElement</code> Spring Bean</p> * @return The "remote" element from the "Remote" Config returned by the <code>ConfigService</code> */ public RemoteConfigElement getRemoteConfig() { Config remoteConfig = configService.getConfig("Remote"); RemoteConfigElement remoteConfigElement = (RemoteConfigElement) remoteConfig.getConfigElement("remote"); return remoteConfigElement; }
/** * Gets the remote config. * * @return the remote config */ public RemoteConfigElement getRemoteConfig() { if (this.config == null) { // retrieve the remote configuration this.config = (RemoteConfigElement) configService.getConfig("Remote").getConfigElement("remote"); } return this.config; }
/** * Gets the remote config. * * @return the remote config */ public RemoteConfigElement getRemoteConfig() { if (this.config == null) { // retrieve the remote configuration this.config = (RemoteConfigElement) configService.getConfig("Remote").getConfigElement("remote"); } return this.config; }
/** * Gets the single instance of the remote config element. * * @return the remote config */ private RemoteConfigElement getRemoteConfig() { if (this.config == null) { // retrieve the remote configuration this.config = (RemoteConfigElement)this.configService.getConfig("Remote").getConfigElement("remote"); } return this.config; } }
/** * Gets the single instance of the remote config element. * * @return the remote config */ private RemoteConfigElement getRemoteConfig() { if (this.config == null) { // retrieve the remote configuration this.config = (RemoteConfigElement)this.configService.getConfig("Remote").getConfigElement("remote"); } return this.config; } }
/** * Gets the remote config. * * @return the remote config */ public RemoteConfigElement getRemoteConfig() { if (this.config == null) { // retrieve the remote configuration this.config = (RemoteConfigElement) configService.getConfig("Remote").getConfigElement("remote"); } return this.config; }
@Override public Object get(Object identifier) { if (logger.isDebugEnabled()) logger.debug("Getting scoped config for '" + identifier + "'"); Map<String, ConfigElement> map = null; if (configService != null) { Config result = configService.getConfig(identifier); map = result.getConfigElements(); } else { map = Collections.emptyMap(); } if (logger.isDebugEnabled()) logger.debug("Returning config for '" + identifier + "': " + map); return map; } }
/** * <p>A factory method made available to Spring to generate a <code>WebFrameworkConfigElement</code> Spring Bean</p> * @return The "web-framework" element from the "WebFramework" Config returned by the <code>ConfigService</code> */ public WebFrameworkConfigElement getWebFrameworkConfig() { if (this.webFrameworkConfigElement != null) { // No action required, the WebFrameworkConfigElement has already been obtained from the ConfigService. } else { // Get the WebFrameworkConfigElement if not previously retrieved... Config webFrameworkConfig = configService.getConfig("WebFramework"); this.webFrameworkConfigElement = (WebFrameworkConfigElement) webFrameworkConfig.getConfigElement("web-framework"); } return webFrameworkConfigElement; }
/** * <p>A factory method made available to Spring to generate a <code>WebFrameworkConfigElement</code> Spring Bean</p> * @return The "web-framework" element from the "WebFramework" Config returned by the <code>ConfigService</code> */ public WebFrameworkConfigElement getWebFrameworkConfig() { if (this.webFrameworkConfigElement != null) { // No action required, the WebFrameworkConfigElement has already been obtained from the ConfigService. } else { // Get the WebFrameworkConfigElement if not previously retrieved... Config webFrameworkConfig = configService.getConfig("WebFramework"); this.webFrameworkConfigElement = (WebFrameworkConfigElement) webFrameworkConfig.getConfigElement("web-framework"); } return webFrameworkConfigElement; }
@Override public void init() throws ServletException { super.init(); ApplicationContext context = WebApplicationContextUtils.getRequiredWebApplicationContext(getServletContext()); ConfigService configService = (ConfigService)context.getBean("web.config"); // retrieve the remote configuration this.config = (RemoteConfigElement)configService.getConfig("Remote").getConfigElement("remote"); // retrieve the connector service this.connectorService = (ConnectorService) context.getBean("connector.service"); }
@Override public Object get(Object identifier) { if (logger.isDebugEnabled()) logger.debug("Getting scoped config for '" + identifier + "'"); Map<String, ConfigElement> map = null; if (configService != null) { Config result = configService.getConfig(identifier, new ConfigLookupContext(), globalConfig, sectionsByArea, sections); map = result.getConfigElements(); } else { map = Collections.emptyMap(); } if (logger.isDebugEnabled()) logger.debug("Returning config for '" + identifier + "': " + map); return map; } }
@Override public Object get(Object identifier) { if (logger.isDebugEnabled()) logger.debug("Getting scoped config for '" + identifier + "'"); Map<String, ConfigElement> map = null; if (configService != null) { Config result = configService.getConfig(identifier, new ConfigLookupContext(), globalConfig, sectionsByArea, sections); map = result.getConfigElements(); } else { map = Collections.emptyMap(); } if (logger.isDebugEnabled()) logger.debug("Returning config for '" + identifier + "': " + map); return map; } }
@Override public void init() throws ServletException { super.init(); ApplicationContext context = WebApplicationContextUtils.getRequiredWebApplicationContext(getServletContext()); ConfigService configService = (ConfigService)context.getBean("web.config"); // retrieve the remote configuration this.config = (RemoteConfigElement)configService.getConfig("Remote").getConfigElement("remote"); // retrieve the connector service this.connectorService = (ConnectorService) context.getBean("connector.service"); }
@Override public void init() throws ServletException { super.init(); ApplicationContext context = WebApplicationContextUtils.getRequiredWebApplicationContext(getServletContext()); ConfigService configService = (ConfigService)context.getBean("web.config"); // retrieve the remote configuration this.config = (RemoteConfigElement)configService.getConfig("Remote").getConfigElement("remote"); // retrieve the connector service this.connectorService = (ConnectorService) context.getBean("connector.service"); }
/** * Gets the server properties * * @return server properties * @throws Exception */ public ServerProperties getServerProperties() { if (serverProperties == null) { Config config = configService.getConfig("Server"); serverProperties = (ServerConfigElement)config.getConfigElement(ServerConfigElement.CONFIG_ELEMENT_ID); } return serverProperties; }
/** * Initialise the list of URL Mapper objects for the PageRenderer */ private void initUriIndex(ConfigService configService) { Config config = configService.getConfig(CONFIG_ELEMENT); if (config == null) { throw new PlatformRuntimeException("Cannot find required config element 'UriTemplate'."); } ConfigElement uriConfig = config.getConfigElement("uri-mappings"); if (uriConfig == null) { throw new PlatformRuntimeException("Missing required config element 'uri-mappings' under 'UriTemplate'."); } this.uriTemplateIndex = new UriTemplateMappingIndex(uriConfig); }