Tabnine Logo
GroupImpl
Code IndexAdd Tabnine to your IDE (free)

How to use
GroupImpl
in
org.jboss.errai.security.shared.api

Best Java code snippets using org.jboss.errai.security.shared.api.GroupImpl (Showing top 20 results out of 315)

origin: kiegroup/appformer

public static Group createGroup(final String name) {
  if (name == null) {
    return null;
  }
  return new GroupImpl(name);
}
origin: org.uberfire/uberfire-security-management-client

public Group createGroup(final String name) {
  if (name == null) {
    return null;
  }
  return new GroupImpl(name);
}
origin: kiegroup/appformer

public Group createGroup(final String name) {
  if (name == null) {
    return null;
  }
  return new GroupImpl(name);
}
origin: kiegroup/appformer

private Group getGroup(String groupName) {
  Group group = groupMap.get(groupName);
  if (group == null) {
    group = new GroupImpl(groupName);
    groupMap.put(groupName,
           group);
  }
  return group;
}
origin: org.guvnor/guvnor-services-backend

private Group getGroup(String groupName) {
  Group group = groupMap.get(groupName);
  if (group == null) {
    group = new GroupImpl(groupName);
    groupMap.put(groupName,
           group);
  }
  return group;
}
origin: org.uberfire/uberfire-security-api

public AuthorizationPolicyBuilder group(String group) {
  _currentRole = null;
  _currentGroup = groups.get(group);
  if (_currentGroup == null) {
    groups.put(group,
          _currentGroup = new GroupImpl(group));
  }
  return this;
}
origin: kiegroup/appformer

public AuthorizationPolicyBuilder group(String group) {
  _currentRole = null;
  _currentGroup = groups.get(group);
  if (_currentGroup == null) {
    groups.put(group,
          _currentGroup = new GroupImpl(group));
  }
  return this;
}
origin: org.uberfire/uberfire-security-management-wildfly

/**
 * Wildfly / EAP realms based on properties do not allow groups with empty users. So the groups are created using the method #assignUsers.
 * @param entity The entity to create.
 * @return A runtime instance for a group.
 * @throws SecurityManagementException
 */
@Override
public Group create(Group entity) throws SecurityManagementException {
  if (entity == null) {
    throw new NullPointerException();
  }
  return new GroupImpl(entity.getName());
}
origin: org.uberfire/uberfire-security-management-wildfly-commons

/**
 * WildFly / EAP realms based on properties do not allow groups with empty users. So the groups are created using the method #assignUsers.
 *
 * @param entity The entity to create.
 * @return A runtime instance for a group.
 * @throws SecurityManagementException
 */
@Override
public Group create( Group entity ) throws SecurityManagementException {
  if (entity == null) throw new NullPointerException();
  return new GroupImpl( entity.getName() );
}
origin: kiegroup/appformer

/**
 * Wildfly / EAP realms based on properties do not allow groups with empty users. So the groups are created using the method #assignUsers.
 * @param entity The entity to create.
 * @return A runtime instance for a group.
 * @throws SecurityManagementException
 */
@Override
public Group create(Group entity) throws SecurityManagementException {
  if (entity == null) {
    throw new NullPointerException();
  }
  return new GroupImpl(entity.getName());
}
origin: kiegroup/appformer

  @Override
  public List<Group> getGroups(final String principal,
                 final Object subject) {
    if (registry == null) {
      return Collections.emptyList();
    }

    final List<Group> groups = new ArrayList<Group>();

    try {
      Method method = registry.getClass().getMethod("getGroupsForUser",
                             new Class[]{String.class});
      List rolesIn = (List) method.invoke(registry,
                        new Object[]{principal});
      if (rolesIn != null) {
        for (Object o : rolesIn) {
          groups.add(new GroupImpl(o.toString()));
        }
      }
    } catch (Exception e) {
      logger.error("Unable to get groups from registry due to {}",
             e.getMessage(),
             e);
    }

    return groups;
  }
}
origin: kiegroup/appformer

