public void execute(AdminCommandContext context) { for (Config config : configs.getConfig()) { HttpService service = config.getHttpService(); if(service == null) continue; boolean done = false; try { final List<Property> properties = service.getProperty(); final Iterator<Property> iterator = properties.iterator(); while (!done && iterator.hasNext()) { final Property property = iterator.next(); String name = property.getName(); if ("accessLoggingEnabled".equals(name) || "accessLogBufferSize".equals(name) || "accessLogWriteInterval".equals(name) || "sso-enabled".equals(name)) { done = true; upgrade(context, property, service); } } } catch (TransactionFailure tf) { Logger.getAnonymousLogger().log(Level.SEVERE, "Failure while upgrading http-service properties." + " Please check logs for errors", tf); throw new RuntimeException(tf); } } }
public void execute(AdminCommandContext context) { for (Config config : configs.getConfig()) { HttpService service = config.getHttpService(); if(service == null) continue; boolean done = false; try { final List<Property> properties = service.getProperty(); final Iterator<Property> iterator = properties.iterator(); while (!done && iterator.hasNext()) { final Property property = iterator.next(); String name = property.getName(); if ("accessLoggingEnabled".equals(name) || "accessLogBufferSize".equals(name) || "accessLogWriteInterval".equals(name) || "sso-enabled".equals(name)) { done = true; upgrade(context, property, service); } } } catch (TransactionFailure tf) { ConfigApiLoggerInfo.getLogger().log(Level.SEVERE, ConfigApiLoggerInfo.ERR_UPGRADE_HTTP_SVC_PROPS, tf); throw new RuntimeException(tf); } } }
@Override public Object run(HttpService param) { final List<Property> propertyList = new ArrayList<Property>(param.getProperty()); final Iterator<Property> it = propertyList.iterator(); while (it.hasNext()) { final Property property = it.next(); if ("accessLoggingEnabled".equals(property.getName())) { param.setAccessLoggingEnabled(property.getValue()); it.remove(); } else if ("accessLogBufferSize".equals(property.getName())) { param.getAccessLog().setBufferSizeBytes(property.getValue()); it.remove(); } else if ("accessLogWriterInterval".equals(property.getName())) { param.getAccessLog().setWriteIntervalSeconds(property.getValue()); it.remove(); } else if ("sso-enabled".equals(property.getName())) { param.setSsoEnabled(property.getValue()); it.remove(); } } param.getProperty().clear(); param.getProperty().addAll(propertyList); return null; } }, service);
@Override public Object run(HttpService param) { final List<Property> propertyList = new ArrayList<Property>(param.getProperty()); final Iterator<Property> it = propertyList.iterator(); while (it.hasNext()) { final Property property = it.next(); if ("accessLoggingEnabled".equals(property.getName())) { param.setAccessLoggingEnabled(property.getValue()); it.remove(); } else if ("accessLogBufferSize".equals(property.getName())) { param.getAccessLog().setBufferSizeBytes(property.getValue()); it.remove(); } else if ("accessLogWriterInterval".equals(property.getName())) { param.getAccessLog().setWriteIntervalSeconds(property.getValue()); it.remove(); } else if ("sso-enabled".equals(property.getName())) { param.setSsoEnabled(property.getValue()); it.remove(); } } param.getProperty().clear(); param.getProperty().addAll(propertyList); return null; } }, service);
PECoyoteConnector connector) { List<Property> httpServiceProps = httpService.getProperty();
List<Property> props = httpService.getProperty(); if (props != null) { for (Property prop : props) {