@Override protected List<T> load() { GeoServerApplication app = getGeoServerApplication(); List<T> providers = app.getBeansOfType(providerClass); return providers; } };
public GeoServerHomePage() { GeoServer gs = getGeoServer(); ContactInfo contact = gs.getGlobal().getContact(); .add( new Label("contactName", contact.getContactOrganization()))); Label label = new Label("footerMessage", new StringResourceModel("GeoServerHomePage.footer", this, new Model(params))); label.setEscapeModelStrings(false); add(label); Authentication auth = getSession().getAuthentication(); if(isAdmin(auth)) { Fragment f = new Fragment("catalogLinks", "catalogLinksFragment", this); Catalog catalog = getCatalog(); f.add(new BookmarkablePageLink("layersLink", LayerPage.class) .add(new Label( "nlayers", ""+catalog.getLayers().size()))); .add(new Label( "nworkspaces", ""+catalog.getWorkspaces().size()))); f.add(new BookmarkablePageLink("addWorkspaceLink", WorkspaceNewPage.class)); add(f); } else { Label placeHolder = new Label("catalogLinks"); placeHolder.setVisible(false); add(placeHolder); contentProviders = getContentProviders(GeoServerHomePageContentProvider.class); ListView<GeoServerHomePageContentProvider> contentView = new ListView<GeoServerHomePageContentProvider>( "contributedContent", contentProviders) { add(contentView);
/** * Executes login and goes to the home page * * @see org.geoserver.test.OneTimeSetupTest#setUpInternal() */ @Override protected void setUpInternal() throws Exception { login(); tester.startPage(new org.geoserver.web.GeoServerHomePage()); }
@SuppressWarnings({"rawtypes", "unchecked"}) public GeoServerHomePage() { GeoServer gs = getGeoServer(); ContactInfo contact = gs.getGlobal().getSettings().getContact(); add( new ExternalLink("contactURL", contact.getOnlineResource()) .add(new Label("contactName", contact.getContactOrganization()))); "GeoServerHomePage.footer", this, new Model(params))); label.setEscapeModelStrings(false); add(label); Authentication auth = getSession().getAuthentication(); if (isAdmin(auth)) { Stopwatch sw = Stopwatch.createStarted(); Fragment f = new Fragment("catalogLinks", "catalogLinksFragment", this); Catalog catalog = getCatalog(); NumberFormat numberFormat = NumberFormat.getIntegerInstance(getLocale()); numberFormat.setGroupingUsed(true); .add(new Label("nworkspaces", numberFormat.format(wsCount)))); f.add(new BookmarkablePageLink("addWorkspaceLink", WorkspaceNewPage.class)); add(f); Label placeHolder = new Label("catalogLinks"); placeHolder.setVisible(false); add(placeHolder);
@Override protected List<T> load() { GeoServerApplication app = getGeoServerApplication(); List<T> providers = app.getBeansOfType(providerClass); return providers; } };