org.activiti.engine.identity.Group.getId()方法的使用及代码示例

x33g5p2x  于2022-01-20 转载在 其他  
字(8.7k)|赞(0)|评价(0)|浏览(95)

本文整理了Java中org.activiti.engine.identity.Group.getId()方法的一些代码示例,展示了Group.getId()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Group.getId()方法的具体详情如下:
包路径:org.activiti.engine.identity.Group
类名称:Group
方法名:getId

Group.getId介绍

暂无

代码示例

代码示例来源:origin: org.activiti/activiti-explorer

public void toolBarItemSelected() {
  viewManager.showQueuedPage(group.getId());
 }
});

代码示例来源:origin: org.ow2.petals/petals-se-activiti

@Override
public List<User> meetCriteria(final List<User> users) {
  final List<User> usersOfGroup = new ArrayList<User>();
  for (final User user : users) {
    final List<Group> groupsOfUser = this.groupsByUser.get(user.getId());
    for (final Group groupOfUser : groupsOfUser) {
      if (groupOfUser != null && this.expectedGroupId.equals(groupOfUser.getId())) {
        usersOfGroup.add(user);
        break;
      }
    }
  }
  return usersOfGroup;
}

代码示例来源:origin: org.activiti/activiti-rest

@ApiOperation(value = "Delete a group", tags = {"Groups"})
 @ApiResponses(value = {
   @ApiResponse(code = 204, message = "Indicates the group was found and  has been deleted. Response-body is intentionally empty."),
   @ApiResponse(code = 404, message = "Indicates the requested group does not exist.")
 })
 @RequestMapping(value = "/identity/groups/{groupId}", method = RequestMethod.DELETE)
 public void deleteGroup(@ApiParam(name="groupId", value="The id of the group to delete.") @PathVariable String groupId, HttpServletResponse response) {
  Group group = getGroupFromRequest(groupId);
  identityService.deleteGroup(group.getId());
  response.setStatus(HttpStatus.NO_CONTENT.value());
 }
}

代码示例来源:origin: org.activiti/activiti-rest

@ApiOperation(value = "Delete a member from a group", tags = {"Groups"})
 @ApiResponses(value = {
   @ApiResponse(code = 204, message = "Indicates the group was found and the member has been deleted. The response body is left empty intentionally."),
   @ApiResponse(code = 404, message = "Indicates the requested group was not found or that the user is not a member of the group. The status description contains additional information about the error.")
 })
 @RequestMapping(value = "/identity/groups/{groupId}/members/{userId}", method = RequestMethod.DELETE)
 public void deleteMembership(@ApiParam(name = "groupId", value="The id of the group to remove a member from.") @PathVariable("groupId") String groupId,@ApiParam(name = "userId", value="The id of the user to remove.") @PathVariable("userId") String userId, HttpServletRequest request, HttpServletResponse response) {

  Group group = getGroupFromRequest(groupId);

  // Check if user is not a member of group since API doesn't return typed
  // exception
  if (identityService.createUserQuery().memberOfGroup(group.getId()).userId(userId).count() != 1) {

   throw new ActivitiObjectNotFoundException("User '" + userId + "' is not part of group '" + group.getId() + "'.", null);
  }

  identityService.deleteMembership(userId, group.getId());
  response.setStatus(HttpStatus.NO_CONTENT.value());
 }
}

代码示例来源:origin: org.activiti/activiti-engine

protected List<String> getGroupsForCandidateUser(String candidateUser) {
 // TODO: Discuss about removing this feature? Or document it properly
 // and maybe recommend to not use it
 // and explain alternatives
 List<Group> groups = Context.getCommandContext().getGroupEntityManager().findGroupsByUser(candidateUser);
 List<String> groupIds = new ArrayList<String>();
 for (Group group : groups) {
  groupIds.add(group.getId());
 }
 return groupIds;
}

代码示例来源:origin: org.activiti/activiti-explorer

protected Set<String> getCurrentGroups() {
 Set<String> groupIds = new HashSet<String>();
 List<Group> currentGroups = identityService.createGroupQuery().groupMember(userId).list();
 for (Group group : currentGroups) {
  groupIds.add(group.getId());
 }
 return groupIds;
}

代码示例来源:origin: org.activiti/activiti-engine

protected List<String> getGroupsForCandidateUser(String candidateUser) {
 // TODO: Discuss about removing this feature? Or document it properly
 // and maybe recommend to not use it
 // and explain alternatives
 List<Group> groups = Context.getCommandContext().getGroupEntityManager().findGroupsByUser(candidateUser);
 List<String> groupIds = new ArrayList<String>();
 for (Group group : groups) {
  groupIds.add(group.getId());
 }
 return groupIds;
}

代码示例来源:origin: org.activiti/activiti-explorer

protected List<String> getGroupIds(String userId) {
 List<String> groupIds = new ArrayList<String>();
 List<Group> groups = identityService.createGroupQuery().groupMember(userId).list();
 for (Group group : groups) {
  groupIds.add(group.getId());
 }
 
 return groupIds;
}

