[英]How do I get a Scope value in LIferay
我在liferay的portlet MVC類中有以下調用:
ResourcePermissionServiceUtil.addResourcePermission(
themeDisplay.getScopeGroupId(),
themeDisplay.getCompanyId(),
FileEntry.class.getName(),
??, //scope int value... how do I get this??
Long.toString( fileEntry.getPrimaryKey()),
RoleServiceUtil.getRole(themeDisplay.getCompanyId(), "Guest").getPrimaryKey(),
ActionKeys.VIEW);
我想知道如何獲得范圍值。 最好是一個全局范圍值。
就您而言,您必須使用ResourceConstants.SCOPE_INDIVIDUAL
答案是liferay中的ResourceConstants。
ResourceConstants.SCOPE_COMPANY
當然還有其他范圍,但這是容納常量的對象。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.