for (java.security.Principal p : wlsSubject.getPrincipals()) {
  if (p.getClass().getName().indexOf("WLSGroup") != -1) {
    groups.add(new GroupImpl(p.getName()));
origin: kiegroup/appformer

public JettyGroupsAdapter() {
  InputStream input = this.getClass().getResourceAsStream(GROUPS_DEFINITION_FILE);
  if (input != null) {
    try {
      Properties properties = new Properties();
      properties.load(input);
      groupsByUser = new HashMap<String, List<Group>>();
      Set<String> userNames = properties.stringPropertyNames();
      for (String userName : userNames) {
        String groupsStr = properties.getProperty(userName);
        List<Group> userGroups = new ArrayList<Group>();
        if (groupsStr != null) {
          String[] groups = groupsStr.split(",");
          for (String group : groups) {
            userGroups.add(new GroupImpl(group));
          }
        }
        groupsByUser.put(userName,
                 userGroups);
      }
    } catch (IOException e) {
      logger.warn("Unable to load jetty-groups.properties file due to {}",
            e.getMessage());
    }
  }
}
origin: kiegroup/appformer

/**
 * For a given collection of principal names, return the Role instances for the ones
 * that are considered roles, so the ones that exist on the RoleRegistry.
 */
protected List<Group> getGroups(List<String> principals) {
  if (null != principals && !principals.isEmpty()) {
    Set<Role> registeredRoles = RoleRegistry.get().getRegisteredRoles();
    if (null != registeredRoles && !registeredRoles.isEmpty()) {
      List<Group> result = new LinkedList<Group>();
      for (String role : principals) {
        if (null == RoleRegistry.get().getRegisteredRole(role)) {
          result.add(new GroupImpl(role));
        }
      }
      return result;
    }
  }
  return Collections.emptyList();
}
origin: kiegroup/appformer

public boolean flush() {
  assert this.isEditMode;
  this.isFlushed = true;
  groupEditor.flush();
  // Obtain the editor's values
  final String name = groupEditor.name();
  // Create a new resulting instance
  group = new GroupImpl(name);
  // Validate the instance and set delegate violations, if any, to the editors hierarchy.
  Set<ConstraintViolation<Group>> violations = userSystemManager.groupsValidator().validate(group);
  groupEditor.setViolations(violations);
  return violations == null || violations.isEmpty();
}
origin: org.uberfire/uberfire-security-management-client

public boolean flush() {
  assert this.isEditMode;
  this.isFlushed = true;
  groupEditor.flush();
  // Obtain the editor's values
  final String name = groupEditor.name();
  // Create a new resulting instance
  group = new GroupImpl(name);
  // Validate the instance and set delegate violations, if any, to the editors hierarchy.
  Set<ConstraintViolation<Group>> violations = userSystemManager.groupsValidator().validate(group);
  groupEditor.setViolations(violations);
  return violations == null || violations.isEmpty();
}
origin: org.uberfire/uberfire-security-management-wildfly-commons

private void assertGroupsForUser(Set<Group> groupsSet, String[] groups) {
  assertNotNull(groupsSet);
  assertEquals(groupsSet.size(), groups.length);
  int x = 0;
  for (Group g : groupsSet) {
    String gName = groups[x];
    assertTrue(groupsSet.contains(new GroupImpl(gName)));
    x++;
  }
}
origin: org.uberfire/uberfire-security-management-wildfly

  private void assertGroupsForUser(Set<Group> groupsSet,
                   String[] groups) {
    assertNotNull(groupsSet);
    assertEquals(groupsSet.size(),
           groups.length);
    int x = 0;
    for (Group g : groupsSet) {
      String gName = groups[x];
      assertTrue(groupsSet.contains(new GroupImpl(gName)));
      x++;
    }
  }
}
origin: kiegroup/appformer

  private void assertGroupsForUser(Set<Group> groupsSet,
                   String[] groups) {
    assertNotNull(groupsSet);
    assertEquals(groupsSet.size(),
           groups.length);
    int x = 0;
    for (Group g : groupsSet) {
      String gName = groups[x];
      assertTrue(groupsSet.contains(new GroupImpl(gName)));
      x++;
    }
  }
}
origin: kiegroup/appformer

@Test
public void testEditGroup() {
  presenter.edit(new GroupImpl("group1"));
  verify(view).setHomePerspectiveSelectorEnabled(true);
  verify(view).setPrioritySelectorEnabled(true);
  verify(view).setHomePerspectiveSelector(any());
  verify(view).setPrioritySelector(any());
  verify(homePerspectiveDropDown).setSelectedPerspective("HomeGroup1");
  verify(priorityDropDown).setSelectedPriority(DEFAULT_PRIORITY);
}
org.jboss.errai.security.shared.apiGroupImpl

Javadoc

Default implementation of Group. Errai's built-in security modules do not assign any semantics to groups and therefore don't consider them when checking for permissions. On the client, Errai should never reference this type directly. The interface should be used instead to provide the ability to plug in custom Groupimplementations.

Most used methods

  • <init>

Popular in Java

  • Reading from database using SQL prepared statement
  • getSharedPreferences (Context)
  • addToBackStack (FragmentTransaction)
  • notifyDataSetChanged (ArrayAdapter)
  • BufferedImage (java.awt.image)
    The BufferedImage subclass describes an java.awt.Image with an accessible buffer of image data. All
  • MessageDigest (java.security)
    Uses a one-way hash function to turn an arbitrary number of bytes into a fixed-length byte sequence.
  • PriorityQueue (java.util)
    A PriorityQueue holds elements on a priority heap, which orders the elements according to their natu
  • Set (java.util)
    A Set is a data structure which does not allow duplicate elements.
  • Collectors (java.util.stream)
  • Filter (javax.servlet)
    A filter is an object that performs filtering tasks on either the request to a resource (a servlet o
  • Top 12 Jupyter Notebook Extensions
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