当前位置: 首页>>代码示例>>Java>>正文


Java User.getId方法代码示例

本文整理汇总了Java中org.activiti.engine.identity.User.getId方法的典型用法代码示例。如果您正苦于以下问题:Java User.getId方法的具体用法?Java User.getId怎么用?Java User.getId使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.activiti.engine.identity.User的用法示例。


在下文中一共展示了User.getId方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: getTaskCandidateUser

import org.activiti.engine.identity.User; //导入方法依赖的package包/类
/**
 * 获取候选用户
 *
 * @param taskId
 * @return Map names  ids
 */
@Override
public Map<String, String> getTaskCandidateUser(String taskId) {
    Set<User> users = getTaskCandidate(taskId);
    String[] names = new String[users.size()];
    String[] ids = new String[users.size()];
    Map<String, String> map = new HashMap<>();
    int i = 0;
    for (User user : users) {
        names[i] = user.getFirstName();
        ids[i] = user.getId();
        i++;
    }

    map.put("names", StrUtil.join(names));
    map.put("ids", StrUtil.join(ids));
    return map;
}
 
开发者ID:bill1012,项目名称:AdminEAP,代码行数:24,代码来源:TaskPageServiceImpl.java

示例2: setCurrentTaskInfo

import org.activiti.engine.identity.User; //导入方法依赖的package包/类
/**
 * 获取当前节点信息
 *
 * @return
 */
private void setCurrentTaskInfo(String executionId, String activityId, Map<String, Object> vars) {
    Task currentTask = taskService.createTaskQuery().executionId(executionId)
            .taskDefinitionKey(activityId).singleResult();
    logger.debug("current task for processInstance: {}", ToStringBuilder.reflectionToString(currentTask));

    if (currentTask == null) return;

    String assignee = currentTask.getAssignee();
    if (assignee != null) {
        User assigneeUser = identityService.createUserQuery().userId(assignee).singleResult();
        String userInfo = assigneeUser.getFirstName() + " " + assigneeUser.getLastName() + "/" + assigneeUser.getId();
        vars.put("当前处理人", userInfo);
        vars.put("创建时间", new SimpleDateFormat("yyyy-MM-dd hh:mm:ss").format(currentTask.getCreateTime()));
    } else {
        vars.put("任务状态", "未签收");
    }

}
 
开发者ID:shawn-gogh,项目名称:myjavacode,代码行数:24,代码来源:TraceProcessController.java

示例3: testUserPicture

import org.activiti.engine.identity.User; //导入方法依赖的package包/类
public void testUserPicture() {
  // First, create a new user
  User user = identityService.newUser("johndoe");
  identityService.saveUser(user);
  String userId = user.getId();

  Picture picture = new Picture("niceface".getBytes(), "image/string");
  identityService.setUserPicture(userId, picture);
  
  picture = identityService.getUserPicture(userId);

  // Fetch and update the user
  user = identityService.createUserQuery().userId("johndoe").singleResult();
  assertTrue("byte arrays differ", Arrays.equals("niceface".getBytes(), picture.getBytes()));
  assertEquals("image/string", picture.getMimeType());

  identityService.deleteUser(user.getId());
}
 
开发者ID:logicalhacking,项目名称:SecureBPMN,代码行数:19,代码来源:IdentityServiceTest.java

示例4: UserVo

import org.activiti.engine.identity.User; //导入方法依赖的package包/类
public UserVo(User user) {

		this.id = user.getId();
		this.firstName = user.getFirstName();
		this.lastName = user.getLastName();
		this.email = user.getEmail();
		this.password = user.getPassword();
	}
 
开发者ID:KayuraTeam,项目名称:kayura-activiti,代码行数:9,代码来源:UserVo.java

示例5: GroupMemberItem

import org.activiti.engine.identity.User; //导入方法依赖的package包/类
public GroupMemberItem(final User user) {
  // id
  Button idButton = new Button(user.getId());
  idButton.addStyleName(Reindeer.BUTTON_LINK);
  idButton.addListener(new ClickListener() {
    public void buttonClick(ClickEvent event) {
      ExplorerApp.get().getViewManager().showUserPage(user.getId());
    }
  });
  addItemProperty("id", new ObjectProperty<Button>(idButton, Button.class));
  
  // name
  if (user.getFirstName() != null) {
    addItemProperty("firstName", new ObjectProperty<String>(user.getFirstName(), String.class));
  }
  if (user.getLastName() != null) {
    addItemProperty("lastName", new ObjectProperty<String>(user.getLastName(), String.class));
  }
  
  // email
  if (user.getEmail() != null) {
    addItemProperty("email", new ObjectProperty<String>(user.getEmail(), String.class));
  }
  
  // Delete
  Embedded deleteIcon = new Embedded(null, Images.DELETE);
  deleteIcon.addStyleName(ExplorerLayout.STYLE_CLICKABLE);
  deleteIcon.addListener(new DeleteMembershipListener(identityService, user.getId(), groupId, memberShipChangeListener));
  addItemProperty("actions", new ObjectProperty<Embedded>(deleteIcon, Embedded.class));
}
 
开发者ID:logicalhacking,项目名称:SecureBPMN,代码行数:31,代码来源:GroupMembersQuery.java


注:本文中的org.activiti.engine.identity.User.getId方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。