Tabnine Logo
SecureCatalogImpl.getLayerGroups
Code IndexAdd Tabnine to your IDE (free)

How to use
getLayerGroups
method
in
org.geoserver.security.SecureCatalogImpl

Best Java code snippets using org.geoserver.security.SecureCatalogImpl.getLayerGroups (Showing top 3 results out of 315)

origin: geoserver/geoserver

public List<LayerGroupInfo> getLayerGroups() {
  return catalog.getLayerGroups();
}
origin: org.geoserver.security/gs-security-tests

@Test
public void testAccessToLayerGroupNoInheritance() throws Exception {
  CatalogFilterAccessManager mgr = setupAccessManager();
  inheritance.setValue("false");
  SecureCatalogImpl sc = new SecureCatalogImpl(catalog, mgr) {};
  assertThat(sc.getLayerGroups(), hasItem(equalTo(layerGroupGlobal)));
  assertThat(sc.getLayerGroups(), hasItem(equalTo(layerGroupTopp)));
  WorkspaceInfo ws = sc.getWorkspaceByName("topp");
  LocalWorkspace.set(ws);
  assertThat(sc.getLayerGroups(), not(hasItem(equalTo(layerGroupGlobal))));
  assertThat(sc.getLayerGroups(), hasItem(equalTo(layerGroupTopp)));
  LocalWorkspace.remove();
  ws = sc.getWorkspaceByName("nurc");
  LocalWorkspace.set(ws);
  assertThat(sc.getLayerGroups(), not(hasItem(equalTo(layerGroupGlobal))));
  assertThat(sc.getLayerGroups(), not(hasItem(equalTo(layerGroupTopp))));
  LocalWorkspace.remove();
}
origin: org.geoserver.security/gs-security-tests

@SuppressWarnings({"unchecked"})
@Test
public void testAccessToLayerGroup() throws Exception {
  CatalogFilterAccessManager mgr = setupAccessManager();
  SecureCatalogImpl sc = new SecureCatalogImpl(catalog, mgr) {};
  assertEquals(catalog.getLayerGroups().size(), sc.getLayerGroups().size());
  // all groups in this one or global
  WorkspaceInfo ws = sc.getWorkspaceByName("topp");
  LocalWorkspace.set(ws);
  assertEquals(getWorkspaceAccessibleGroupSize("topp"), sc.getLayerGroups().size());
  LocalWorkspace.remove();
  ws = sc.getWorkspaceByName("nurc");
  LocalWorkspace.set(ws);
  assertEquals(getWorkspaceAccessibleGroupSize("nurc"), sc.getLayerGroups().size());
  assertEquals("layerGroup", sc.getLayerGroups().get(0).getName());
  LocalWorkspace.remove();
}
org.geoserver.securitySecureCatalogImplgetLayerGroups

Popular methods of SecureCatalogImpl

  • unwrap
  • getCoverageByName
  • getCoverageStoreByName
  • getCoverages
  • getDataStoreByName
  • getFeatureTypeByName
  • getFeatureTypes
  • getLayerByName
  • getLayerGroupByName
  • getLayers
  • getResourceByName
  • getStyles
  • getResourceByName,
  • getStyles,
  • getWorkspaceByName,
  • getWorkspaces,
  • list,
  • <init>,
  • buildDefaultResourceAccessManager,
  • buildWrapperPolicy,
  • checkAccess

Popular in Java

  • Making http requests using okhttp
  • setContentView (Activity)
  • onRequestPermissionsResult (Fragment)
  • scheduleAtFixedRate (ScheduledExecutorService)
  • IOException (java.io)
    Signals a general, I/O-related error. Error details may be specified when calling the constructor, a
  • HttpURLConnection (java.net)
    An URLConnection for HTTP (RFC 2616 [http://tools.ietf.org/html/rfc2616]) used to send and receive d
  • Calendar (java.util)
    Calendar is an abstract base class for converting between a Date object and a set of integer fields
  • Map (java.util)
    A Map is a data structure consisting of a set of keys and values in which each key is mapped to a si
  • JTable (javax.swing)
  • Logger (org.apache.log4j)
    This is the central class in the log4j package. Most logging operations, except configuration, are d
  • Top 15 Vim Plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyStudentsTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now