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 AssetEntryLocalServiceprotected CompanyLocalServiceprotected DLAppHelperLocalServiceprotected DLFolderLocalServiceprotected RepositoryEntryLocalServiceprotected 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 FolderaddFolder(String externalReferenceCode, long userId, long parentFolderId, String name, String description, ServiceContext serviceContext) abstract voidcheckInFileEntry(long userId, long fileEntryId, DLVersionNumberIncrease dlVersionNumberIncrease, String changeLog, ServiceContext serviceContext) abstract FileEntrycheckOutFileEntry(long fileEntryId, ServiceContext serviceContext) abstract FileEntrycheckOutFileEntry(long fileEntryId, String owner, long expirationTime, ServiceContext serviceContext) protected voidclearManualCheckInRequired(long fileEntryId, ServiceContext serviceContext) voidvoiddeleteFileEntry(long folderId, String title) voiddeleteFileVersion(long fileVersionId) voiddeleteFileVersion(long fileEntryId, String version) voiddeleteFolder(long parentFolderId, String name) <T extends Capability>
TgetCapability(Class<T> capabilityClass) longgetFileEntriesAndFileShortcuts(long folderId, int status, int start, int end) intgetFileEntriesAndFileShortcutsCount(long folderId, int status) intgetFileEntriesAndFileShortcutsCount(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) intgetFoldersAndFileEntriesAndFileShortcutsCount(long folderId, int status, boolean includeMountFolders) intgetFoldersAndFileEntriesAndFileShortcutsCount(long folderId, int status, String[] mimeTypes, boolean includeMountFolders) abstract intgetFoldersAndFileEntriesCount(long folderId) abstract intgetFoldersAndFileEntriesCount(long folderId, String[] mimeTypes) intgetFoldersCount(long parentFolderId, int status, boolean includeMountfolders) longprotected RepositoryEntrygetRepositoryEntry(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) intgetRepositoryFileEntriesCount(long userId, long rootFolderId) intgetRepositoryFileEntriesCount(long userId, long rootFolderId, String[] mimeTypes, int status) longString[][]Deprecated.As of Wilberforce (7.0.x)abstract void<T extends Capability>
booleanisCapabilityProvided(Class<T> capabilityClass) search(SearchContext searchContext) voidsetAssetEntryLocalService(AssetEntryLocalService assetEntryLocalService) voidsetCompanyId(long companyId) voidsetCompanyLocalService(CompanyLocalService companyLocalService) voidsetDLAppHelperLocalService(DLAppHelperLocalService dlAppHelperLocalService) voidsetDLFolderLocalService(DLFolderLocalService dlFolderLocalService) voidsetGroupId(long groupId) protected voidsetManualCheckInRequired(long fileEntryId, ServiceContext serviceContext) voidsetRepositoryEntryLocalService(RepositoryEntryLocalService repositoryEntryLocalService) voidsetRepositoryId(long repositoryId) voidsetTypeSettingsProperties(UnicodeProperties typeSettingsUnicodeProperties) voidsetUserLocalService(UserLocalService userLocalService) voidunlockFolder(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 FileEntryupdateFileEntry(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) booleanverifyFileEntryLock(long fileEntryId, String lockUuid) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods 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, updateFileShortcutsMethods 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:
addFileEntryin interfaceDocumentRepository- Throws:
PortalException
-
addFolder
public abstract Folder addFolder(String externalReferenceCode, long userId, long parentFolderId, String name, String description, ServiceContext serviceContext) throws PortalException - Specified by:
addFolderin interfaceDocumentRepository- Throws:
PortalException
-
checkInFileEntry
public abstract void checkInFileEntry(long userId, long fileEntryId, DLVersionNumberIncrease dlVersionNumberIncrease, String changeLog, ServiceContext serviceContext) throws PortalException - Specified by:
checkInFileEntryin interfaceDocumentRepository- Throws:
PortalException
-
checkOutFileEntry
public abstract FileEntry checkOutFileEntry(long fileEntryId, ServiceContext serviceContext) throws PortalException - Specified by:
checkOutFileEntryin interfaceRepository- Throws:
PortalException
-
checkOutFileEntry
public abstract FileEntry checkOutFileEntry(long fileEntryId, String owner, long expirationTime, ServiceContext serviceContext) throws PortalException - Specified by:
checkOutFileEntryin interfaceRepository- Throws:
PortalException
-
deleteAll
public void deleteAll()- Specified by:
deleteAllin interfaceDocumentRepository
-
deleteFileEntry
- Specified by:
deleteFileEntryin interfaceRepository- Throws:
PortalException
-
deleteFileVersion
- Specified by:
deleteFileVersionin interfaceDocumentRepository- Throws:
PortalException
-
deleteFileVersion
- Specified by:
deleteFileVersionin interfaceRepository
-
deleteFolder
- Specified by:
deleteFolderin interfaceRepository- Throws:
PortalException
-
getCapability
- Specified by:
getCapabilityin interfaceCapabilityProvider
-
getCompanyId
public long getCompanyId() -
getFileEntriesAndFileShortcuts
public List<RepositoryEntry> getFileEntriesAndFileShortcuts(long folderId, int status, int start, int end) throws PortalException - Specified by:
getFileEntriesAndFileShortcutsin interfaceDocumentRepository- Throws:
PortalException
-
getFileEntriesAndFileShortcutsCount
- Specified by:
getFileEntriesAndFileShortcutsCountin interfaceDocumentRepository- Throws:
PortalException
-
getFileEntriesAndFileShortcutsCount
public int getFileEntriesAndFileShortcutsCount(long folderId, int status, String[] mimeTypes) throws PortalException - Specified by:
getFileEntriesAndFileShortcutsCountin 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:
getFoldersin 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:
getFoldersAndFileEntriesAndFileShortcutsin interfaceDocumentRepository
-
getFoldersAndFileEntriesAndFileShortcuts
public List<RepositoryEntry> getFoldersAndFileEntriesAndFileShortcuts(long folderId, int status, String[] mimeTypes, boolean includeMountFolders, int start, int end, OrderByComparator<?> orderByComparator) throws PortalException - Specified by:
getFoldersAndFileEntriesAndFileShortcutsin interfaceRepository- Throws:
PortalException
-
getFoldersAndFileEntriesAndFileShortcutsCount
public int getFoldersAndFileEntriesAndFileShortcutsCount(long folderId, int status, boolean includeMountFolders) - Specified by:
getFoldersAndFileEntriesAndFileShortcutsCountin interfaceDocumentRepository
-
getFoldersAndFileEntriesAndFileShortcutsCount
public int getFoldersAndFileEntriesAndFileShortcutsCount(long folderId, int status, String[] mimeTypes, boolean includeMountFolders) throws PortalException - Specified by:
getFoldersAndFileEntriesAndFileShortcutsCountin 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:
getFoldersCountin interfaceDocumentRepository- Throws:
PortalException
-
getGroupId
public long getGroupId() -
getLocalRepository
- Specified by:
getLocalRepositoryin interfaceBaseRepository
-
getRepositoryFileEntries
public List<FileEntry> getRepositoryFileEntries(long userId, long rootFolderId, int start, int end, OrderByComparator<FileEntry> orderByComparator) throws PortalException - Specified by:
getRepositoryFileEntriesin 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:
getRepositoryFileEntriesin interfaceRepository- Throws:
PortalException
-
getRepositoryFileEntriesCount
- Specified by:
getRepositoryFileEntriesCountin interfaceRepository- Throws:
PortalException
-
getRepositoryFileEntriesCount
public int getRepositoryFileEntriesCount(long userId, long rootFolderId, String[] mimeTypes, int status) throws PortalException - Specified by:
getRepositoryFileEntriesCountin interfaceRepository- Throws:
PortalException
-
getRepositoryId
public long getRepositoryId()- Specified by:
getRepositoryIdin interfaceDocumentRepository
-
getSupportedParameters
Deprecated.As of Wilberforce (7.0.x)- Specified by:
getSupportedParametersin interfaceBaseRepository
-
getTypeSettingsProperties
-
initRepository
- Specified by:
initRepositoryin interfaceBaseRepository- Throws:
PortalException
-
isCapabilityProvided
- Specified by:
isCapabilityProvidedin interfaceCapabilityProvider
-
search
- Specified by:
searchin interfaceRepository- Throws:
SearchException
-
setAssetEntryLocalService
- Specified by:
setAssetEntryLocalServicein interfaceBaseRepository
-
setCompanyId
public void setCompanyId(long companyId) - Specified by:
setCompanyIdin interfaceBaseRepository
-
setCompanyLocalService
- Specified by:
setCompanyLocalServicein interfaceBaseRepository
-
setDLAppHelperLocalService
- Specified by:
setDLAppHelperLocalServicein interfaceBaseRepository
-
setDLFolderLocalService
- Specified by:
setDLFolderLocalServicein interfaceBaseRepository
-
setGroupId
public void setGroupId(long groupId) - Specified by:
setGroupIdin interfaceBaseRepository
-
setRepositoryEntryLocalService
- Specified by:
setRepositoryEntryLocalServicein interfaceBaseRepository
-
setRepositoryId
public void setRepositoryId(long repositoryId) - Specified by:
setRepositoryIdin interfaceBaseRepository
-
setTypeSettingsProperties
- Specified by:
setTypeSettingsPropertiesin interfaceBaseRepository
-
setUserLocalService
- Specified by:
setUserLocalServicein interfaceBaseRepository
-
unlockFolder
- Specified by:
unlockFolderin 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:
updateFileEntryin 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:
updateFileEntryin interfaceDocumentRepository- Throws:
PortalException
-
updateFolder
public Folder updateFolder(long folderId, long parentFolderId, String name, String description, ServiceContext serviceContext) - Specified by:
updateFolderin interfaceDocumentRepository
-
verifyFileEntryLock
- Specified by:
verifyFileEntryLockin 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
-