Class PortletFileRepositoryUtil
Object
com.liferay.portal.kernel.portletfilerepository.PortletFileRepositoryUtil
- Author:
- Eudaldo Alonso, Alexander Chow
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic void
addPortletFileEntries
(long groupId, long userId, String className, long classPK, String portletId, long folderId, List<ObjectValuePair<String, InputStream>> inputStreamOVPs) static FileEntry
addPortletFileEntry
(long groupId, long userId, String className, long classPK, String portletId, long folderId, byte[] bytes, String fileName, String mimeType, boolean indexingEnabled) static FileEntry
addPortletFileEntry
(String externalReferenceCode, long groupId, long userId, String className, long classPK, String portletId, long folderId, File file, String fileName, String mimeType, boolean indexingEnabled) static FileEntry
addPortletFileEntry
(String externalReferenceCode, long groupId, long userId, String className, long classPK, String portletId, long folderId, InputStream inputStream, String fileName, String mimeType, boolean indexingEnabled) static Folder
addPortletFolder
(long userId, long repositoryId, long parentFolderId, String folderName, ServiceContext serviceContext) static Folder
addPortletFolder
(long groupId, long userId, String portletId, long parentFolderId, String folderName, ServiceContext serviceContext) static Repository
addPortletRepository
(long groupId, String portletId, ServiceContext serviceContext) static void
deletePortletFileEntries
(long groupId, long folderId) static void
deletePortletFileEntries
(long groupId, long folderId, int status) static void
deletePortletFileEntry
(long fileEntryId) static void
deletePortletFileEntry
(long groupId, long folderId, String fileName) static void
deletePortletFolder
(long folderId) static void
deletePortletRepository
(long groupId, String portletId) static FileEntry
fetchPortletFileEntry
(long groupId, long folderId, String fileName) static Repository
fetchPortletRepository
(long groupId, String portletId) static String
getDownloadPortletFileEntryURL
(ThemeDisplay themeDisplay, FileEntry fileEntry, String queryString) static String
getDownloadPortletFileEntryURL
(ThemeDisplay themeDisplay, FileEntry fileEntry, String queryString, boolean absoluteURL) getPortletFileEntries
(long groupId, long folderId) getPortletFileEntries
(long groupId, long folderId, int status) getPortletFileEntries
(long groupId, long folderId, int status, int start, int end, OrderByComparator<FileEntry> orderByComparator) getPortletFileEntries
(long groupId, long folderId, OrderByComparator<FileEntry> orderByComparator) getPortletFileEntries
(long groupId, long folderId, String[] mimeTypes, int status, int start, int end, OrderByComparator<FileEntry> orderByComparator) static int
getPortletFileEntriesCount
(long groupId, long folderId) static int
getPortletFileEntriesCount
(long groupId, long folderId, int status) static int
getPortletFileEntriesCount
(long groupId, long folderId, String[] mimeTypes, int status) static FileEntry
getPortletFileEntry
(long fileEntryId) static FileEntry
getPortletFileEntry
(long groupId, long folderId, String fileName) static FileEntry
getPortletFileEntry
(String uuid, long groupId) static FileEntry
getPortletFileEntryByExternalReferenceCode
(String externalReferenceCode, long groupId) static String
getPortletFileEntryURL
(ThemeDisplay themeDisplay, FileEntry fileEntry, String queryString) static String
getPortletFileEntryURL
(ThemeDisplay themeDisplay, FileEntry fileEntry, String queryString, boolean absoluteURL) static PortletFileRepository
static Folder
getPortletFolder
(long folderId) static Folder
getPortletFolder
(long repositoryId, long parentFolderId, String folderName) static Repository
getPortletRepository
(long groupId, String portletId) static String
getUniqueFileName
(long groupId, long folderId, String fileName) static FileEntry
movePortletFileEntryToTrash
(long userId, long fileEntryId) static FileEntry
movePortletFileEntryToTrash
(long groupId, long userId, long folderId, String fileName) static Folder
movePortletFolder
(long groupId, long userId, long folderId, long parentFolderId, ServiceContext serviceContext) static void
restorePortletFileEntryFromTrash
(long userId, long fileEntryId) static void
restorePortletFileEntryFromTrash
(long groupId, long userId, long folderId, String fileName) static Hits
searchPortletFileEntries
(long repositoryId, SearchContext searchContext)
-
Constructor Details
-
PortletFileRepositoryUtil
public PortletFileRepositoryUtil()
-
-
Method Details
-
addPortletFileEntries
public static void addPortletFileEntries(long groupId, long userId, String className, long classPK, String portletId, long folderId, List<ObjectValuePair<String, InputStream>> inputStreamOVPs) throws PortalException- Throws:
PortalException
-
addPortletFileEntry
public static FileEntry addPortletFileEntry(long groupId, long userId, String className, long classPK, String portletId, long folderId, byte[] bytes, String fileName, String mimeType, boolean indexingEnabled) throws PortalException - Throws:
PortalException
-
addPortletFileEntry
public static FileEntry addPortletFileEntry(String externalReferenceCode, long groupId, long userId, String className, long classPK, String portletId, long folderId, File file, String fileName, String mimeType, boolean indexingEnabled) throws PortalException - Throws:
PortalException
-
addPortletFileEntry
public static FileEntry addPortletFileEntry(String externalReferenceCode, long groupId, long userId, String className, long classPK, String portletId, long folderId, InputStream inputStream, String fileName, String mimeType, boolean indexingEnabled) throws PortalException - Throws:
PortalException
-
addPortletFolder
public static Folder addPortletFolder(long userId, long repositoryId, long parentFolderId, String folderName, ServiceContext serviceContext) throws PortalException - Throws:
PortalException
-
addPortletFolder
public static Folder addPortletFolder(long groupId, long userId, String portletId, long parentFolderId, String folderName, ServiceContext serviceContext) throws PortalException - Throws:
PortalException
-
addPortletRepository
public static Repository addPortletRepository(long groupId, String portletId, ServiceContext serviceContext) throws PortalException - Throws:
PortalException
-
deletePortletFileEntries
- Throws:
PortalException
-
deletePortletFileEntries
public static void deletePortletFileEntries(long groupId, long folderId, int status) throws PortalException - Throws:
PortalException
-
deletePortletFileEntry
- Throws:
PortalException
-
deletePortletFileEntry
public static void deletePortletFileEntry(long groupId, long folderId, String fileName) throws PortalException - Throws:
PortalException
-
deletePortletFolder
- Throws:
PortalException
-
deletePortletRepository
- Throws:
PortalException
-
fetchPortletFileEntry
-
fetchPortletRepository
-
getDownloadPortletFileEntryURL
public static String getDownloadPortletFileEntryURL(ThemeDisplay themeDisplay, FileEntry fileEntry, String queryString) -
getDownloadPortletFileEntryURL
public static String getDownloadPortletFileEntryURL(ThemeDisplay themeDisplay, FileEntry fileEntry, String queryString, boolean absoluteURL) -
getPortletFileEntries
public static List<FileEntry> getPortletFileEntries(long groupId, long folderId) throws PortalException - Throws:
PortalException
-
getPortletFileEntries
public static List<FileEntry> getPortletFileEntries(long groupId, long folderId, int status) throws PortalException - Throws:
PortalException
-
getPortletFileEntries
public static List<FileEntry> getPortletFileEntries(long groupId, long folderId, int status, int start, int end, OrderByComparator<FileEntry> orderByComparator) throws PortalException - Throws:
PortalException
-
getPortletFileEntries
public static List<FileEntry> getPortletFileEntries(long groupId, long folderId, OrderByComparator<FileEntry> orderByComparator) throws PortalException - Throws:
PortalException
-
getPortletFileEntries
public static List<FileEntry> getPortletFileEntries(long groupId, long folderId, String[] mimeTypes, int status, int start, int end, OrderByComparator<FileEntry> orderByComparator) throws PortalException - Throws:
PortalException
-
getPortletFileEntriesCount
- Throws:
PortalException
-
getPortletFileEntriesCount
public static int getPortletFileEntriesCount(long groupId, long folderId, int status) throws PortalException - Throws:
PortalException
-
getPortletFileEntriesCount
public static int getPortletFileEntriesCount(long groupId, long folderId, String[] mimeTypes, int status) throws PortalException - Throws:
PortalException
-
getPortletFileEntry
- Throws:
PortalException
-
getPortletFileEntry
public static FileEntry getPortletFileEntry(long groupId, long folderId, String fileName) throws PortalException - Throws:
PortalException
-
getPortletFileEntry
- Throws:
PortalException
-
getPortletFileEntryByExternalReferenceCode
public static FileEntry getPortletFileEntryByExternalReferenceCode(String externalReferenceCode, long groupId) throws PortalException - Throws:
PortalException
-
getPortletFileEntryURL
public static String getPortletFileEntryURL(ThemeDisplay themeDisplay, FileEntry fileEntry, String queryString) -
getPortletFileEntryURL
public static String getPortletFileEntryURL(ThemeDisplay themeDisplay, FileEntry fileEntry, String queryString, boolean absoluteURL) -
getPortletFileRepository
-
getPortletFolder
- Throws:
PortalException
-
getPortletFolder
public static Folder getPortletFolder(long repositoryId, long parentFolderId, String folderName) throws PortalException - Throws:
PortalException
-
getPortletRepository
public static Repository getPortletRepository(long groupId, String portletId) throws PortalException - Throws:
PortalException
-
getUniqueFileName
-
movePortletFileEntryToTrash
public static FileEntry movePortletFileEntryToTrash(long userId, long fileEntryId) throws PortalException - Throws:
PortalException
-
movePortletFileEntryToTrash
public static FileEntry movePortletFileEntryToTrash(long groupId, long userId, long folderId, String fileName) throws PortalException - Throws:
PortalException
-
movePortletFolder
public static Folder movePortletFolder(long groupId, long userId, long folderId, long parentFolderId, ServiceContext serviceContext) throws PortalException - Throws:
PortalException
-
restorePortletFileEntryFromTrash
public static void restorePortletFileEntryFromTrash(long userId, long fileEntryId) throws PortalException - Throws:
PortalException
-
restorePortletFileEntryFromTrash
public static void restorePortletFileEntryFromTrash(long groupId, long userId, long folderId, String fileName) throws PortalException - Throws:
PortalException
-
searchPortletFileEntries
public static Hits searchPortletFileEntries(long repositoryId, SearchContext searchContext) throws PortalException - Throws:
PortalException
-