Tabnine Logo
GroupImpl.<init>
Code IndexAdd Tabnine to your IDE (free)

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

Best Java code snippets using org.jboss.errai.security.shared.api.GroupImpl.<init> (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

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);
}
origin: kiegroup/appformer

@Test
public void testShowGroup() {
  presenter.show(new GroupImpl("group1"));
  verify(view).setHomePerspectiveSelectorEnabled(false);
  verify(view).setPrioritySelectorEnabled(false);
  verify(view).setHomePerspectiveSelector(any());
  verify(view).setPrioritySelector(any());
  verify(view).setHomePerspectiveName("HomeGroup1");
  verify(view).setHomePerspectiveTitle("HomeGroup1");
  verify(view).setPriorityName("Very Low");
}
origin: kiegroup/appformer

@Test
public void testOnOnUserGroupsUpdatedEvent() {
  OnUpdateUserGroupsEvent onUpdateUserGroupsEvent = mock(OnUpdateUserGroupsEvent.class);
  when(onUpdateUserGroupsEvent.getContext()).thenReturn(userAssignedGroupsEditor);
  final Set<Group> explorerGroups = new HashSet<Group>();
  when(userAssignedGroupsExplorer.getValue()).thenReturn(explorerGroups);
  final Set<Group> groups = new HashSet<Group>();
  groups.add(new GroupImpl("group1"));
  when(userAssignedGroupsEditor.getValue()).thenReturn(groups);
  presenter.onOnUserGroupsUpdatedEvent(onUpdateUserGroupsEvent);
  assertEquals(groups,
         userAssignedGroupsExplorer.getValue());
  verify(userAssignedGroupsEditor,
      times(1)).flush();
  verify(userAssignedGroupsExplorer,
      times(1)).doShow();
  assertNoViewCalls();
}
origin: kiegroup/appformer

@Test
public void testResolvePermissionsCustomDeniedOverDefaultGranted() {
  final VotingStrategy priority = VotingStrategy.PRIORITY;
  final Role businessUserRole = new RoleImpl("business-user");
  final Group directorGroup = new GroupImpl("director");
  // Users have a group with their names by default
  final User user = makeUser("director", directorGroup, businessUserRole);
  mockDefaultPermissions(authorizationPolicy,
              makeGrantedPermissionCollection());
  mockRolePermissions(authorizationPolicy,
            makeDeniedPermissionCollection(),
            businessUserRole,
            0);
  mockDefaultGroupPermissions(authorizationPolicy,
                makeGrantedPermissionCollection(),
                directorGroup);
  final PermissionCollection resolvedPermission = defaultPermissionManager.resolvePermissions(user, priority);
  final Permission permission = resolvedPermission.get(PERMISSION_NAME);
  assertEquals(AuthorizationResult.ACCESS_DENIED, permission.getResult());
}
origin: org.uberfire/uberfire-security-api

@Test
public void testResolvePermissionsCustomDeniedOverDefaultGranted() {
  final VotingStrategy priority = VotingStrategy.PRIORITY;
  final Role businessUserRole = new RoleImpl("business-user");
  final Group directorGroup = new GroupImpl("director");
  // Users have a group with their names by default
  final User user = makeUser("director", directorGroup, businessUserRole);
  mockDefaultPermissions(authorizationPolicy,
              makeGrantedPermissionCollection());
  mockRolePermissions(authorizationPolicy,
            makeDeniedPermissionCollection(),
            businessUserRole,
            0);
  mockDefaultGroupPermissions(authorizationPolicy,
                makeGrantedPermissionCollection(),
                directorGroup);
  final PermissionCollection resolvedPermission = defaultPermissionManager.resolvePermissions(user, priority);
  final Permission permission = resolvedPermission.get(PERMISSION_NAME);
  assertEquals(AuthorizationResult.ACCESS_DENIED, permission.getResult());
}
org.jboss.errai.security.shared.apiGroupImpl<init>

Popular methods of GroupImpl

    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 17 Plugins for Android Studio
    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