List of usage examples for com.liferay.portal.kernel.security.permission ActionKeys DELETE
String DELETE
To view the source code for com.liferay.portal.kernel.security.permission ActionKeys DELETE.
Click Source Link
From source file:ca.efendi.datafeeds.web.asset.CJProductAssetRenderer.java
License:Apache License
public boolean hasDeletePermission(PermissionChecker permissionChecker) { return CJProductPermission.contains(permissionChecker, _entry, ActionKeys.DELETE); }
From source file:com.bemis.portal.report.service.impl.ReportDefinitionServiceImpl.java
License:Open Source License
@Override public ReportDefinition deleteReportDefinition(long reportDefinitionId) throws PortalException { ReportDefinition reportDefinition = reportDefinitionLocalService.fetchReportDefinition(reportDefinitionId); ReportDefinitionEntryPermissionCheckerUtil.checkBaseModel(getPermissionChecker(), reportDefinition.getGroupId(), reportDefinition.getReportDefinitionId(), ActionKeys.DELETE); return reportDefinitionLocalService.deleteReportDefinition(reportDefinition); }
From source file:com.bemis.portal.report.service.impl.ReportDefinitionServiceImpl.java
License:Open Source License
@Override public ReportDefinition deleteReportDefinition(ReportDefinition reportDefinition) throws PortalException { ReportDefinitionEntryPermissionCheckerUtil.checkBaseModel(getPermissionChecker(), reportDefinition.getGroupId(), reportDefinition.getReportDefinitionId(), ActionKeys.DELETE); return reportDefinitionLocalService.deleteReportDefinition(reportDefinition); }
From source file:com.bemis.portal.report.service.impl.ReportDefinitionServiceImpl.java
License:Open Source License
@Override public ReportDefinition updateReportDefinition(long reportDefinitionId, String category, Map<Locale, String> titleMap, Map<Locale, String> descriptionMap, String urlPath, Set<String> availableFields, Set<String> defaultSelectedFields, Set<String> sortFields, ServiceContext serviceContext) throws PortalException { ReportDefinition reportDefinition = reportDefinitionLocalService.fetchReportDefinition(reportDefinitionId); ReportDefinitionEntryPermissionCheckerUtil.checkBaseModel(getPermissionChecker(), reportDefinition.getGroupId(), reportDefinition.getReportDefinitionId(), ActionKeys.DELETE); return reportDefinitionLocalService.updateReportDefinition(reportDefinitionId, category, titleMap, descriptionMap, urlPath, availableFields, defaultSelectedFields, sortFields, serviceContext); }
From source file:com.bemis.portal.report.service.impl.ReportRequestServiceImpl.java
License:Open Source License
@Override public ReportRequest deleteReportRequest(long reportRequestId) throws PortalException { ReportRequest reportRequest = reportRequestLocalService.getReportRequest(reportRequestId); ReportRequestEntryPermissionCheckerUtil.checkBaseModel(getPermissionChecker(), reportRequest.getGroupId(), reportRequestId, ActionKeys.DELETE); return reportRequestLocalService.deleteReportRequest(reportRequest); }
From source file:com.bemis.portal.report.service.impl.ReportRequestServiceImpl.java
License:Open Source License
@Override public ReportRequest deleteReportRequest(ReportRequest reportRequest) throws PortalException { ReportRequestEntryPermissionCheckerUtil.checkBaseModel(getPermissionChecker(), reportRequest.getGroupId(), reportRequest.getReportRequestId(), ActionKeys.DELETE); return reportRequestLocalService.deleteReportRequest(reportRequest); }
From source file:com.liferay.announcements.web.internal.portlet.configuration.icon.DeleteEntryPortletConfigurationIcon.java
License:Open Source License
@Override public boolean isShow(PortletRequest portletRequest) { try {/*from w w w .ja va2 s.c o m*/ ThemeDisplay themeDisplay = (ThemeDisplay) portletRequest.getAttribute(WebKeys.THEME_DISPLAY); AnnouncementsEntry entry = ActionUtil.getEntry(portletRequest); return AnnouncementsEntryPermission.contains(themeDisplay.getPermissionChecker(), entry, ActionKeys.DELETE); } catch (PortalException pe) { throw new RuntimeException(pe); } }
From source file:com.liferay.announcements.web.internal.search.AnnouncementsEntryChecker.java
License:Open Source License
@Override public String getRowCheckBox(HttpServletRequest request, boolean checked, boolean disabled, String primaryKey) { long entryId = GetterUtil.getLong(primaryKey); AnnouncementsEntry entry = null;/* w w w . j a v a 2 s .c o m*/ try { entry = AnnouncementsEntryLocalServiceUtil.getEntry(entryId); } catch (PortalException pe) { // LPS-52675 if (_log.isDebugEnabled()) { _log.debug(pe, pe); } return StringPool.BLANK; } String name = AnnouncementsEntry.class.getSimpleName(); boolean showInput = false; try { if (AnnouncementsEntryPermission.contains(_permissionChecker, entry, ActionKeys.DELETE)) { showInput = true; if (!showInput) { return StringPool.BLANK; } } } catch (PortalException pe) { // LPS-52675 if (_log.isDebugEnabled()) { _log.debug(pe, pe); } return StringPool.BLANK; } StringBundler sb = new StringBundler(5); sb.append("['"); sb.append(_liferayPortletResponse.getNamespace()); sb.append(RowChecker.ROW_IDS); sb.append(AnnouncementsEntry.class.getSimpleName()); sb.append("']"); String checkBoxRowIds = sb.toString(); String checkBoxAllRowIds = "'#" + getAllRowIds() + "'"; return getRowCheckBox(request, checked, disabled, _liferayPortletResponse.getNamespace() + RowChecker.ROW_IDS + name, primaryKey, checkBoxRowIds, checkBoxAllRowIds, StringPool.BLANK); }
From source file:com.liferay.asset.categories.admin.web.internal.portlet.configuration.icon.DeleteAssetCategoryPortletConfigurationIcon.java
License:Open Source License
@Override public boolean isShow(PortletRequest portletRequest) { HttpServletRequest request = _portal.getHttpServletRequest(portletRequest); AssetCategoriesDisplayContext assetCategoriesDisplayContext = new AssetCategoriesDisplayContext(null, null, request);/*w ww . j a v a2s.co m*/ AssetCategory category = assetCategoriesDisplayContext.getCategory(); if (Validator.isNull(category)) { return false; } try { return assetCategoriesDisplayContext.hasPermission(category, ActionKeys.DELETE); } catch (PortalException pe) { if (_log.isDebugEnabled()) { _log.debug(pe, pe); } } return false; }
From source file:com.liferay.asset.display.template.service.impl.AssetDisplayTemplateServiceImpl.java
License:Open Source License
@Override public AssetDisplayTemplate deleteAssetDisplayTemplate(long assetDisplayTemplateId) throws PortalException { _assetDisplayTemplateModelResourcePermission.check(getPermissionChecker(), assetDisplayTemplateId, ActionKeys.DELETE); return assetDisplayTemplateLocalService.deleteAssetDisplayTemplate(assetDisplayTemplateId); }