List<SecurityNamedServicePanelInfo> lookupPanelInfos(Class<S> serviceClass) { List<SecurityNamedServicePanelInfo> panelInfos = new ArrayList(); for (SecurityNamedServicePanelInfo pageInfo : GeoServerApplication.get().getBeansOfType(SecurityNamedServicePanelInfo.class)) { if (serviceClass.isAssignableFrom(pageInfo.getServiceClass())) { panelInfos.add(pageInfo); } } if (panelInfos.isEmpty()) { throw new RuntimeException("Unable to find panel info for service class: " + serviceClass); } return panelInfos; }
List<SecurityNamedServicePanelInfo> lookupPanelInfos(Class<S> serviceClass) { List<SecurityNamedServicePanelInfo> panelInfos = new ArrayList(); for (SecurityNamedServicePanelInfo pageInfo : GeoServerApplication.get().getBeansOfType(SecurityNamedServicePanelInfo.class)) { if (serviceClass.isAssignableFrom(pageInfo.getServiceClass())) { panelInfos.add(pageInfo); } } if (panelInfos.isEmpty()) { throw new RuntimeException("Unable to find panel info for service class: " + serviceClass); } return panelInfos; }
List<SecurityNamedServicePanelInfo> lookupPanelInfos(Class<S> serviceClass) { List<SecurityNamedServicePanelInfo> panelInfos = new ArrayList(); for (SecurityNamedServicePanelInfo pageInfo : GeoServerApplication.get().getBeansOfType(SecurityNamedServicePanelInfo.class)) { if (serviceClass.isAssignableFrom(pageInfo.getServiceClass())) { panelInfos.add(pageInfo); } } if (panelInfos.isEmpty()) { throw new RuntimeException( "Unable to find panel info for service class: " + serviceClass); } return panelInfos; }
for (SecurityNamedServicePanelInfo pageInfo : GeoServerApplication.get().getBeansOfType(SecurityNamedServicePanelInfo.class)) { if (pageInfo.getServiceClass().isAssignableFrom(serviceClass)) { pageInfos.add(pageInfo); if (!it.next().getServiceClass().equals(serviceClass)) { it.remove();
for (SecurityNamedServicePanelInfo pageInfo : GeoServerApplication.get().getBeansOfType(SecurityNamedServicePanelInfo.class)) { if (pageInfo.getServiceClass().isAssignableFrom(serviceClass)) { pageInfos.add(pageInfo); if (!it.next().getServiceClass().equals(serviceClass)) { it.remove();
for (SecurityNamedServicePanelInfo pageInfo : GeoServerApplication.get().getBeansOfType(SecurityNamedServicePanelInfo.class)) { if (pageInfo.getServiceClass().isAssignableFrom(serviceClass)) { pageInfos.add(pageInfo); if (!it.next().getServiceClass().equals(serviceClass)) { it.remove();
for (SecurityNamedServicePanelInfo pageInfo : GeoServerApplication.get().getBeansOfType(SecurityNamedServicePanelInfo.class)) { if (pageInfo.getServiceClass().isAssignableFrom(serviceClass)) { panelInfos.add(pageInfo); if (!it.next().getServiceClass().equals(serviceClass)) { it.remove();
for (SecurityNamedServicePanelInfo pageInfo : GeoServerApplication.get().getBeansOfType(SecurityNamedServicePanelInfo.class)) { if (pageInfo.getServiceClass().isAssignableFrom(serviceClass)) { panelInfos.add(pageInfo); if (!it.next().getServiceClass().equals(serviceClass)) { it.remove();
for (SecurityNamedServicePanelInfo pageInfo : GeoServerApplication.get().getBeansOfType(SecurityNamedServicePanelInfo.class)) { if (pageInfo.getServiceClass().isAssignableFrom(serviceClass)) { panelInfos.add(pageInfo); for (Iterator<SecurityNamedServicePanelInfo> it = l.iterator(); it.hasNext(); ) { final SecurityNamedServicePanelInfo targetPanelInfo = it.next(); if (!targetPanelInfo.getServiceClass().equals(serviceClass)) { it.remove(); } else if (!targetPanelInfo.getServiceConfigClass().equals(config.getClass())) {
void updatePanel(SecurityNamedServicePanelInfo panelInfo, AjaxRequestTarget target) { //create a new config object T config = null; try { config = (T) panelInfo.getServiceConfigClass().newInstance(); } catch (Exception e) { throw new WicketRuntimeException( "Unable to create config class: " + panelInfo.getServiceConfigClass(), e); } config.setClassName(panelInfo.getServiceClass().getCanonicalName()); //update the form model form.setModel(new CompoundPropertyModel<T>(config)); //create the new panel panel = createPanel("content", panelInfo, new Model(config)); //remove the old panel if it is there if (panelContainer.get("content") != null) { panelContainer.remove("content"); } panelContainer.add(panel); if (target != null) { target.addComponent(panelContainer); } }
void updatePanel(SecurityNamedServicePanelInfo panelInfo, AjaxRequestTarget target) { // create a new config object T config = null; try { config = (T) panelInfo.getServiceConfigClass().newInstance(); } catch (Exception e) { throw new WicketRuntimeException( "Unable to create config class: " + panelInfo.getServiceConfigClass(), e); } config.setClassName(panelInfo.getServiceClass().getCanonicalName()); // update the form model form.setModel(new CompoundPropertyModel<T>(config)); // create the new panel panel = createPanel("content", panelInfo, new Model(config)); // remove the old panel if it is there if (panelContainer.get("content") != null) { panelContainer.remove("content"); } panelContainer.add(panel); if (target != null) { target.add(panelContainer); } }
void updatePanel(SecurityNamedServicePanelInfo panelInfo, AjaxRequestTarget target) { //create a new config object T config = null; try { config = (T) panelInfo.getServiceConfigClass().newInstance(); } catch (Exception e) { throw new WicketRuntimeException( "Unable to create config class: " + panelInfo.getServiceConfigClass(), e); } config.setClassName(panelInfo.getServiceClass().getCanonicalName()); //update the form model form.setModel(new CompoundPropertyModel<T>(config)); //create the new panel panel = createPanel("content", panelInfo, new Model(config)); //remove the old panel if it is there if (panelContainer.get("content") != null) { panelContainer.remove("content"); } panelContainer.add(panel); if (target != null) { target.addComponent(panelContainer); } }