本文整理汇总了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;
}
示例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("任务状态", "未签收");
}
}
示例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());
}
示例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();
}
示例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));
}