com.liferay.portlet.documentlibrary.util.DLUtil Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of portal-service Show documentation
Show all versions of portal-service Show documentation
Contains interfaces for the portal services. Interfaces are only loaded by the global class loader and are shared by all plugins.
/**
* Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
*
* This library is free software; you can redistribute it and/or modify it under
* the terms of the GNU Lesser General Public License as published by the Free
* Software Foundation; either version 2.1 of the License, or (at your option)
* any later version.
*
* This library is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
* details.
*/
package com.liferay.portlet.documentlibrary.util;
import com.liferay.portal.kernel.exception.PortalException;
import com.liferay.portal.kernel.exception.SystemException;
import com.liferay.portal.kernel.portlet.LiferayPortletResponse;
import com.liferay.portal.kernel.repository.model.FileEntry;
import com.liferay.portal.kernel.repository.model.FileVersion;
import com.liferay.portal.kernel.repository.model.Folder;
import com.liferay.portal.kernel.search.Hits;
import com.liferay.portal.kernel.security.pacl.permission.PortalRuntimePermission;
import com.liferay.portal.kernel.util.OrderByComparator;
import com.liferay.portal.theme.ThemeDisplay;
import com.liferay.portlet.documentlibrary.model.DLFileEntryType;
import com.liferay.portlet.documentlibrary.model.DLFileShortcut;
import java.util.List;
import java.util.Locale;
import java.util.Map;
import java.util.Set;
import javax.portlet.PortletPreferences;
import javax.portlet.PortletRequest;
import javax.portlet.PortletURL;
import javax.portlet.RenderResponse;
import javax.servlet.http.HttpServletRequest;
/**
* @author Brian Wing Shun Chan
* @author Julio Camarero
*/
public class DLUtil {
public static void addPortletBreadcrumbEntries(
DLFileShortcut dlFileShortcut, HttpServletRequest request,
RenderResponse renderResponse)
throws Exception {
getDL().addPortletBreadcrumbEntries(
dlFileShortcut, request, renderResponse);
}
public static void addPortletBreadcrumbEntries(
FileEntry fileEntry, HttpServletRequest request,
RenderResponse renderResponse)
throws Exception {
getDL().addPortletBreadcrumbEntries(fileEntry, request, renderResponse);
}
public static void addPortletBreadcrumbEntries(
Folder folder, HttpServletRequest request,
LiferayPortletResponse liferayPortletResponse)
throws Exception {
getDL().addPortletBreadcrumbEntries(
folder, request, liferayPortletResponse);
}
public static void addPortletBreadcrumbEntries(
Folder folder, HttpServletRequest request, PortletURL portletURL)
throws Exception {
getDL().addPortletBreadcrumbEntries(folder, request, portletURL);
}
public static void addPortletBreadcrumbEntries(
Folder folder, HttpServletRequest request,
RenderResponse renderResponse)
throws Exception {
getDL().addPortletBreadcrumbEntries(folder, request, renderResponse);
}
public static void addPortletBreadcrumbEntries(
long folderId, HttpServletRequest request,
RenderResponse renderResponse)
throws Exception {
getDL().addPortletBreadcrumbEntries(folderId, request, renderResponse);
}
public static int compareVersions(String version1, String version2) {
return getDL().compareVersions(version1, version2);
}
public static String getAbsolutePath(
PortletRequest portletRequest, long folderId)
throws PortalException, SystemException {
return getDL().getAbsolutePath(portletRequest, folderId);
}
public static Set getAllMediaGalleryMimeTypes() {
return getDL().getAllMediaGalleryMimeTypes();
}
public static String getDDMStructureKey(DLFileEntryType dlFileEntryType) {
return getDL().getDDMStructureKey(dlFileEntryType);
}
public static String getDDMStructureKey(String fileEntryTypeUuid) {
return getDL().getDDMStructureKey(fileEntryTypeUuid);
}
public static String getDeprecatedDDMStructureKey(
DLFileEntryType dlFileEntryType) {
return getDL().getDeprecatedDDMStructureKey(dlFileEntryType);
}
public static String getDeprecatedDDMStructureKey(long fileEntryTypeId) {
return getDL().getDeprecatedDDMStructureKey(fileEntryTypeId);
}
public static String getDividedPath(long id) {
return getDL().getDividedPath(id);
}
public static DL getDL() {
PortalRuntimePermission.checkGetBeanProperty(DLUtil.class);
return _dl;
}
public static String getDLFileEntryControlPanelLink(
PortletRequest portletRequest, long fileEntryId)
throws PortalException, SystemException {
return getDL().getDLFileEntryControlPanelLink(
portletRequest, fileEntryId);
}
public static String getDLFolderControlPanelLink(
PortletRequest portletRequest, long folderId)
throws PortalException, SystemException {
return getDL().getDLFolderControlPanelLink(portletRequest, folderId);
}
public static Map getEmailFileEntryAddedBodyMap(
PortletPreferences preferences) {
return getDL().getEmailFileEntryAddedBodyMap(preferences);
}
public static boolean getEmailFileEntryAddedEnabled(
PortletPreferences preferences) {
return getDL().getEmailFileEntryAddedEnabled(preferences);
}
public static Map getEmailFileEntryAddedSubjectMap(
PortletPreferences preferences) {
return getDL().getEmailFileEntryAddedSubjectMap(preferences);
}
public static Map getEmailFileEntryUpdatedBodyMap(
PortletPreferences preferences) {
return getDL().getEmailFileEntryUpdatedBodyMap(preferences);
}
public static boolean getEmailFileEntryUpdatedEnabled(
PortletPreferences preferences) {
return getDL().getEmailFileEntryUpdatedEnabled(preferences);
}
public static Map getEmailFileEntryUpdatedSubjectMap(
PortletPreferences preferences) {
return getDL().getEmailFileEntryUpdatedSubjectMap(preferences);
}
public static String getEmailFromAddress(
PortletPreferences preferences, long companyId)
throws SystemException {
return getDL().getEmailFromAddress(preferences, companyId);
}
public static String getEmailFromName(
PortletPreferences preferences, long companyId)
throws SystemException {
return getDL().getEmailFromName(preferences, companyId);
}
public static List