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


Java JournalFolder类代码示例

本文整理汇总了Java中com.liferay.portlet.journal.model.JournalFolder的典型用法代码示例。如果您正苦于以下问题:Java JournalFolder类的具体用法?Java JournalFolder怎么用?Java JournalFolder使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


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

示例1: hasJournalFolderPermission

import com.liferay.portlet.journal.model.JournalFolder; //导入依赖的package包/类
/***
 * This was taken from JournalFolderPermission which is located in
 * portal-impl. The code was shortened because we are expecting to evaluate
 * just Delete and Update actions for now.
 * 
 * @param folder
 * @return true if it has permission the given action
 */
private boolean hasJournalFolderPermission(final JournalFolder folder, final String actionId) {

    PermissionChecker permissionChecker;
    try {
        permissionChecker = getPermissionChecker();
    } catch (PrincipalException e) {
        log.error(e);
        return false;
    }

    Boolean hasPermission = StagingPermissionUtil.hasPermission(permissionChecker, folder.getGroupId(),
            JournalFolder.class.getName(), folder.getFolderId(), PortletKeys.JOURNAL, actionId);

    if (hasPermission != null) {
        return hasPermission.booleanValue();
    }
    return _hasPermission(permissionChecker, folder, actionId);
}
 
开发者ID:rivetlogic,项目名称:liferay-document-and-media-treeview,代码行数:27,代码来源:EnhancedJournalAppServiceImpl.java

示例2: WCFolder

import com.liferay.portlet.journal.model.JournalFolder; //导入依赖的package包/类
public WCFolder(JournalFolder folder) {
    this.folderId = folder.getFolderId();
    this.name = folder.getName();
    this.parentFolderId = folder.getParentFolderId();
    this.groupId = folder.getGroupId();
    this.deletePermission = false;
    this.updatePermission = false;
    this.rowCheckerId = String.valueOf(folder.getFolderId());
    this.rowCheckerName = JournalFolder.class.getSimpleName();
}
 
开发者ID:rivetlogic,项目名称:liferay-document-and-media-treeview,代码行数:11,代码来源:WCFolder.java

示例3: getFoldersAndArticles

import com.liferay.portlet.journal.model.JournalFolder; //导入依赖的package包/类
public List<Object> getFoldersAndArticles(long groupId, long folderId, int start, int end) throws SystemException {

        List<Object> items = JournalFolderServiceUtil.getFoldersAndArticles(groupId, folderId, start, end, null);

        List<Object> results = new ArrayList<Object>();

        for (Object o : items) {

            if (o instanceof JournalFolder) {
                JournalFolder folder = (JournalFolder) o;
                WCFolder wcFolder = new WCFolder(folder);
                wcFolder.setDeletePermission(hasJournalFolderPermission(folder, ActionKeys.DELETE));
                wcFolder.setUpdatePermission(hasJournalFolderPermission(folder, ActionKeys.UPDATE));
                results.add(wcFolder);
            }
            if (o instanceof JournalArticle) {
                JournalArticle article = (JournalArticle) o;
                WCArticle wcArticle = new WCArticle(article);
                wcArticle.setArticleImageURL(getArticleImageURL(article));
                wcArticle.setDeletePermission(hasJournalArticlePermission(article, ActionKeys.DELETE));
                wcArticle.setUpdatePermission(hasJournalArticlePermission(article, ActionKeys.UPDATE));
                wcArticle.setExpirePermission(hasJournalArticlePermission(article, ActionKeys.EXPIRE));
                results.add(wcArticle);
            }
        }

        return results;
    }
 
开发者ID:rivetlogic,项目名称:liferay-document-and-media-treeview,代码行数:29,代码来源:EnhancedJournalAppServiceImpl.java

示例4: _hasPermission

import com.liferay.portlet.journal.model.JournalFolder; //导入依赖的package包/类
/***
 * This function was taken from JournalFolderPermission which is located in
 * portal-impl.
 * 
 * @param permissionChecker
 * @param folder
 * @param actionId
 * @return
 */
private static boolean _hasPermission(PermissionChecker permissionChecker, JournalFolder folder, String actionId) {

    if (permissionChecker.hasOwnerPermission(folder.getCompanyId(), JournalFolder.class.getName(),
            folder.getFolderId(), folder.getUserId(), actionId)
            || permissionChecker.hasPermission(folder.getGroupId(), JournalFolder.class.getName(),
                    folder.getFolderId(), actionId)) {

        return true;
    }

    return false;
}
 
开发者ID:rivetlogic,项目名称:liferay-document-and-media-treeview,代码行数:22,代码来源:EnhancedJournalAppServiceImpl.java

示例5: getFolder

import com.liferay.portlet.journal.model.JournalFolder; //导入依赖的package包/类
@Override
public JournalFolder getFolder() throws PortalException, SystemException {
	return null;
}
 
开发者ID:liefke,项目名称:org.portletbeans,代码行数:5,代码来源:TestArticle.java

示例6: getFolder

import com.liferay.portlet.journal.model.JournalFolder; //导入依赖的package包/类
public JournalFolder getFolder() throws PortalException, SystemException {
	// TODO Auto-generated method stub
	return null;
}
 
开发者ID:DavidePastore,项目名称:liferay-journal-article-converter,代码行数:5,代码来源:MockedJournalArticle.java


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