com.liferay.portal.kernel.repository
Class DefaultLocalRepositoryImpl
java.lang.Object
com.liferay.portal.kernel.repository.DefaultLocalRepositoryImpl
- All Implemented Interfaces:
- LocalRepository
public class DefaultLocalRepositoryImpl
- extends Object
- implements LocalRepository
This class is designed for third party repository implementations. Since the
paradigm of remote and local services exists only within Liferay, the
assumption is that all permission checking will be delegated to the specific
repository.
There are also many calls within this class that pass in a user ID as a
parameter. These methods should only be called for administration of Liferay
repositories and are hence not supported in all third party repositories.
This includes moving between document library hooks and LAR import/export.
Calling these methods will throw an
UnsupportedOperationException
.
Method Summary |
FileEntry |
addFileEntry(long userId,
long folderId,
String sourceFileName,
String mimeType,
String title,
String description,
String changeLog,
File file,
ServiceContext serviceContext)
|
FileEntry |
addFileEntry(long userId,
long folderId,
String sourceFileName,
String mimeType,
String title,
String description,
String changeLog,
InputStream is,
long size,
ServiceContext serviceContext)
|
Folder |
addFolder(long userId,
long parentFolderId,
String title,
String description,
ServiceContext serviceContext)
|
void |
deleteAll()
|
void |
deleteFileEntry(long fileEntryId)
|
void |
deleteFolder(long folderId)
|
List<FileEntry> |
getFileEntries(long folderId,
int start,
int end,
OrderByComparator obc)
|
List<Object> |
getFileEntriesAndFileShortcuts(long folderId,
int status,
int start,
int end)
|
int |
getFileEntriesAndFileShortcutsCount(long folderId,
int status)
|
int |
getFileEntriesCount(long folderId)
|
FileEntry |
getFileEntry(long fileEntryId)
|
FileEntry |
getFileEntry(long folderId,
String title)
|
FileEntry |
getFileEntryByUuid(String uuid)
|
FileVersion |
getFileVersion(long fileVersionId)
|
Folder |
getFolder(long folderId)
|
Folder |
getFolder(long parentFolderId,
String title)
|
List<Folder> |
getFolders(long parentFolderId,
boolean includeMountfolders,
int start,
int end,
OrderByComparator obc)
|
List<Object> |
getFoldersAndFileEntriesAndFileShortcuts(long folderId,
int status,
boolean includeMountFolders,
int start,
int end,
OrderByComparator obc)
|
List<Object> |
getFoldersAndFileEntriesAndFileShortcuts(long folderId,
int status,
int start,
int end,
OrderByComparator obc)
|
List<Object> |
getFoldersAndFileEntriesAndFileShortcuts(long folderId,
int status,
String[] mimeTypes,
boolean includeMountFolders,
int start,
int end,
OrderByComparator obc)
|
int |
getFoldersAndFileEntriesAndFileShortcutsCount(long folderId,
int status)
|
int |
getFoldersAndFileEntriesAndFileShortcutsCount(long folderId,
int status,
boolean includeMountFolders)
|
int |
getFoldersAndFileEntriesAndFileShortcutsCount(long folderId,
int status,
String[] mimeTypes,
boolean includeMountFolders)
|
int |
getFoldersCount(long parentFolderId,
boolean includeMountfolders)
|
int |
getFoldersFileEntriesCount(List<Long> folderIds,
int status)
|
List<Folder> |
getMountFolders(long parentFolderId,
int start,
int end,
OrderByComparator obc)
|
int |
getMountFoldersCount(long parentFolderId)
|
long |
getRepositoryId()
|
FileEntry |
moveFileEntry(long userId,
long fileEntryId,
long newFolderId,
ServiceContext serviceContext)
|
void |
updateAsset(long userId,
FileEntry fileEntry,
FileVersion fileVersion,
long[] assetCategoryIds,
String[] assetTagNames,
long[] assetLinkEntryIds)
|
FileEntry |
updateFileEntry(long userId,
long fileEntryId,
String sourceFileName,
String mimeType,
String title,
String description,
String changeLog,
boolean majorVersion,
File file,
ServiceContext serviceContext)
|
FileEntry |
updateFileEntry(long userId,
long fileEntryId,
String sourceFileName,
String mimeType,
String title,
String description,
String changeLog,
boolean majorVersion,
InputStream is,
long size,
ServiceContext serviceContext)
|
Folder |
updateFolder(long folderId,
long parentFolderId,
String title,
String description,
ServiceContext serviceContext)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DefaultLocalRepositoryImpl
public DefaultLocalRepositoryImpl(Repository repository)
addFileEntry
public FileEntry addFileEntry(long userId,
long folderId,
String sourceFileName,
String mimeType,
String title,
String description,
String changeLog,
File file,
ServiceContext serviceContext)
- Specified by:
addFileEntry
in interface LocalRepository
addFileEntry
public FileEntry addFileEntry(long userId,
long folderId,
String sourceFileName,
String mimeType,
String title,
String description,
String changeLog,
InputStream is,
long size,
ServiceContext serviceContext)
- Specified by:
addFileEntry
in interface LocalRepository
addFolder
public Folder addFolder(long userId,
long parentFolderId,
String title,
String description,
ServiceContext serviceContext)
- Specified by:
addFolder
in interface LocalRepository
deleteAll
public void deleteAll()
- Specified by:
deleteAll
in interface LocalRepository
deleteFileEntry
public void deleteFileEntry(long fileEntryId)
throws PortalException,
SystemException
- Specified by:
deleteFileEntry
in interface LocalRepository
- Throws:
PortalException
SystemException
deleteFolder
public void deleteFolder(long folderId)
throws PortalException,
SystemException
- Specified by:
deleteFolder
in interface LocalRepository
- Throws:
PortalException
SystemException
getFileEntries
public List<FileEntry> getFileEntries(long folderId,
int start,
int end,
OrderByComparator obc)
throws SystemException
- Specified by:
getFileEntries
in interface LocalRepository
- Throws:
SystemException
getFileEntriesAndFileShortcuts
public List<Object> getFileEntriesAndFileShortcuts(long folderId,
int status,
int start,
int end)
throws SystemException
- Specified by:
getFileEntriesAndFileShortcuts
in interface LocalRepository
- Throws:
SystemException
getFileEntriesAndFileShortcutsCount
public int getFileEntriesAndFileShortcutsCount(long folderId,
int status)
throws SystemException
- Specified by:
getFileEntriesAndFileShortcutsCount
in interface LocalRepository
- Throws:
SystemException
getFileEntriesCount
public int getFileEntriesCount(long folderId)
throws SystemException
- Specified by:
getFileEntriesCount
in interface LocalRepository
- Throws:
SystemException
getFileEntry
public FileEntry getFileEntry(long fileEntryId)
throws PortalException,
SystemException
- Specified by:
getFileEntry
in interface LocalRepository
- Throws:
PortalException
SystemException
getFileEntry
public FileEntry getFileEntry(long folderId,
String title)
throws PortalException,
SystemException
- Specified by:
getFileEntry
in interface LocalRepository
- Throws:
PortalException
SystemException
getFileEntryByUuid
public FileEntry getFileEntryByUuid(String uuid)
throws PortalException,
SystemException
- Specified by:
getFileEntryByUuid
in interface LocalRepository
- Throws:
PortalException
SystemException
getFileVersion
public FileVersion getFileVersion(long fileVersionId)
throws PortalException,
SystemException
- Specified by:
getFileVersion
in interface LocalRepository
- Throws:
PortalException
SystemException
getFolder
public Folder getFolder(long folderId)
throws PortalException,
SystemException
- Specified by:
getFolder
in interface LocalRepository
- Throws:
PortalException
SystemException
getFolder
public Folder getFolder(long parentFolderId,
String title)
throws PortalException,
SystemException
- Specified by:
getFolder
in interface LocalRepository
- Throws:
PortalException
SystemException
getFolders
public List<Folder> getFolders(long parentFolderId,
boolean includeMountfolders,
int start,
int end,
OrderByComparator obc)
throws PortalException,
SystemException
- Specified by:
getFolders
in interface LocalRepository
- Throws:
PortalException
SystemException
getFoldersAndFileEntriesAndFileShortcuts
public List<Object> getFoldersAndFileEntriesAndFileShortcuts(long folderId,
int status,
boolean includeMountFolders,
int start,
int end,
OrderByComparator obc)
throws SystemException
- Specified by:
getFoldersAndFileEntriesAndFileShortcuts
in interface LocalRepository
- Throws:
SystemException
getFoldersAndFileEntriesAndFileShortcuts
public List<Object> getFoldersAndFileEntriesAndFileShortcuts(long folderId,
int status,
int start,
int end,
OrderByComparator obc)
throws SystemException
- Throws:
SystemException
getFoldersAndFileEntriesAndFileShortcuts
public List<Object> getFoldersAndFileEntriesAndFileShortcuts(long folderId,
int status,
String[] mimeTypes,
boolean includeMountFolders,
int start,
int end,
OrderByComparator obc)
throws PortalException,
SystemException
- Specified by:
getFoldersAndFileEntriesAndFileShortcuts
in interface LocalRepository
- Throws:
PortalException
SystemException
getFoldersAndFileEntriesAndFileShortcutsCount
public int getFoldersAndFileEntriesAndFileShortcutsCount(long folderId,
int status)
throws SystemException
- Throws:
SystemException
getFoldersAndFileEntriesAndFileShortcutsCount
public int getFoldersAndFileEntriesAndFileShortcutsCount(long folderId,
int status,
boolean includeMountFolders)
throws SystemException
- Specified by:
getFoldersAndFileEntriesAndFileShortcutsCount
in interface LocalRepository
- Throws:
SystemException
getFoldersAndFileEntriesAndFileShortcutsCount
public int getFoldersAndFileEntriesAndFileShortcutsCount(long folderId,
int status,
String[] mimeTypes,
boolean includeMountFolders)
throws PortalException,
SystemException
- Specified by:
getFoldersAndFileEntriesAndFileShortcutsCount
in interface LocalRepository
- Throws:
PortalException
SystemException
getFoldersCount
public int getFoldersCount(long parentFolderId,
boolean includeMountfolders)
throws PortalException,
SystemException
- Specified by:
getFoldersCount
in interface LocalRepository
- Throws:
PortalException
SystemException
getFoldersFileEntriesCount
public int getFoldersFileEntriesCount(List<Long> folderIds,
int status)
throws SystemException
- Specified by:
getFoldersFileEntriesCount
in interface LocalRepository
- Throws:
SystemException
getMountFolders
public List<Folder> getMountFolders(long parentFolderId,
int start,
int end,
OrderByComparator obc)
throws SystemException
- Specified by:
getMountFolders
in interface LocalRepository
- Throws:
SystemException
getMountFoldersCount
public int getMountFoldersCount(long parentFolderId)
throws SystemException
- Specified by:
getMountFoldersCount
in interface LocalRepository
- Throws:
SystemException
getRepositoryId
public long getRepositoryId()
- Specified by:
getRepositoryId
in interface LocalRepository
moveFileEntry
public FileEntry moveFileEntry(long userId,
long fileEntryId,
long newFolderId,
ServiceContext serviceContext)
- Specified by:
moveFileEntry
in interface LocalRepository
updateAsset
public void updateAsset(long userId,
FileEntry fileEntry,
FileVersion fileVersion,
long[] assetCategoryIds,
String[] assetTagNames,
long[] assetLinkEntryIds)
- Specified by:
updateAsset
in interface LocalRepository
updateFileEntry
public FileEntry updateFileEntry(long userId,
long fileEntryId,
String sourceFileName,
String mimeType,
String title,
String description,
String changeLog,
boolean majorVersion,
File file,
ServiceContext serviceContext)
- Specified by:
updateFileEntry
in interface LocalRepository
updateFileEntry
public FileEntry updateFileEntry(long userId,
long fileEntryId,
String sourceFileName,
String mimeType,
String title,
String description,
String changeLog,
boolean majorVersion,
InputStream is,
long size,
ServiceContext serviceContext)
- Specified by:
updateFileEntry
in interface LocalRepository
updateFolder
public Folder updateFolder(long folderId,
long parentFolderId,
String title,
String description,
ServiceContext serviceContext)
- Specified by:
updateFolder
in interface LocalRepository