Class BaseRepositoryImpl
Object
com.liferay.portal.kernel.repository.BaseRepositoryImpl
- All Implemented Interfaces:
BaseRepository
,CapabilityProvider
,DocumentRepository
,Repository
public abstract class BaseRepositoryImpl
extends Object
implements BaseRepository, CapabilityProvider
Third-party repository implementations should extend from this class.
- Author:
- Alexander Chow
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected AssetEntryLocalService
protected CompanyLocalService
protected DLAppHelperLocalService
protected DLFolderLocalService
protected RepositoryEntryLocalService
protected UserLocalService
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddFileEntry
(String externalReferenceCode, long userId, long folderId, String sourceFileName, String mimeType, String title, String urlTitle, String description, String changeLog, File file, Date displayDate, Date expirationDate, Date reviewDate, ServiceContext serviceContext) abstract Folder
addFolder
(String externalReferenceCode, long userId, long parentFolderId, String name, String description, ServiceContext serviceContext) abstract void
checkInFileEntry
(long userId, long fileEntryId, DLVersionNumberIncrease dlVersionNumberIncrease, String changeLog, ServiceContext serviceContext) abstract FileEntry
checkOutFileEntry
(long fileEntryId, ServiceContext serviceContext) abstract FileEntry
checkOutFileEntry
(long fileEntryId, String owner, long expirationTime, ServiceContext serviceContext) protected void
clearManualCheckInRequired
(long fileEntryId, ServiceContext serviceContext) void
void
deleteFileEntry
(long folderId, String title) void
deleteFileVersion
(long fileVersionId) void
deleteFileVersion
(long fileEntryId, String version) void
deleteFolder
(long parentFolderId, String name) <T extends Capability>
TgetCapability
(Class<T> capabilityClass) long
getFileEntriesAndFileShortcuts
(long folderId, int status, int start, int end) int
getFileEntriesAndFileShortcutsCount
(long folderId, int status) int
getFileEntriesAndFileShortcutsCount
(long folderId, int status, String[] mimeTypes) getFolders
(long parentFolderId, int status, boolean includeMountfolders, int start, int end, OrderByComparator<Folder> orderByComparator) getFoldersAndFileEntries
(long folderId, int start, int end, OrderByComparator<?> orderByComparator) getFoldersAndFileEntries
(long folderId, String[] mimeTypes, int start, int end, OrderByComparator<?> orderByComparator) getFoldersAndFileEntriesAndFileShortcuts
(long folderId, int status, boolean includeMountFolders, int start, int end, OrderByComparator<?> orderByComparator) getFoldersAndFileEntriesAndFileShortcuts
(long folderId, int status, String[] mimeTypes, boolean includeMountFolders, int start, int end, OrderByComparator<?> orderByComparator) int
getFoldersAndFileEntriesAndFileShortcutsCount
(long folderId, int status, boolean includeMountFolders) int
getFoldersAndFileEntriesAndFileShortcutsCount
(long folderId, int status, String[] mimeTypes, boolean includeMountFolders) abstract int
getFoldersAndFileEntriesCount
(long folderId) abstract int
getFoldersAndFileEntriesCount
(long folderId, String[] mimeTypes) int
getFoldersCount
(long parentFolderId, int status, boolean includeMountfolders) long
protected RepositoryEntry
getRepositoryEntry
(String objectId) getRepositoryFileEntries
(long userId, long rootFolderId, int start, int end, OrderByComparator<FileEntry> orderByComparator) getRepositoryFileEntries
(long userId, long rootFolderId, String[] mimeTypes, int status, int start, int end, OrderByComparator<FileEntry> orderByComparator) int
getRepositoryFileEntriesCount
(long userId, long rootFolderId) int
getRepositoryFileEntriesCount
(long userId, long rootFolderId, String[] mimeTypes, int status) long
String[][]
Deprecated.As of Wilberforce (7.0.x)abstract void
<T extends Capability>
booleanisCapabilityProvided
(Class<T> capabilityClass) search
(SearchContext searchContext) void
setAssetEntryLocalService
(AssetEntryLocalService assetEntryLocalService) void
setCompanyId
(long companyId) void
setCompanyLocalService
(CompanyLocalService companyLocalService) void
setDLAppHelperLocalService
(DLAppHelperLocalService dlAppHelperLocalService) void
setDLFolderLocalService
(DLFolderLocalService dlFolderLocalService) void
setGroupId
(long groupId) protected void
setManualCheckInRequired
(long fileEntryId, ServiceContext serviceContext) void
setRepositoryEntryLocalService
(RepositoryEntryLocalService repositoryEntryLocalService) void
setRepositoryId
(long repositoryId) void
setTypeSettingsProperties
(UnicodeProperties typeSettingsUnicodeProperties) void
setUserLocalService
(UserLocalService userLocalService) void
unlockFolder
(long parentFolderId, String name, String lockUuid) updateFileEntry
(long userId, long fileEntryId, String sourceFileName, String mimeType, String title, String urlTitle, String description, String changeLog, DLVersionNumberIncrease dlVersionNumberIncrease, File file, Date displayDate, Date expirationDate, Date reviewDate, ServiceContext serviceContext) abstract FileEntry
updateFileEntry
(long userId, long fileEntryId, String sourceFileName, String mimeType, String title, String urlTitle, String description, String changeLog, DLVersionNumberIncrease dlVersionNumberIncrease, InputStream inputStream, long size, Date displayDate, Date expirationDate, Date reviewDate, ServiceContext serviceContext) updateFolder
(long folderId, long parentFolderId, String name, String description, ServiceContext serviceContext) boolean
verifyFileEntryLock
(long fileEntryId, String lockUuid) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.liferay.portal.kernel.repository.DocumentRepository
addFileEntry, addFileShortcut, checkInFileEntry, copyFileEntry, deleteFileEntry, deleteFileShortcut, deleteFileShortcuts, deleteFolder, fetchFileEntry, fetchFileEntryByExternalReferenceCode, fetchFileShortcut, fetchFileShortcutByExternalReferenceCode, fetchFolderByExternalReferenceCode, getFileEntries, getFileEntries, getFileEntries, getFileEntriesCount, getFileEntriesCount, getFileEntriesCount, getFileEntry, getFileEntry, getFileEntryByExternalReferenceCode, getFileEntryByFileName, getFileEntryByUuid, getFileShortcut, getFileShortcutByExternalReferenceCode, getFileVersion, getFolder, getFolder, getFolderByExternalReferenceCode, getFolders, getFoldersCount, moveFileEntry, moveFolder, revertFileEntry, updateFileShortcut, updateFileShortcuts
Methods inherited from interface com.liferay.portal.kernel.repository.Repository
cancelCheckOut, getFileEntries, getFileEntries, getFileEntriesCount, getFileEntriesCount, getFoldersAndFileEntriesAndFileShortcuts, getFoldersAndFileEntriesAndFileShortcutsCount, getFoldersFileEntriesCount, getMountFolders, getMountFoldersCount, getRepositoryFileShortcuts, getSubfolderIds, getSubfolderIds, lockFolder, lockFolder, refreshFileEntryLock, refreshFolderLock, search, search, search, unlockFolder, updateFolder, verifyFileEntryCheckOut, verifyInheritableLock
-
Field Details
-
assetEntryLocalService
-
companyLocalService
-
dlAppHelperLocalService
-
dlFolderLocalService
-
repositoryEntryLocalService
-
userLocalService
-
-
Constructor Details
-
BaseRepositoryImpl
public BaseRepositoryImpl()
-
-
Method Details
-
addFileEntry
public FileEntry addFileEntry(String externalReferenceCode, long userId, long folderId, String sourceFileName, String mimeType, String title, String urlTitle, String description, String changeLog, File file, Date displayDate, Date expirationDate, Date reviewDate, ServiceContext serviceContext) throws PortalException - Specified by:
addFileEntry
in interfaceDocumentRepository
- Throws:
PortalException
-
addFolder
public abstract Folder addFolder(String externalReferenceCode, long userId, long parentFolderId, String name, String description, ServiceContext serviceContext) throws PortalException - Specified by:
addFolder
in interfaceDocumentRepository
- Throws:
PortalException
-
checkInFileEntry
public abstract void checkInFileEntry(long userId, long fileEntryId, DLVersionNumberIncrease dlVersionNumberIncrease, String changeLog, ServiceContext serviceContext) throws PortalException - Specified by:
checkInFileEntry
in interfaceDocumentRepository
- Throws:
PortalException
-
checkOutFileEntry
public abstract FileEntry checkOutFileEntry(long fileEntryId, ServiceContext serviceContext) throws PortalException - Specified by:
checkOutFileEntry
in interfaceRepository
- Throws:
PortalException
-
checkOutFileEntry
public abstract FileEntry checkOutFileEntry(long fileEntryId, String owner, long expirationTime, ServiceContext serviceContext) throws PortalException - Specified by:
checkOutFileEntry
in interfaceRepository
- Throws:
PortalException
-
deleteAll
public void deleteAll()- Specified by:
deleteAll
in interfaceDocumentRepository
-
deleteFileEntry
- Specified by:
deleteFileEntry
in interfaceRepository
- Throws:
PortalException
-
deleteFileVersion
- Specified by:
deleteFileVersion
in interfaceDocumentRepository
- Throws:
PortalException
-
deleteFileVersion
- Specified by:
deleteFileVersion
in interfaceRepository
-
deleteFolder
- Specified by:
deleteFolder
in interfaceRepository
- Throws:
PortalException
-
getCapability
- Specified by:
getCapability
in interfaceCapabilityProvider
-
getCompanyId
public long getCompanyId() -
getFileEntriesAndFileShortcuts
public List<RepositoryEntry> getFileEntriesAndFileShortcuts(long folderId, int status, int start, int end) throws PortalException - Specified by:
getFileEntriesAndFileShortcuts
in interfaceDocumentRepository
- Throws:
PortalException
-
getFileEntriesAndFileShortcutsCount
- Specified by:
getFileEntriesAndFileShortcutsCount
in interfaceDocumentRepository
- Throws:
PortalException
-
getFileEntriesAndFileShortcutsCount
public int getFileEntriesAndFileShortcutsCount(long folderId, int status, String[] mimeTypes) throws PortalException - Specified by:
getFileEntriesAndFileShortcutsCount
in interfaceRepository
- Throws:
PortalException
-
getFolders
public List<Folder> getFolders(long parentFolderId, int status, boolean includeMountfolders, int start, int end, OrderByComparator<Folder> orderByComparator) throws PortalException - Specified by:
getFolders
in interfaceDocumentRepository
- Throws:
PortalException
-
getFoldersAndFileEntries
public abstract List<Object> getFoldersAndFileEntries(long folderId, int start, int end, OrderByComparator<?> orderByComparator) -
getFoldersAndFileEntries
public abstract List<Object> getFoldersAndFileEntries(long folderId, String[] mimeTypes, int start, int end, OrderByComparator<?> orderByComparator) throws PortalException - Throws:
PortalException
-
getFoldersAndFileEntriesAndFileShortcuts
public List<RepositoryEntry> getFoldersAndFileEntriesAndFileShortcuts(long folderId, int status, boolean includeMountFolders, int start, int end, OrderByComparator<?> orderByComparator) - Specified by:
getFoldersAndFileEntriesAndFileShortcuts
in interfaceDocumentRepository
-
getFoldersAndFileEntriesAndFileShortcuts
public List<RepositoryEntry> getFoldersAndFileEntriesAndFileShortcuts(long folderId, int status, String[] mimeTypes, boolean includeMountFolders, int start, int end, OrderByComparator<?> orderByComparator) throws PortalException - Specified by:
getFoldersAndFileEntriesAndFileShortcuts
in interfaceRepository
- Throws:
PortalException
-
getFoldersAndFileEntriesAndFileShortcutsCount
public int getFoldersAndFileEntriesAndFileShortcutsCount(long folderId, int status, boolean includeMountFolders) - Specified by:
getFoldersAndFileEntriesAndFileShortcutsCount
in interfaceDocumentRepository
-
getFoldersAndFileEntriesAndFileShortcutsCount
public int getFoldersAndFileEntriesAndFileShortcutsCount(long folderId, int status, String[] mimeTypes, boolean includeMountFolders) throws PortalException - Specified by:
getFoldersAndFileEntriesAndFileShortcutsCount
in interfaceRepository
- Throws:
PortalException
-
getFoldersAndFileEntriesCount
public abstract int getFoldersAndFileEntriesCount(long folderId) -
getFoldersAndFileEntriesCount
public abstract int getFoldersAndFileEntriesCount(long folderId, String[] mimeTypes) throws PortalException - Throws:
PortalException
-
getFoldersCount
public int getFoldersCount(long parentFolderId, int status, boolean includeMountfolders) throws PortalException - Specified by:
getFoldersCount
in interfaceDocumentRepository
- Throws:
PortalException
-
getGroupId
public long getGroupId() -
getLocalRepository
- Specified by:
getLocalRepository
in interfaceBaseRepository
-
getRepositoryFileEntries
public List<FileEntry> getRepositoryFileEntries(long userId, long rootFolderId, int start, int end, OrderByComparator<FileEntry> orderByComparator) throws PortalException - Specified by:
getRepositoryFileEntries
in interfaceDocumentRepository
- Throws:
PortalException
-
getRepositoryFileEntries
public List<FileEntry> getRepositoryFileEntries(long userId, long rootFolderId, String[] mimeTypes, int status, int start, int end, OrderByComparator<FileEntry> orderByComparator) throws PortalException - Specified by:
getRepositoryFileEntries
in interfaceRepository
- Throws:
PortalException
-
getRepositoryFileEntriesCount
- Specified by:
getRepositoryFileEntriesCount
in interfaceRepository
- Throws:
PortalException
-
getRepositoryFileEntriesCount
public int getRepositoryFileEntriesCount(long userId, long rootFolderId, String[] mimeTypes, int status) throws PortalException - Specified by:
getRepositoryFileEntriesCount
in interfaceRepository
- Throws:
PortalException
-
getRepositoryId
public long getRepositoryId()- Specified by:
getRepositoryId
in interfaceDocumentRepository
-
getSupportedParameters
Deprecated.As of Wilberforce (7.0.x)- Specified by:
getSupportedParameters
in interfaceBaseRepository
-
getTypeSettingsProperties
-
initRepository
- Specified by:
initRepository
in interfaceBaseRepository
- Throws:
PortalException
-
isCapabilityProvided
- Specified by:
isCapabilityProvided
in interfaceCapabilityProvider
-
search
- Specified by:
search
in interfaceRepository
- Throws:
SearchException
-
setAssetEntryLocalService
- Specified by:
setAssetEntryLocalService
in interfaceBaseRepository
-
setCompanyId
public void setCompanyId(long companyId) - Specified by:
setCompanyId
in interfaceBaseRepository
-
setCompanyLocalService
- Specified by:
setCompanyLocalService
in interfaceBaseRepository
-
setDLAppHelperLocalService
- Specified by:
setDLAppHelperLocalService
in interfaceBaseRepository
-
setDLFolderLocalService
- Specified by:
setDLFolderLocalService
in interfaceBaseRepository
-
setGroupId
public void setGroupId(long groupId) - Specified by:
setGroupId
in interfaceBaseRepository
-
setRepositoryEntryLocalService
- Specified by:
setRepositoryEntryLocalService
in interfaceBaseRepository
-
setRepositoryId
public void setRepositoryId(long repositoryId) - Specified by:
setRepositoryId
in interfaceBaseRepository
-
setTypeSettingsProperties
- Specified by:
setTypeSettingsProperties
in interfaceBaseRepository
-
setUserLocalService
- Specified by:
setUserLocalService
in interfaceBaseRepository
-
unlockFolder
- Specified by:
unlockFolder
in interfaceRepository
- Throws:
PortalException
-
updateFileEntry
public FileEntry updateFileEntry(long userId, long fileEntryId, String sourceFileName, String mimeType, String title, String urlTitle, String description, String changeLog, DLVersionNumberIncrease dlVersionNumberIncrease, File file, Date displayDate, Date expirationDate, Date reviewDate, ServiceContext serviceContext) throws PortalException - Specified by:
updateFileEntry
in interfaceDocumentRepository
- Throws:
PortalException
-
updateFileEntry
public abstract FileEntry updateFileEntry(long userId, long fileEntryId, String sourceFileName, String mimeType, String title, String urlTitle, String description, String changeLog, DLVersionNumberIncrease dlVersionNumberIncrease, InputStream inputStream, long size, Date displayDate, Date expirationDate, Date reviewDate, ServiceContext serviceContext) throws PortalException - Specified by:
updateFileEntry
in interfaceDocumentRepository
- Throws:
PortalException
-
updateFolder
public Folder updateFolder(long folderId, long parentFolderId, String name, String description, ServiceContext serviceContext) - Specified by:
updateFolder
in interfaceDocumentRepository
-
verifyFileEntryLock
- Specified by:
verifyFileEntryLock
in interfaceRepository
-
clearManualCheckInRequired
protected void clearManualCheckInRequired(long fileEntryId, ServiceContext serviceContext) throws NoSuchRepositoryEntryException - Throws:
NoSuchRepositoryEntryException
-
getRepositoryEntry
- Throws:
PortalException
-
setManualCheckInRequired
protected void setManualCheckInRequired(long fileEntryId, ServiceContext serviceContext) throws NoSuchRepositoryEntryException - Throws:
NoSuchRepositoryEntryException
-