List of usage examples for com.liferay.portal.kernel.theme PortletDisplay isWebDAVEnabled
public boolean isWebDAVEnabled()
From source file:com.liferay.document.library.web.internal.display.context.logic.UIItemsBuilder.java
License:Open Source License
private boolean _isWebDAVEnabled() { PortletDisplay portletDisplay = _themeDisplay.getPortletDisplay(); return portletDisplay.isWebDAVEnabled(); }
From source file:com.liferay.document.library.web.internal.portlet.configuration.icon.AccessFromDesktopPortletConfigurationIcon.java
License:Open Source License
@Override public boolean isShow(PortletRequest portletRequest) { try {/*from w w w.java 2 s.com*/ ThemeDisplay themeDisplay = (ThemeDisplay) portletRequest.getAttribute(WebKeys.THEME_DISPLAY); PortletDisplay portletDisplay = themeDisplay.getPortletDisplay(); long folderId = DLFolderConstants.DEFAULT_PARENT_FOLDER_ID; Folder folder = ActionUtil.getFolder(portletRequest); if (folder != null) { folderId = folder.getFolderId(); } if (DLFolderPermission.contains(themeDisplay.getPermissionChecker(), themeDisplay.getScopeGroupId(), folderId, ActionKeys.VIEW) && portletDisplay.isWebDAVEnabled() && ((folder == null) || (folder.getRepositoryId() == themeDisplay.getScopeGroupId()))) { return true; } } catch (Exception e) { } return false; }