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


Java WorkflowConstants.STATUS_PENDING属性代码示例

本文整理汇总了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;
	}
}
 
开发者ID:TelefonicaED,项目名称:liferaylms-portlet,代码行数:8,代码来源:LearningActivityClp.java

示例2: isPending

@Override
public boolean isPending() {
	if (getStatus() == WorkflowConstants.STATUS_PENDING) {
		return true;
	}
	else {
		return false;
	}
}
 
开发者ID:juliocamarero,项目名称:jukebox-portlet,代码行数:9,代码来源:ArtistClp.java

示例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());
		}
	}

}
 
开发者ID:VietOpenCPS,项目名称:opencps-v2,代码行数:59,代码来源:LoginMVCActionCommand.java

示例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);
	}
}
 
开发者ID:juliocamarero,项目名称:jukebox-portlet,代码行数:44,代码来源:AlbumLocalServiceImpl.java


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