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


Java WorkflowConstants.STATUS_APPROVED属性代码示例

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


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

示例1: _getFolderNameIdPairs

private List<KeyValuePair> _getFolderNameIdPairs(long groupId)
	throws SystemException {

	List<BookmarksFolder> folders =
		BookmarksFolderLocalServiceUtil.getFolders(
			groupId, BookmarksFolderConstants.DEFAULT_PARENT_FOLDER_ID);

	List<KeyValuePair> folderNameIdPairs = new ArrayList<KeyValuePair>();

	folderNameIdPairs.add(
		new KeyValuePair(
			"",
			String.valueOf(
				BookmarksFolderConstants.DEFAULT_PARENT_FOLDER_ID)));

	for (BookmarksFolder folder : folders) {
		String folderId = String.valueOf(folder.getFolderId());
		String folderName = folder.getName();

		try {
			Method method = BookmarksFolder.class.getMethod(
				"getStatus", new Class<?>[0]);

			Object status = method.invoke(
				BookmarksFolder.class, new Object[0]);

			if ((Integer)status != WorkflowConstants.STATUS_APPROVED) {
				continue;
			}
		}
		catch (Exception e) {
		}

		folderNameIdPairs.add(new KeyValuePair(folderName, folderId));
	}

	return folderNameIdPairs;
}
 
开发者ID:sorin-pop,项目名称:data-manipulator,代码行数:38,代码来源:BookmarkFolderHandler.java

示例2: isApproved

public boolean isApproved() {
	if (getStatus() == WorkflowConstants.STATUS_APPROVED) {
		return true;
	}
	else {
		return false;
	}
}
 
开发者ID:TelefonicaED,项目名称:liferaylms-portlet,代码行数:8,代码来源:LearningActivityClp.java

示例3: isActive

public boolean isActive() {
	if (status == WorkflowConstants.STATUS_APPROVED) {
		return true;
	}
	else {
		return false;
	}
}
 
开发者ID:TelefonicaED,项目名称:liferaylms-portlet,代码行数:8,代码来源:UserDisplayTerms.java

示例4: isApproved

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

示例5: getSongsByAlbumId

public List<Song> getSongsByAlbumId(
	long groupId, long albumId, int status) {

	if (status == WorkflowConstants.STATUS_APPROVED) {
		return songPersistence.filterFindByG_A(groupId, albumId);
	}

	return songPersistence.filterFindByG_A_S(groupId, albumId, status);
}
 
开发者ID:juliocamarero,项目名称:jukebox-portlet,代码行数:9,代码来源:SongServiceImpl.java

示例6: getSongsCountByAlbumId

public int getSongsCountByAlbumId(long groupId, long albumId, int status) {
	if (status == WorkflowConstants.STATUS_APPROVED) {
		return songPersistence.filterCountByG_A(groupId, albumId);
	}

	return songPersistence.filterCountByG_A_S(groupId, albumId, status);
}
 
开发者ID:juliocamarero,项目名称:jukebox-portlet,代码行数:7,代码来源:SongServiceImpl.java

示例7: getMBSubCategories

/**
 * Method that get subcategories of particular category
 */
public static List<Object> getMBSubCategories(HttpServletRequest request,long selectedCategoryId){
	_log.debug("Entry : getMBSubCategories");
	List<Object> subCategoryList=new ArrayList<>();
	ThemeDisplay themeDisplay = (ThemeDisplay)request.getAttribute(WebKeys.THEME_DISPLAY);
	PortletPreferences preferences = PortletPreferencesFactoryUtil.getLayoutPortletSetup(themeDisplay.getLayout(), CustomConstants.MESSAGE_BOARDS);
	long preferenceCatId=GetterUtil.getLong(preferences.getValue(CustomConstants.PREFERENCE_CATEGORYID, String.valueOf(QueryUtil.ALL_POS)));
	long mbcatID=ParamUtil.getLong(request, "mbCategoryId");
	if(mbcatID !=CustomConstants.ZERO_INDEX){
		selectedCategoryId=mbcatID;
	}
	ParamUtil.getString(request, "mbCategoryId");
	int status = WorkflowConstants.STATUS_APPROVED;
	PermissionChecker permissionChecker =
			themeDisplay.getPermissionChecker();

		if (permissionChecker.isContentReviewer(
				themeDisplay.getCompanyId(),
				themeDisplay.getScopeGroupId())) {

			status = WorkflowConstants.STATUS_ANY;
		}
	subCategoryList= MBCategoryLocalServiceUtil.getCategoriesAndThreads(themeDisplay.getScopeGroupId(), selectedCategoryId, status, QueryUtil.ALL_POS, QueryUtil.ALL_POS);
		_log.debug("List Size:=>"+subCategoryList.size());
	return subCategoryList;
	
}
 
