本文整理汇总了Java中com.liferay.portal.kernel.workflow.WorkflowConstants.STATUS_DENIED属性的典型用法代码示例。如果您正苦于以下问题:Java WorkflowConstants.STATUS_DENIED属性的具体用法?Java WorkflowConstants.STATUS_DENIED怎么用?Java WorkflowConstants.STATUS_DENIED使用的例子?那么, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在类com.liferay.portal.kernel.workflow.WorkflowConstants
的用法示例。
在下文中一共展示了WorkflowConstants.STATUS_DENIED属性的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: isDenied
public boolean isDenied() {
if (getStatus() == WorkflowConstants.STATUS_DENIED) {
return true;
}
else {
return false;
}
}
示例2: isDenied
@Override
public boolean isDenied() {
if (getStatus() == WorkflowConstants.STATUS_DENIED) {
return true;
}
else {
return false;
}
}
示例3: mapperEmployeeList
public static List<EmployeeModel> mapperEmployeeList(List<Document> listDocument) {
List<EmployeeModel> results = new ArrayList<>();
try {
EmployeeModel ett = null;
for (Document document : listDocument) {
ett = new EmployeeModel();
ett.setEmployeeId(Long.valueOf(document.get("entryClassPK")));
ett.setUserId(Long.valueOf(document.get(EmployeeTerm.USER_ID)));
ett.setUserName(document.get(EmployeeTerm.USER_NAME));
ett.setCreateDate(Validator.isNotNull(document.getDate(EmployeeTerm.CREATE_DATE)) ? APIDateTimeUtils
.convertDateToString(document.getDate(EmployeeTerm.CREATE_DATE), APIDateTimeUtils._TIMESTAMP)
: StringPool.BLANK);
ett.setModifiedDate(
Validator.isNotNull(document.getDate("modified")) ? APIDateTimeUtils.convertDateToString(
document.getDate("modified"), APIDateTimeUtils._TIMESTAMP) : StringPool.BLANK);
ett.setEmployeeNo(document.get(EmployeeTerm.EMPLOYEE_NO));
ett.setFullName(document.get(EmployeeTerm.FULL_NAME));
ett.setTitle(document.get(EmployeeTerm.TITLE));
ett.setGender(document.get(EmployeeTerm.GENDER));
ett.setBirthdate(document.get(EmployeeTerm.BIRTH_DATE));
ett.setTelNo(document.get(EmployeeTerm.TELNO));
ett.setMobile(document.get(EmployeeTerm.MOBILE));
ett.setEmail(document.get(EmployeeTerm.EMAIL));
ett.setWorkingStatus(document.get(EmployeeTerm.WORKING_STATUS));
ett.setBirthdate(
Validator.isNotNull(document.get(EmployeeTerm.BIRTH_DATE)) ? APIDateTimeUtils.convertDateToString(
document.getDate(EmployeeTerm.BIRTH_DATE), APIDateTimeUtils._TIMESTAMP) : StringPool.BLANK);
// TODO
ett.setPermission("read");
// mapping userID
long mappingUserId = GetterUtil.get(document.get(EmployeeTerm.MAPPING_USER_ID), 0);
User user = UserLocalServiceUtil.fetchUser(mappingUserId);
MappingUser mappingUser = new MappingUser();
if (Validator.isNotNull(user)) {
mappingUser.setUserId(user.getUserId());
mappingUser.setScreenName(user.getScreenName());
boolean lock = false;
if(user.getStatus() == WorkflowConstants.STATUS_DENIED){
lock = true;
}
mappingUser.setLocking(lock);
}
ett.getMappingUser().add(mappingUser);
// Roles
ett.setWorkingUnitName(document.get(EmployeeTerm.WORKING_UNIT_NAME));
ett.setJobPosTitle(document.get(EmployeeTerm.JOB_POS_TITLE));
results.add(ett);
}
} catch (Exception e) {
_log.error(e);
}
return results;
}
示例4: doGetDocument
@Override
protected Document doGetDocument(Employee employee) throws Exception {
Document document = getBaseModelDocument(CLASS_NAME, employee);
document.addKeywordSortable(Field.COMPANY_ID, String.valueOf(employee.getCompanyId()));
document.addDateSortable(Field.MODIFIED_DATE, employee.getModifiedDate());
document.addKeywordSortable(Field.USER_ID, String.valueOf(employee.getUserId()));
document.addKeywordSortable(Field.USER_NAME, String.valueOf(employee.getUserName()));
document.addNumberSortable(EmployeeTerm.EMPLOYEE_ID, employee.getEmployeeId());
document.addNumberSortable(EmployeeTerm.GROUP_ID, employee.getGroupId());
document.addTextSortable(EmployeeTerm.TITLE, employee.getTitle());
document.addTextSortable(EmployeeTerm.FULL_NAME, employee.getFullName());
document.addTextSortable(EmployeeTerm.EMPLOYEE_NO, employee.getEmployeeNo());
document.addNumberSortable(EmployeeTerm.GENDER, employee.getGender());
document.addDateSortable(EmployeeTerm.BIRTH_DATE, employee.getBirthdate());
document.addTextSortable(EmployeeTerm.TELNO, employee.getTelNo());
document.addTextSortable(EmployeeTerm.MOBILE, employee.getMobile());
document.addTextSortable(EmployeeTerm.EMAIL, employee.getEmail());
document.addNumberSortable(EmployeeTerm.WORKING_STATUS, employee.getWorkingStatus());
document.addNumberSortable(EmployeeTerm.MAPPING_USER_ID, employee.getMappingUserId());
document.addNumberSortable(EmployeeTerm.MAIN_JOBPOST_ID, employee.getMainJobPostId());
document.addDateSortable(EmployeeTerm.RECRUIT_DATE, employee.getRecruitDate());
document.addDateSortable(EmployeeTerm.LEAVE_DATE, employee.getLeaveDate());
EmployeeJobPos employeeJobPos = EmployeeJobPosLocalServiceUtil.fetchEmployeeJobPos(employee.getMainJobPostId());
// employee.getGroupId(), employee.getEmployeeId(), employee.getMainJobPostId());
long workingUnitId = Validator.isNotNull(employeeJobPos)?employeeJobPos.getWorkingUnitId():0;
String workingUnitName = StringPool.BLANK;
if(workingUnitId > 0){
WorkingUnit workingUnit = WorkingUnitLocalServiceUtil.fetchWorkingUnit(workingUnitId);
workingUnitName = Validator.isNotNull(workingUnit)?workingUnit.getName():StringPool.BLANK;
}
long emJobposId = Validator.isNotNull(employeeJobPos)?employeeJobPos.getJobPostId():0;
JobPos jobPos = JobPosLocalServiceUtil.fetchJobPos(emJobposId);
String jobPosTitle = Validator.isNotNull(jobPos)?jobPos.getTitle():StringPool.BLANK;
document.addTextSortable(EmployeeTerm.WORKING_UNIT_NAME, workingUnitName);
document.addNumberSortable(EmployeeTerm.WORKING_UNIT_ID, workingUnitId);
document.addTextSortable(EmployeeTerm.JOB_POS_TITLE, jobPosTitle);
document.addNumberSortable(EmployeeTerm.JOB_POS_ID, emJobposId);
Calendar cal = Calendar.getInstance();
if (Validator.isNotNull(employee.getBirthdate())) {
cal.setTime(employee.getBirthdate());
document.addNumberSortable(EmployeeTerm.MONTH, cal.get(Calendar.MONTH) + 1);
} else {
document.addNumberSortable(EmployeeTerm.MONTH, -1);
}
long userId = employee.getMappingUserId();
int status = WorkflowConstants.STATUS_DENIED;
if(userId > 0){
User user = UserLocalServiceUtil.fetchUser(userId);
status = Validator.isNotNull(user)?user.getStatus():WorkflowConstants.STATUS_DENIED;
}
document.addNumberSortable(EmployeeTerm.ACTIVE, status);
return document;
}