本文整理汇总了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();
}
示例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;
}
示例6: getFolder
import com.liferay.portlet.journal.model.JournalFolder; //导入依赖的package包/类
public JournalFolder getFolder() throws PortalException, SystemException {
// TODO Auto-generated method stub
return null;
}