开发者ID:Azilen,项目名称:Discussion-Board-Liferay,代码行数:29,代码来源:CustomThreadCategoryList.java

示例8: getExportableStatuses

@Override
public int[] getExportableStatuses() {
	return new int[] {WorkflowConstants.STATUS_APPROVED};
}
 
开发者ID:juliocamarero,项目名称:jukebox-portlet,代码行数:4,代码来源:AlbumStagedModelDataHandler.java

示例9: buildStatusCondition

/**
 * Add status condition.
 */
protected void buildStatusCondition() {

	// Set to approved only

	int status = WorkflowConstants.STATUS_APPROVED;

	_filter.addRequiredTerm(Field.STATUS, status);
}
 
开发者ID:peerkar,项目名称:liferay-gsearch,代码行数:11,代码来源:QueryFilterBuilderImpl.java

示例10: 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

示例11: restoreDependentsFromTrash

protected void restoreDependentsFromTrash(
		List<Song> songs, long trashEntryId)
	throws PortalException {

	for (Song song : songs) {

		// Song

		TrashEntry trashEntry = trashEntryLocalService.fetchEntry(
			Song.class.getName(), song.getSongId());

		if (trashEntry != null) {
			continue;
		}

		TrashVersion trashVersion = trashVersionLocalService.fetchVersion(
			trashEntryId, Song.class.getName(), song.getSongId());

		int oldStatus = WorkflowConstants.STATUS_APPROVED;

		if (trashVersion != null) {
			oldStatus = trashVersion.getStatus();
		}

		song.setStatus(oldStatus);

		songPersistence.update(song);

		// Trash

		if (trashVersion != null) {
			trashVersionLocalService.deleteTrashVersion(trashVersion);
		}

		// Asset

		if (oldStatus == WorkflowConstants.STATUS_APPROVED) {
			assetEntryLocalService.updateVisible(
				Song.class.getName(), song.getSongId(), true);
		}

		// Indexer

		Indexer indexer = IndexerRegistryUtil.nullSafeGetIndexer(
			Song.class);

		indexer.reindex(song);
	}
}
 
开发者ID:juliocamarero,项目名称:jukebox-portlet,代码行数:49,代码来源:AlbumLocalServiceImpl.java

示例12: moveSongFromTrash

@Override
public Song moveSongFromTrash(long userId, long songId, long albumId)
	throws PortalException {

	Song song = getSong(songId);

	TrashEntry trashEntry = song.getTrashEntry();

	if (trashEntry.isTrashEntry(Song.class, songId)) {
		restoreSongFromTrash(userId, songId);
	}
	else {

		// Entry

		TrashVersion trashVersion =
			trashVersionLocalService.fetchVersion(
				trashEntry.getEntryId(), Song.class.getName(), songId);

		int status = WorkflowConstants.STATUS_APPROVED;

		if (trashVersion != null) {
			status = trashVersion.getStatus();
		}

		ServiceContext serviceContext = new ServiceContext();

		// Entry

		User user = userPersistence.findByPrimaryKey(userId);
		Date now = new Date();

		song.setModifiedDate(serviceContext.getModifiedDate(now));
		song.setStatus(status);
		song.setStatusByUserId(user.getUserId());
		song.setStatusByUserName(user.getFullName());
		song.setStatusDate(serviceContext.getModifiedDate(now));

		songPersistence.update(song);

		// Asset

		assetEntryLocalService.updateVisible(
			Song.class.getName(), song.getSongId(), false);

		// Indexer

		Indexer indexer = IndexerRegistryUtil.nullSafeGetIndexer(
			Song.class);

		indexer.reindex(song);

		// Trash

		if (trashVersion != null) {
			trashVersionLocalService.deleteTrashVersion(trashVersion);
		}
	}

	return songLocalService.moveSong(songId, albumId);
}
 
开发者ID:juliocamarero,项目名称:jukebox-portlet,代码行数:61,代码来源:SongLocalServiceImpl.java


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