本文整理汇总了Java中com.liferay.portal.kernel.workflow.WorkflowConstants.STATUS_PENDING属性的典型用法代码示例。如果您正苦于以下问题:Java WorkflowConstants.STATUS_PENDING属性的具体用法?Java WorkflowConstants.STATUS_PENDING怎么用?Java WorkflowConstants.STATUS_PENDING使用的例子?那么, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在类com.liferay.portal.kernel.workflow.WorkflowConstants
的用法示例。
在下文中一共展示了WorkflowConstants.STATUS_PENDING属性的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: isPending
public boolean isPending() {
if (getStatus() == WorkflowConstants.STATUS_PENDING) {
return true;
}
else {
return false;
}
}
示例2: isPending
@Override
public boolean isPending() {
if (getStatus() == WorkflowConstants.STATUS_PENDING) {
return true;
}
else {
return false;
}
}
示例3: doProcessAction
@Override
protected void doProcessAction(
ActionRequest actionRequest, ActionResponse actionResponse)
throws Exception {
ThemeDisplay themeDisplay =
(ThemeDisplay) actionRequest.getAttribute(WebKeys.THEME_DISPLAY);
HttpServletRequest request = PortalUtil.getOriginalServletRequest(
PortalUtil.getHttpServletRequest(actionRequest));
HttpServletResponse response =
PortalUtil.getHttpServletResponse(actionResponse);
String login = ParamUtil.getString(actionRequest, "login");
String password = ParamUtil.getString(actionRequest, "password");
String action = ParamUtil.getString(actionRequest, "action");
boolean rememberMe = ParamUtil.getBoolean(actionRequest, "rememberMe");
String authType = CompanyConstants.AUTH_TYPE_EA;
if (!Validator.isEmailAddress(login)) {
Applicant app = ApplicantLocalServiceUtil.fetchByAppId(login);
if (Validator.isNotNull(app)) {
login = app.getContactEmail();
}
}
Applicant applicant = UserMgtUtils.getApplicant(login);
login = applicant != null ? applicant.getContactEmail() : login;
User user = UserLocalServiceUtil.getUserByEmailAddress(
themeDisplay.getCompanyId(), login);
hideDefaultSuccessMessage(actionRequest);
if (user != null &&
user.getStatus() == WorkflowConstants.STATUS_PENDING) {
actionResponse.sendRedirect(
"/confirm-account?active_user_id=" + user.getUserId() +
"&redirectURL=" + themeDisplay.getURLCurrent());
}
else {
AuthenticatedSessionManagerUtil.login(
request, response, login, password, rememberMe, authType);
if (action != null && action.equals("confirm_account")) {
actionResponse.sendRedirect(
themeDisplay.getPortalURL() + "/profile");
}
else {
actionResponse.sendRedirect(themeDisplay.getPathMain());
}
}
}
示例4: moveDependentsToTrash
protected void moveDependentsToTrash(List<Song> songs, long trashEntryId)
throws PortalException {
for (Song song : songs) {
// Entry
if (song.isInTrash()) {
continue;
}
int oldStatus = song.getStatus();
song.setStatus(WorkflowConstants.STATUS_IN_TRASH);
songPersistence.update(song);
// Trash
int status = oldStatus;
if (oldStatus == WorkflowConstants.STATUS_PENDING) {
status = WorkflowConstants.STATUS_DRAFT;
}
if (oldStatus != WorkflowConstants.STATUS_APPROVED) {
trashVersionLocalService.addTrashVersion(
trashEntryId, Song.class.getName(), song.getSongId(),
status, null);
}
// Asset
assetEntryLocalService.updateVisible(
Song.class.getName(), song.getSongId(), false);
// Indexer
Indexer indexer = IndexerRegistryUtil.nullSafeGetIndexer(
Song.class);
indexer.reindex(song);
}
}