congrats Icon
New! Announcing our next generation AI code completions
Read here
Tabnine Logo
GeoServerRole.toString
Code IndexAdd Tabnine to your IDE (free)

How to use
toString
method
in
org.geoserver.security.impl.GeoServerRole

Best Java code snippets using org.geoserver.security.impl.GeoServerRole.toString (Showing top 3 results out of 315)

origin: org.geoserver.security/gs-sec-ldap

private void fillUsersForRole(DirContext ctx, SortedSet<String> users, GeoServerRole role) {
  String roleStr = role.toString();
  if (roleStr.startsWith("ROLE_")) {
    // remove standard role prefix
    roleStr = roleStr.substring(5);
  }
  DirContextOperations roleObj =
      LDAPUtils.getLdapTemplateInContext(ctx, template)
          .searchForSingleEntry(
              groupSearchBase, groupNameFilter, new String[] {roleStr});
  if (roleObj != null) {
    Object[] usernames = roleObj.getObjectAttributes(groupMembershipAttribute);
    if (usernames != null) {
      for (Object username : usernames) {
        String user = username.toString();
        Matcher m = userMembershipPattern.matcher(user);
        if (m.matches()) {
          user = m.group(1);
        }
        users.add(getUserNameFromMembership(user));
      }
    }
  }
}
origin: org.geoserver.security/gs-sec-ldap

private void checkAllRoles() throws IOException {
  createRoleService(false);
  SortedSet<GeoServerRole> roles = service.getRoles();
  assertNotNull(roles);
  assertTrue(roles.size() > 0);
  GeoServerRole role = roles.first();
  assertTrue(role.toString().startsWith("ROLE_"));
  assertEquals(role.toString().toUpperCase(), role.toString());
}
origin: org.geoserver.security/gs-sec-ldap

private void checkUserRoles(String username, boolean userFilter) throws IOException {
  createRoleService(userFilter);
  SortedSet<GeoServerRole> allRoles = service.getRoles();
  SortedSet<GeoServerRole> roles = service.getRolesForUser(username);
  assertNotNull(roles);
  assertTrue(roles.size() > 0);
  assertTrue(roles.size() < allRoles.size());
  GeoServerRole role = roles.first();
  assertTrue(role.toString().startsWith("ROLE_"));
  assertEquals(role.toString().toUpperCase(), role.toString());
}
org.geoserver.security.implGeoServerRoletoString

Popular methods of GeoServerRole

  • getAuthority
  • <init>
  • getProperties
  • getUserName
  • setUserName
  • equals
  • compareTo
  • equalsWithoutUserName
  • isAnonymous

Popular in Java

  • Parsing JSON documents to java classes using gson
  • setContentView (Activity)
  • setRequestProperty (URLConnection)
  • getResourceAsStream (ClassLoader)
  • Container (java.awt)
    A generic Abstract Window Toolkit(AWT) container object is a component that can contain other AWT co
  • Collections (java.util)
    This class consists exclusively of static methods that operate on or return collections. It contains
  • HashMap (java.util)
    HashMap is an implementation of Map. All optional operations are supported.All elements are permitte
  • Iterator (java.util)
    An iterator over a sequence of objects, such as a collection.If a collection has been changed since
  • JFrame (javax.swing)
  • Options (org.apache.commons.cli)
    Main entry-point into the library. Options represents a collection of Option objects, which describ
  • 21 Best IntelliJ 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