Package org.camunda.bpm.engine.identity

Examples of org.camunda.bpm.engine.identity.Group


   
    assertEquals(5, groupList.size());
  }
 
  public void testFilterByGroupId() {
    Group group = identityService.createGroupQuery().groupId("management").singleResult();
    assertNotNull(group);
   
    // validate result
    assertEquals("management", group.getId());
    assertEquals("management", group.getName());
   
    group = identityService.createGroupQuery().groupId("whatever").singleResult();
    assertNull(group);
  }
View Full Code Here


    group = identityService.createGroupQuery().groupId("whatever").singleResult();
    assertNull(group);
  }
 
  public void testFilterByGroupName() {
    Group group = identityService.createGroupQuery().groupName("management").singleResult();
    assertNotNull(group);
   
    // validate result
    assertEquals("management", group.getId());
    assertEquals("management", group.getName());
   
    group = identityService.createGroupQuery().groupName("whatever").singleResult();
    assertNull(group);
  }
View Full Code Here

    group = identityService.createGroupQuery().groupName("whatever").singleResult();
    assertNull(group);
  }
 
  public void testFilterByGroupNameLike() {
    Group group = identityService.createGroupQuery().groupNameLike("manage*").singleResult();
    assertNotNull(group);
   
    // validate result
    assertEquals("management", group.getId());
    assertEquals("management", group.getName());
   
    group = identityService.createGroupQuery().groupNameLike("what*").singleResult();
    assertNull(group);
  }
View Full Code Here

  protected Group group1;

  @Before
  public void setUp() {
    group1 = createGroup("group1");
    Group group2 = createGroup("group2");
    Group group3 = createGroup("group3");

    user = createUser("user", group1.getId(), group2.getId());
    anotherUser = createUser("anotherUser", group3.getId());
    userWithoutGroups = createUser("userWithoutGroups");

    task = createTestTask("task");
    // shift time to force distinguishable create times
    adjustTime(2 * 60);
 
View Full Code Here

    identityService.setAuthentication(user.getId(), groupIds);
  }

  protected Group createGroup(String groupId) {
    Group group = identityService.newGroup(groupId);
    identityService.saveGroup(group);
    return group;
  }
View Full Code Here

    testGroup = identityService.newGroup("group");
    identityService.saveUser(testUser);
    identityService.saveGroup(testGroup);
    identityService.createMembership(testUser.getId(), testGroup.getId());

    Group anotherGroup = identityService.newGroup("anotherGroup");
    identityService.saveGroup(anotherGroup);
    testCandidateGroups.add(testGroup.getId());
    testCandidateGroups.add(anotherGroup.getId());

    createTasks();

    queryConverter = new JsonTaskQueryConverter();
  }
View Full Code Here

      assertTextPresent("userId and groupId cannot both be null", ae.getMessage());
    }
  }

  public void testAddCandidateGroupUnexistingTask() {
    Group group = identityService.newGroup("group");
    identityService.saveGroup(group);
    try {
      taskService.addCandidateGroup("unexistingTaskId", group.getId());
      fail("ProcessEngineException expected");
    } catch (ProcessEngineException ae) {
      assertTextPresent("Cannot find task with id unexistingTaskId", ae.getMessage());
    }
    identityService.deleteGroup(group.getId());
  }
View Full Code Here

    this.rootResourcePath = rootResourcePath;
  }

  public GroupDto getGroup(UriInfo context) {

    Group dbGroup = findGroupObject();
    if(dbGroup == null) {
      throw new InvalidRequestException(Status.NOT_FOUND, "Group with id " + resourceId + " does not exist");
    }

    GroupDto group = GroupDto.fromGroup(dbGroup);
View Full Code Here


  public void updateGroup(GroupDto group) {
    ensureNotReadOnly();

    Group dbGroup = findGroupObject();
    if(dbGroup == null) {
      throw new InvalidRequestException(Status.NOT_FOUND, "Group with id " + resourceId + " does not exist");
    }

    group.update(dbGroup);
View Full Code Here

    if(identityService.isReadOnly()) {
      throw new InvalidRequestException(Status.FORBIDDEN, "Identity service implementation is read-only.");
    }

    Group newGroup = identityService.newGroup(groupDto.getId());
    groupDto.update(newGroup);
    identityService.saveGroup(newGroup);

  }
View Full Code Here

TOP

Related Classes of org.camunda.bpm.engine.identity.Group

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.