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


Java WorkflowConstants.getStatusLabel方法代码示例

本文整理汇总了Java中com.liferay.portal.kernel.workflow.WorkflowConstants.getStatusLabel方法的典型用法代码示例。如果您正苦于以下问题:Java WorkflowConstants.getStatusLabel方法的具体用法?Java WorkflowConstants.getStatusLabel怎么用?Java WorkflowConstants.getStatusLabel使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在com.liferay.portal.kernel.workflow.WorkflowConstants的用法示例。


在下文中一共展示了WorkflowConstants.getStatusLabel方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: _getOnclick

import com.liferay.portal.kernel.workflow.WorkflowConstants; //导入方法依赖的package包/类
private String _getOnclick()
{

	PortletURL portletURL = PortletURLFactoryUtil.create(
		request, "blade_document_action_portlet_BladeDocumentActionPortlet",
		_themeDisplay.getPlid(), PortletRequest.RENDER_PHASE);

	String fileName = fileVersion.getFileName();
	String mimeType = fileVersion.getMimeType();
	String version = fileVersion.getVersion();
	String createdDate = fileVersion.getCreateDate().toString();
	String createdUserName = fileVersion.getUserName();
	String statusLabel = WorkflowConstants.getStatusLabel(
		fileVersion.getStatus());

	portletURL.setParameter("fileName", fileName);
	portletURL.setParameter("mimeType", mimeType);
	portletURL.setParameter("version", version);
	portletURL.setParameter("statusLabel", statusLabel);
	portletURL.setParameter("createdDate", createdDate);
	portletURL.setParameter("createdUserName", createdUserName);

	try {
		portletURL.setWindowState(LiferayWindowState.POP_UP);
	}
	catch (WindowStateException wse) {
		_log.error(wse);
	}

	StringBuilder stringBuilder = new StringBuilder();

	stringBuilder.append("Liferay.Util.openWindow({");
	stringBuilder.append("dialog: {cache: false,width:800,modal: true},");
	stringBuilder.append("title: 'basic information',id: ");
	stringBuilder.append("'testPopupIdUnique',uri: '");
	stringBuilder.append(portletURL.toString() + "'});");

	return stringBuilder.toString();
}
 
开发者ID:liferay,项目名称:liferay-blade-samples,代码行数:40,代码来源:BladeActionDisplayContext.java

示例2: getURL

import com.liferay.portal.kernel.workflow.WorkflowConstants; //导入方法依赖的package包/类
public String getURL(
	PortletRequest portletRequest, PortletResponse portletResponse) {

	HttpServletRequest servletRequest = _portal.getHttpServletRequest(
		portletRequest);

	ThemeDisplay themeDisplay = (ThemeDisplay)portletRequest.getAttribute(
		WebKeys.THEME_DISPLAY);

	FileEntry fileEntry = _retrieveFile(servletRequest);

	PortletURL portletURL = PortletURLFactoryUtil.create(
		servletRequest,
		"blade_document_action_portlet_BladeDocumentActionPortlet",
		themeDisplay.getPlid(), PortletRequest.RENDER_PHASE);

	String fileName = fileEntry.getFileName();
	String mimeType = fileEntry.getMimeType();
	String version = fileEntry.getVersion();
	String createdDate = fileEntry.getCreateDate().toString();
	String createdUserName = fileEntry.getUserName();
	String statusLabel = null;

	try {
		statusLabel = WorkflowConstants.getStatusLabel(
			fileEntry.getLatestFileVersion().getStatus());
	}
	catch (PortalException pe) {
		_log.error(pe);
	}

	portletURL.setParameter("fileName", fileName);
	portletURL.setParameter("mimeType", mimeType);
	portletURL.setParameter("version", version);
	portletURL.setParameter("statusLabel", statusLabel);
	portletURL.setParameter("createdDate", createdDate);
	portletURL.setParameter("createdUserName", createdUserName);

	try {
		portletURL.setWindowState(LiferayWindowState.POP_UP);
	}
	catch (WindowStateException wse) {
		_log.error(wse);
	}

	StringBuilder stringBuilder = new StringBuilder();

	stringBuilder.append("javascript:Liferay.Util.openWindow(");
	stringBuilder.append("{dialog: {cache: false,width:800,modal: true},");
	stringBuilder.append("title: 'basic information',id: ");
	stringBuilder.append("'testPopupIdUnique',uri: '");
	stringBuilder.append(portletURL.toString() + "'});");

	return stringBuilder.toString();
}
 
开发者ID:liferay,项目名称:liferay-blade-samples,代码行数:56,代码来源:BladeActionConfigurationIcon.java


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