/** * accessors for security manager */ public GeoServerSecurityManager getSecurityManager() { return GeoServerApplication.get().getSecurityManager(); }
/** Returns the application singleton. */ protected GeoServerApplication getApplication() { return GeoServerApplication.get(); } /**
@Override protected SettingsInfo load() { GeoServer gs = GeoServerApplication.get().getGeoServer(); return gs.getSettings(wsModel.getObject()); } }
public void setObject(Object object) { GeoServerApplication app = GeoServerApplication.get(); for (Object filter : app.getRequestCycleSettings().getResponseFilters()) { if(filter instanceof GeoServerHTMLValidatorResponseFilter) { ((GeoServerHTMLValidatorResponseFilter) filter).enabled = (Boolean) object; } } }
@Override public Object getObject() { String nsUri = (String) super.getObject(); NamespaceInfo namespaceInfo = GeoServerApplication.get().getCatalog().getNamespaceByURI(nsUri); return namespaceInfo; }
@Override protected SecurityManagerConfig load() { return GeoServerApplication.get().getSecurityManager().getSecurityConfig(); } }
@Override protected ServiceInfo load() { return GeoServerApplication.get() .getGeoServer() .getService(wsModel.getObject(), serviceClass); } }
protected GeoServerUserGroupService getService() { try { return GeoServerApplication.get() .getSecurityManager() .loadUserGroupService(serviceName); } catch (IOException e) { throw new RuntimeException(e); } }
@Override protected List<WorkspaceInfo> load() { Catalog catalog = GeoServerApplication.get().getCatalog(); List<WorkspaceInfo> workspaces = new ArrayList<WorkspaceInfo>(catalog.getWorkspaces()); Collections.sort(workspaces, new WorkspaceComparator()); return workspaces; }
MasterPasswordProviderNamesModel() { try { providerNames = new ArrayList(GeoServerApplication.get().getSecurityManager() .listMasterPasswordProviders()); } catch (IOException e) { throw new RuntimeException(e); } }
RoleServiceNamesModel() { try { this.serviceNames = new ArrayList( GeoServerApplication.get().getSecurityManager().listRoleServices()); } catch (IOException e) { throw new WicketRuntimeException(e); } }
@Override protected void onSubmit(AjaxRequestTarget target, Form<?> form) { LOGGER.log(Level.FINE, "Computing bounds from native CRS"); ResourceInfo resource = (ResourceInfo) BasicResourceConfig.this.getDefaultModelObject(); CatalogBuilder cb = new CatalogBuilder(GeoServerApplication.get().getCatalog()); ReferencedEnvelope nativeBBox = cb.getBoundsFromCRS(resource); if (nativeBBox != null) { nativeBoundsPanel.setModelObject(nativeBBox); } target.add(nativeBoundsPanel); }
@Override public Component getPageBodyComponent(String id) { // do a check that the root password is not set GeoServerSecurityManager secMgr = GeoServerApplication.get().getSecurityManager(); if (secMgr.checkAuthenticationForAdminRole()) { return new SecurityWarningsPanel(id); } return null; }
@Override protected Collection<GeoServerRole> load() { GeoServerSecurityManager secMgr = GeoServerApplication.get().getSecurityManager(); try { return new ArrayList(secMgr.getRolesForAccessControl()); } catch(IOException e) { throw new WicketRuntimeException(e); } }
UserGroupServiceNamesModel() { try { this.serviceNames = new ArrayList( GeoServerApplication.get().getSecurityManager().listUserGroupServices()); } catch (IOException e) { throw new WicketRuntimeException(e); } }
@Override public Component getPageBodyComponent(String id) { //do a check that the root password is not set GeoServerSecurityManager secMgr = GeoServerApplication.get().getSecurityManager(); if (secMgr.checkAuthenticationForAdminRole()) { return new SecurityWarningsPanel(id); } return null; }
UserGroupServiceNamesModel() { try { this.serviceNames = new ArrayList( GeoServerApplication.get().getSecurityManager().listUserGroupServices()); } catch (IOException e) { throw new WicketRuntimeException(e); } }