001
014
015 package com.liferay.portal.kernel.repository;
016
017 import com.liferay.portal.kernel.exception.PortalException;
018 import com.liferay.portal.kernel.repository.model.FileEntry;
019 import com.liferay.portal.kernel.repository.model.FileVersion;
020 import com.liferay.portal.kernel.repository.model.Folder;
021 import com.liferay.portal.kernel.util.OrderByComparator;
022 import com.liferay.portal.service.ServiceContext;
023
024 import java.io.File;
025 import java.io.InputStream;
026
027 import java.util.List;
028
029
032 public interface LocalRepository extends DocumentRepository {
033
034 public FileEntry addFileEntry(
035 long userId, long folderId, String sourceFileName, String mimeType,
036 String title, String description, String changeLog, File file,
037 ServiceContext serviceContext)
038 throws PortalException;
039
040 public FileEntry addFileEntry(
041 long userId, long folderId, String sourceFileName, String mimeType,
042 String title, String description, String changeLog, InputStream is,
043 long size, ServiceContext serviceContext)
044 throws PortalException;
045
046 public Folder addFolder(
047 long userId, long parentFolderId, String name, String description,
048 ServiceContext serviceContext)
049 throws PortalException;
050
051 public void deleteAll() throws PortalException;
052
053 public void deleteFileEntry(long fileEntryId) throws PortalException;
054
055 public void deleteFolder(long folderId) throws PortalException;
056
057 public FileEntry getFileEntry(long fileEntryId) throws PortalException;
058
059 public FileEntry getFileEntry(long folderId, String title)
060 throws PortalException;
061
062 public FileEntry getFileEntryByUuid(String uuid) throws PortalException;
063
064 public FileVersion getFileVersion(long fileVersionId)
065 throws PortalException;
066
067 public Folder getFolder(long folderId) throws PortalException;
068
069 public Folder getFolder(long parentFolderId, String name)
070 throws PortalException;
071
072 public List<FileEntry> getRepositoryFileEntries(
073 long rootFolderId, int start, int end,
074 OrderByComparator<FileEntry> obc)
075 throws PortalException;
076
077 public FileEntry moveFileEntry(
078 long userId, long fileEntryId, long newFolderId,
079 ServiceContext serviceContext)
080 throws PortalException;
081
082 public Folder moveFolder(
083 long userId, long folderId, long parentFolderId,
084 ServiceContext serviceContext)
085 throws PortalException;
086
087 public void updateAsset(
088 long userId, FileEntry fileEntry, FileVersion fileVersion,
089 long[] assetCategoryIds, String[] assetTagNames,
090 long[] assetLinkEntryIds)
091 throws PortalException;
092
093 public FileEntry updateFileEntry(
094 long userId, long fileEntryId, String sourceFileName,
095 String mimeType, String title, String description, String changeLog,
096 boolean majorVersion, File file, ServiceContext serviceContext)
097 throws PortalException;
098
099 public FileEntry updateFileEntry(
100 long userId, long fileEntryId, String sourceFileName,
101 String mimeType, String title, String description, String changeLog,
102 boolean majorVersion, InputStream is, long size,
103 ServiceContext serviceContext)
104 throws PortalException;
105
106 public Folder updateFolder(
107 long folderId, long parentFolderId, String name, String description,
108 ServiceContext serviceContext)
109 throws PortalException;
110
111 }