本文整理汇总了Java中org.activiti.engine.identity.User.getLastName方法的典型用法代码示例。如果您正苦于以下问题:Java User.getLastName方法的具体用法?Java User.getLastName怎么用?Java User.getLastName使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.activiti.engine.identity.User
的用法示例。
在下文中一共展示了User.getLastName方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: 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("任务状态", "未签收");
}
}
示例2: setCurrentTaskAssignee
import org.activiti.engine.identity.User; //导入方法依赖的package包/类
/**
* 设置当前处理人信息
*
* @param vars
* @param currentTask
*/
private void setCurrentTaskAssignee(Map<String, Object> vars, Task currentTask) {
String assignee = currentTask.getAssignee();
if (assignee != null) {
User assigneeUser = identityService.createUserQuery().userId(assignee).singleResult();
String userInfo = assigneeUser.getFirstName() + " " + assigneeUser.getLastName();
vars.put("当前处理人", userInfo);
}
}
示例3: 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();
}
示例4: initUserLink
import org.activiti.engine.identity.User; //导入方法依赖的package包/类
protected void initUserLink(final String userId) {
User user = userCache.findUser(userId);
Button userButton = new Button(user.getFirstName() + " " + user.getLastName());
ClickListener buttonClickListener = new ClickListener() {
public void buttonClick(ClickEvent event) {
viewManager.showProfilePopup(userId);
}
};
userButton.addStyleName(Reindeer.BUTTON_LINK);
userButton.addListener(buttonClickListener);
addComponent(userButton);
setComponentAlignment(userButton, Alignment.MIDDLE_LEFT);
}
示例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));
}
示例6: getEventMessage
import org.activiti.engine.identity.User; //导入方法依赖的package包/类
private String getEventMessage(Event event) {
String result = "";
User user = userCache.findUser(event.getUserId());
User involvedUser = userCache.findUser(event.getMessageParts().get(0));
if (TaskInvolvedPeopleComponent.returnDelegationType == "") {
result = user.getFirstName() + " " + user.getLastName() + " executed a " + TaskInvolvedPeopleComponent.lastDelegationType + " on the task " + taskService.createTaskQuery().taskId(event.getTaskId()).singleResult().getName() + ". Assignee is now: " + involvedUser.getFirstName() + " " + involvedUser.getLastName();
return result;
} else {
result = user.getFirstName() + " " + user.getLastName() + " returned a " + TaskInvolvedPeopleComponent.lastDelegationType + " for the task " + taskService.createTaskQuery().taskId(event.getTaskId()).singleResult().getName() + ". Assignee is now: " + involvedUser.getFirstName() + " " + involvedUser.getLastName();
return result;
}
}
示例7: getKeys
import org.activiti.engine.identity.User; //导入方法依赖的package包/类
protected String[] getKeys(User user) {
String fullname = "";
if (user.getFirstName() != null) {
fullname += user.getFirstName();
}
if (user.getLastName() != null) {
fullname += " " + user.getLastName();
}
return fullname.split(" ");
}