代码示例来源:origin: com.bbossgroups.activiti/activiti-engine

protected List<String> getGroupsForCandidateUser(String candidateUser) {
 // TODO: Discuss about removing this feature? Or document it properly and maybe recommend to not use it
 // and explain alternatives
 List<Group> groups = Context
  .getCommandContext()
  .getGroupEntityManager()
  .findGroupsByUser(candidateUser);
 List<String> groupIds = new ArrayList<String>();
 for (Group group : groups) {
  groupIds.add(group.getId());
 }
 return groupIds;
}

代码示例来源:origin: org.activiti/activiti-engine

public List<String> getAuthorizationGroups() {
 // Similar behaviour as the TaskQuery.taskCandidateUser() which
 // includes the groups the candidate
 // user is part of
 if (authorizationUserId != null) {
  List<Group> groups = Context.getCommandContext().getGroupEntityManager().findGroupsByUser(authorizationUserId);
  List<String> groupIds = new ArrayList<String>();
  for (Group group : groups) {
   groupIds.add(group.getId());
  }
  return groupIds;
 }
 return null;
}

代码示例来源:origin: org.activiti/activiti-explorer

protected List<String> getGroupIds(String userId) {
 List<String> groupIds = new ArrayList<String>();
 List<Group> groups = identityService.createGroupQuery().groupMember(userId).list();
 for (Group group : groups) {
  groupIds.add(group.getId());
 }
 
 return groupIds;
}

代码示例来源:origin: org.activiti/activiti-explorer

protected String getGroupName(Group theGroup) {
 if(theGroup.getName() == null) {
  return theGroup.getId();
 }
 return group.getName();
}

代码示例来源:origin: org.activiti/activiti-explorer

protected List<String> getCurrentMembers() {
 List<User> users = identityService.createUserQuery().memberOfGroup(group.getId()).list();
 List<String> userIds = new ArrayList<String>();
 for (User user : users) {
  userIds.add(user.getId());
 }
 return userIds;
}

代码示例来源:origin: org.activiti/activiti-explorer

public void buttonClick(ClickEvent event) {
  ExplorerApp.get().getViewManager().showGroupPage(group.getId());
 }
});

代码示例来源:origin: org.activiti/activiti-rest

public GroupResponse createGroupResponse(Group group, RestUrlBuilder urlBuilder) {
 GroupResponse response = new GroupResponse();
 response.setId(group.getId());
 response.setName(group.getName());
 response.setType(group.getType());
 response.setUrl(urlBuilder.buildUrl(RestUrls.URL_GROUP, group.getId()));
 return response;
}

代码示例来源:origin: org.activiti/activiti-explorer

public GroupListItem(Group group) {
 addItemProperty("id", new ObjectProperty<String>(group.getId(), String.class));
 if (group.getName() != null) {
  addItemProperty("name", new ObjectProperty<String>(group.getName()
      + " (" + group.getName() + ")", String.class));
 } else {
  addItemProperty("name", new ObjectProperty<String>("(" + group.getId() + ")", String.class));
 }
}

代码示例来源:origin: org.apache.provisionr/activiti-karaf-commands

@Override
  protected Object doExecute() throws Exception {
    List<Group> groups = getProcessEngine().getIdentityService()
      .createGroupQuery().orderByGroupId().asc().list();

    if (groups.isEmpty()) {
      err().println("No groups found.");
    }
    for (Group group : groups) {
      out().printf("%s\t%s\t%s\n", group.getId(), group.getName(), group.getType());
    }
    return null;
  }
}

代码示例来源:origin: axemblr/axemblr-provisionr

@Override
  protected Object doExecute() throws Exception {
    List<Group> groups = getProcessEngine().getIdentityService()
      .createGroupQuery().orderByGroupId().asc().list();

    if (groups.isEmpty()) {
      err().println("No groups found.");
    }
    for (Group group : groups) {
      out().printf("%s\t%s\t%s\n", group.getId(), group.getName(), group.getType());
    }
    return null;
  }
}

代码示例来源:origin: org.activiti/activiti-explorer

protected void handleFormSubmit() {
 try {
  // create user
  form.commit(); // will throw exception in case validation is false
  Group group = createGroup();
  
  // close popup and navigate to new group
  close();
  ExplorerApp.get().getViewManager().showGroupPage(group.getId());
  
 } catch (InvalidValueException e) {
  // Do nothing: the Form component will render the errormsgs automatically
  setHeight(270, UNITS_PIXELS);
 }
}

代码示例来源:origin: org.activiti/activiti-explorer

public GroupSelectionItem(Group group) {
 addItemProperty("id", new ObjectProperty<String>(group.getId(), String.class));
 if (group.getName() != null) {
  addItemProperty("name", new ObjectProperty<String>(group.getName(), String.class));
 }
 if (group.getType() != null) {
  addItemProperty("type", new ObjectProperty<String>(group.getType(), String.class));
 }
}

相关文章

微信公众号

最新文章

更多