本文整理汇总了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;
}
示例2: isApproved
public boolean isApproved() {
if (getStatus() == WorkflowConstants.STATUS_APPROVED) {
return true;
}
else {
return false;
}
}
示例3: isActive
public boolean isActive() {
if (status == WorkflowConstants.STATUS_APPROVED) {
return true;
}
else {
return false;
}
}
示例4: isApproved
@Override
public boolean isApproved() {
if (getStatus() == WorkflowConstants.STATUS_APPROVED) {
return true;
}
else {
return false;
}
}
示例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);
}
示例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);
}
示例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;
}
示例8: getExportableStatuses
@Override
public int[] getExportableStatuses() {
return new int[] {WorkflowConstants.STATUS_APPROVED};
}
示例9: buildStatusCondition
/**
* Add status condition.
*/
protected void buildStatusCondition() {
// Set to approved only
int status = WorkflowConstants.STATUS_APPROVED;
_filter.addRequiredTerm(Field.STATUS, status);
}
示例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);
}
}
示例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);
}
}
示例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);
}