com.liferay.portlet.documentlibrary.store
Class DLStoreImpl
java.lang.Object
com.liferay.portlet.documentlibrary.store.DLStoreImpl
- All Implemented Interfaces:
- com.liferay.portlet.documentlibrary.store.DLStore
public class DLStoreImpl
- extends java.lang.Object
- implements com.liferay.portlet.documentlibrary.store.DLStore
- Author:
- Brian Wing Shun Chan, Alexander Chow, Edward Han
|
Field Summary |
protected com.liferay.portal.service.GroupLocalService |
groupLocalService
|
protected com.liferay.portlet.documentlibrary.store.Store |
store
|
|
Method Summary |
void |
addDirectory(long companyId,
long repositoryId,
java.lang.String dirName)
|
void |
addFile(long companyId,
long repositoryId,
java.lang.String fileName,
boolean validateFileExtension,
byte[] bytes)
|
void |
addFile(long companyId,
long repositoryId,
java.lang.String fileName,
boolean validateFileExtension,
java.io.File file)
|
void |
addFile(long companyId,
long repositoryId,
java.lang.String fileName,
boolean validateFileExtension,
java.io.InputStream is)
|
void |
addFile(long companyId,
long repositoryId,
java.lang.String fileName,
byte[] bytes)
|
void |
addFile(long companyId,
long repositoryId,
java.lang.String fileName,
java.io.File file)
|
void |
addFile(long companyId,
long repositoryId,
java.lang.String fileName,
java.io.InputStream is)
|
void |
checkRoot(long companyId)
|
void |
copyFileVersion(long companyId,
long repositoryId,
java.lang.String fileName,
java.lang.String fromVersionLabel,
java.lang.String toVersionLabel)
|
void |
deleteDirectory(long companyId,
long repositoryId,
java.lang.String dirName)
|
void |
deleteFile(long companyId,
long repositoryId,
java.lang.String fileName)
|
void |
deleteFile(long companyId,
long repositoryId,
java.lang.String fileName,
java.lang.String versionLabel)
|
java.io.File |
getFile(long companyId,
long repositoryId,
java.lang.String fileName)
|
java.io.File |
getFile(long companyId,
long repositoryId,
java.lang.String fileName,
java.lang.String versionLabel)
|
byte[] |
getFileAsBytes(long companyId,
long repositoryId,
java.lang.String fileName)
|
byte[] |
getFileAsBytes(long companyId,
long repositoryId,
java.lang.String fileName,
java.lang.String versionLabel)
|
java.io.InputStream |
getFileAsStream(long companyId,
long repositoryId,
java.lang.String fileName)
|
java.io.InputStream |
getFileAsStream(long companyId,
long repositoryId,
java.lang.String fileName,
java.lang.String versionLabel)
|
java.lang.String[] |
getFileNames(long companyId,
long repositoryId,
java.lang.String dirName)
|
long |
getFileSize(long companyId,
long repositoryId,
java.lang.String fileName)
|
boolean |
hasDirectory(long companyId,
long repositoryId,
java.lang.String dirName)
|
boolean |
hasFile(long companyId,
long repositoryId,
java.lang.String fileName)
|
boolean |
hasFile(long companyId,
long repositoryId,
java.lang.String fileName,
java.lang.String versionLabel)
|
protected boolean |
isValidName(java.lang.String name)
|
void |
move(java.lang.String srcDir,
java.lang.String destDir)
|
com.liferay.portal.kernel.search.Hits |
search(long companyId,
long userId,
java.lang.String portletId,
long groupId,
long[] repositoryIds,
java.lang.String keywords,
int start,
int end)
|
void |
updateFile(long companyId,
long repositoryId,
long newRepositoryId,
java.lang.String fileName)
|
void |
updateFile(long companyId,
long repositoryId,
java.lang.String fileName,
java.lang.String newFileName)
|
void |
updateFile(long companyId,
long repositoryId,
java.lang.String fileName,
java.lang.String fileExtension,
boolean validateFileExtension,
java.lang.String versionLabel,
java.lang.String sourceFileName,
java.io.File file)
|
void |
updateFile(long companyId,
long repositoryId,
java.lang.String fileName,
java.lang.String fileExtension,
boolean validateFileExtension,
java.lang.String versionLabel,
java.lang.String sourceFileName,
java.io.InputStream is)
|
void |
updateFileVersion(long companyId,
long repositoryId,
java.lang.String fileName,
java.lang.String fromVersionLabel,
java.lang.String toVersionLabel)
|
void |
validate(java.lang.String fileName,
boolean validateFileExtension)
|
void |
validate(java.lang.String fileName,
boolean validateFileExtension,
byte[] bytes)
|
void |
validate(java.lang.String fileName,
boolean validateFileExtension,
java.io.File file)
|
void |
validate(java.lang.String fileName,
boolean validateFileExtension,
java.io.InputStream is)
|
protected void |
validate(java.lang.String fileName,
java.lang.String fileExtension,
java.lang.String sourceFileName,
boolean validateFileExtension)
|
void |
validate(java.lang.String fileName,
java.lang.String fileExtension,
java.lang.String sourceFileName,
boolean validateFileExtension,
java.io.File file)
|
void |
validate(java.lang.String fileName,
java.lang.String fileExtension,
java.lang.String sourceFileName,
boolean validateFileExtension,
java.io.InputStream is)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
groupLocalService
@BeanReference(type=com.liferay.portal.service.GroupLocalService.class)
protected com.liferay.portal.service.GroupLocalService groupLocalService
store
@BeanReference(type=com.liferay.portlet.documentlibrary.store.Store.class)
protected com.liferay.portlet.documentlibrary.store.Store store
DLStoreImpl
public DLStoreImpl()
addDirectory
public void addDirectory(long companyId,
long repositoryId,
java.lang.String dirName)
throws com.liferay.portal.kernel.exception.PortalException,
com.liferay.portal.kernel.exception.SystemException
- Specified by:
addDirectory in interface com.liferay.portlet.documentlibrary.store.DLStore
- Throws:
com.liferay.portal.kernel.exception.PortalException
com.liferay.portal.kernel.exception.SystemException
addFile
public void addFile(long companyId,
long repositoryId,
java.lang.String fileName,
boolean validateFileExtension,
byte[] bytes)
throws com.liferay.portal.kernel.exception.PortalException,
com.liferay.portal.kernel.exception.SystemException
- Specified by:
addFile in interface com.liferay.portlet.documentlibrary.store.DLStore
- Throws:
com.liferay.portal.kernel.exception.PortalException
com.liferay.portal.kernel.exception.SystemException
addFile
public void addFile(long companyId,
long repositoryId,
java.lang.String fileName,
boolean validateFileExtension,
java.io.File file)
throws com.liferay.portal.kernel.exception.PortalException,
com.liferay.portal.kernel.exception.SystemException
- Specified by:
addFile in interface com.liferay.portlet.documentlibrary.store.DLStore
- Throws:
com.liferay.portal.kernel.exception.PortalException
com.liferay.portal.kernel.exception.SystemException
addFile
public void addFile(long companyId,
long repositoryId,
java.lang.String fileName,
boolean validateFileExtension,
java.io.InputStream is)
throws com.liferay.portal.kernel.exception.PortalException,
com.liferay.portal.kernel.exception.SystemException
- Specified by:
addFile in interface com.liferay.portlet.documentlibrary.store.DLStore
- Throws:
com.liferay.portal.kernel.exception.PortalException
com.liferay.portal.kernel.exception.SystemException
addFile
public void addFile(long companyId,
long repositoryId,
java.lang.String fileName,
byte[] bytes)
throws com.liferay.portal.kernel.exception.PortalException,
com.liferay.portal.kernel.exception.SystemException
- Specified by:
addFile in interface com.liferay.portlet.documentlibrary.store.DLStore
- Throws:
com.liferay.portal.kernel.exception.PortalException
com.liferay.portal.kernel.exception.SystemException
addFile
public void addFile(long companyId,
long repositoryId,
java.lang.String fileName,
java.io.File file)
throws com.liferay.portal.kernel.exception.PortalException,
com.liferay.portal.kernel.exception.SystemException
- Specified by:
addFile in interface com.liferay.portlet.documentlibrary.store.DLStore
- Throws:
com.liferay.portal.kernel.exception.PortalException
com.liferay.portal.kernel.exception.SystemException
addFile
public void addFile(long companyId,
long repositoryId,
java.lang.String fileName,
java.io.InputStream is)
throws com.liferay.portal.kernel.exception.PortalException,
com.liferay.portal.kernel.exception.SystemException
- Specified by:
addFile in interface com.liferay.portlet.documentlibrary.store.DLStore
- Throws:
com.liferay.portal.kernel.exception.PortalException
com.liferay.portal.kernel.exception.SystemException
checkRoot
public void checkRoot(long companyId)
throws com.liferay.portal.kernel.exception.SystemException
- Specified by:
checkRoot in interface com.liferay.portlet.documentlibrary.store.DLStore
- Throws:
com.liferay.portal.kernel.exception.SystemException
copyFileVersion
public void copyFileVersion(long companyId,
long repositoryId,
java.lang.String fileName,
java.lang.String fromVersionLabel,
java.lang.String toVersionLabel)
throws com.liferay.portal.kernel.exception.PortalException,
com.liferay.portal.kernel.exception.SystemException
- Specified by:
copyFileVersion in interface com.liferay.portlet.documentlibrary.store.DLStore
- Throws:
com.liferay.portal.kernel.exception.PortalException
com.liferay.portal.kernel.exception.SystemException
deleteDirectory
public void deleteDirectory(long companyId,
long repositoryId,
java.lang.String dirName)
throws com.liferay.portal.kernel.exception.PortalException,
com.liferay.portal.kernel.exception.SystemException
- Specified by:
deleteDirectory in interface com.liferay.portlet.documentlibrary.store.DLStore
- Throws:
com.liferay.portal.kernel.exception.PortalException
com.liferay.portal.kernel.exception.SystemException
deleteFile
public void deleteFile(long companyId,
long repositoryId,
java.lang.String fileName)
throws com.liferay.portal.kernel.exception.PortalException,
com.liferay.portal.kernel.exception.SystemException
- Specified by:
deleteFile in interface com.liferay.portlet.documentlibrary.store.DLStore
- Throws:
com.liferay.portal.kernel.exception.PortalException
com.liferay.portal.kernel.exception.SystemException
deleteFile
public void deleteFile(long companyId,
long repositoryId,
java.lang.String fileName,
java.lang.String versionLabel)
throws com.liferay.portal.kernel.exception.PortalException,
com.liferay.portal.kernel.exception.SystemException
- Specified by:
deleteFile in interface com.liferay.portlet.documentlibrary.store.DLStore
- Throws:
com.liferay.portal.kernel.exception.PortalException
com.liferay.portal.kernel.exception.SystemException
getFile
public java.io.File getFile(long companyId,
long repositoryId,
java.lang.String fileName)
throws com.liferay.portal.kernel.exception.PortalException,
com.liferay.portal.kernel.exception.SystemException
- Specified by:
getFile in interface com.liferay.portlet.documentlibrary.store.DLStore
- Throws:
com.liferay.portal.kernel.exception.PortalException
com.liferay.portal.kernel.exception.SystemException
getFile
public java.io.File getFile(long companyId,
long repositoryId,
java.lang.String fileName,
java.lang.String versionLabel)
throws com.liferay.portal.kernel.exception.PortalException,
com.liferay.portal.kernel.exception.SystemException
- Specified by:
getFile in interface com.liferay.portlet.documentlibrary.store.DLStore
- Throws:
com.liferay.portal.kernel.exception.PortalException
com.liferay.portal.kernel.exception.SystemException
getFileAsBytes
public byte[] getFileAsBytes(long companyId,
long repositoryId,
java.lang.String fileName)
throws com.liferay.portal.kernel.exception.PortalException,
com.liferay.portal.kernel.exception.SystemException
- Specified by:
getFileAsBytes in interface com.liferay.portlet.documentlibrary.store.DLStore
- Throws:
com.liferay.portal.kernel.exception.PortalException
com.liferay.portal.kernel.exception.SystemException
getFileAsBytes
public byte[] getFileAsBytes(long companyId,
long repositoryId,
java.lang.String fileName,
java.lang.String versionLabel)
throws com.liferay.portal.kernel.exception.PortalException,
com.liferay.portal.kernel.exception.SystemException
- Specified by:
getFileAsBytes in interface com.liferay.portlet.documentlibrary.store.DLStore
- Throws:
com.liferay.portal.kernel.exception.PortalException
com.liferay.portal.kernel.exception.SystemException
getFileAsStream
public java.io.InputStream getFileAsStream(long companyId,
long repositoryId,
java.lang.String fileName)
throws com.liferay.portal.kernel.exception.PortalException,
com.liferay.portal.kernel.exception.SystemException
- Specified by:
getFileAsStream in interface com.liferay.portlet.documentlibrary.store.DLStore
- Throws:
com.liferay.portal.kernel.exception.PortalException
com.liferay.portal.kernel.exception.SystemException
getFileAsStream
public java.io.InputStream getFileAsStream(long companyId,
long repositoryId,
java.lang.String fileName,
java.lang.String versionLabel)
throws com.liferay.portal.kernel.exception.PortalException,
com.liferay.portal.kernel.exception.SystemException
- Specified by:
getFileAsStream in interface com.liferay.portlet.documentlibrary.store.DLStore
- Throws:
com.liferay.portal.kernel.exception.PortalException
com.liferay.portal.kernel.exception.SystemException
getFileNames
public java.lang.String[] getFileNames(long companyId,
long repositoryId,
java.lang.String dirName)
throws com.liferay.portal.kernel.exception.PortalException,
com.liferay.portal.kernel.exception.SystemException
- Specified by:
getFileNames in interface com.liferay.portlet.documentlibrary.store.DLStore
- Throws:
com.liferay.portal.kernel.exception.PortalException
com.liferay.portal.kernel.exception.SystemException
getFileSize
public long getFileSize(long companyId,
long repositoryId,
java.lang.String fileName)
throws com.liferay.portal.kernel.exception.PortalException,
com.liferay.portal.kernel.exception.SystemException
- Specified by:
getFileSize in interface com.liferay.portlet.documentlibrary.store.DLStore
- Throws:
com.liferay.portal.kernel.exception.PortalException
com.liferay.portal.kernel.exception.SystemException
hasDirectory
public boolean hasDirectory(long companyId,
long repositoryId,
java.lang.String dirName)
throws com.liferay.portal.kernel.exception.PortalException,
com.liferay.portal.kernel.exception.SystemException
- Specified by:
hasDirectory in interface com.liferay.portlet.documentlibrary.store.DLStore
- Throws:
com.liferay.portal.kernel.exception.PortalException
com.liferay.portal.kernel.exception.SystemException
hasFile
public boolean hasFile(long companyId,
long repositoryId,
java.lang.String fileName)
throws com.liferay.portal.kernel.exception.PortalException,
com.liferay.portal.kernel.exception.SystemException
- Specified by:
hasFile in interface com.liferay.portlet.documentlibrary.store.DLStore
- Throws:
com.liferay.portal.kernel.exception.PortalException
com.liferay.portal.kernel.exception.SystemException
hasFile
public boolean hasFile(long companyId,
long repositoryId,
java.lang.String fileName,
java.lang.String versionLabel)
throws com.liferay.portal.kernel.exception.PortalException,
com.liferay.portal.kernel.exception.SystemException
- Specified by:
hasFile in interface com.liferay.portlet.documentlibrary.store.DLStore
- Throws:
com.liferay.portal.kernel.exception.PortalException
com.liferay.portal.kernel.exception.SystemException
move
public void move(java.lang.String srcDir,
java.lang.String destDir)
throws com.liferay.portal.kernel.exception.SystemException
- Specified by:
move in interface com.liferay.portlet.documentlibrary.store.DLStore
- Throws:
com.liferay.portal.kernel.exception.SystemException
search
public com.liferay.portal.kernel.search.Hits search(long companyId,
long userId,
java.lang.String portletId,
long groupId,
long[] repositoryIds,
java.lang.String keywords,
int start,
int end)
throws com.liferay.portal.kernel.exception.SystemException
- Throws:
com.liferay.portal.kernel.exception.SystemException
updateFile
public void updateFile(long companyId,
long repositoryId,
long newRepositoryId,
java.lang.String fileName)
throws com.liferay.portal.kernel.exception.PortalException,
com.liferay.portal.kernel.exception.SystemException
- Specified by:
updateFile in interface com.liferay.portlet.documentlibrary.store.DLStore
- Throws:
com.liferay.portal.kernel.exception.PortalException
com.liferay.portal.kernel.exception.SystemException
updateFile
public void updateFile(long companyId,
long repositoryId,
java.lang.String fileName,
java.lang.String newFileName)
throws com.liferay.portal.kernel.exception.PortalException,
com.liferay.portal.kernel.exception.SystemException
- Specified by:
updateFile in interface com.liferay.portlet.documentlibrary.store.DLStore
- Throws:
com.liferay.portal.kernel.exception.PortalException
com.liferay.portal.kernel.exception.SystemException
updateFile
public void updateFile(long companyId,
long repositoryId,
java.lang.String fileName,
java.lang.String fileExtension,
boolean validateFileExtension,
java.lang.String versionLabel,
java.lang.String sourceFileName,
java.io.File file)
throws com.liferay.portal.kernel.exception.PortalException,
com.liferay.portal.kernel.exception.SystemException
- Specified by:
updateFile in interface com.liferay.portlet.documentlibrary.store.DLStore
- Throws:
com.liferay.portal.kernel.exception.PortalException
com.liferay.portal.kernel.exception.SystemException
updateFile
public void updateFile(long companyId,
long repositoryId,
java.lang.String fileName,
java.lang.String fileExtension,
boolean validateFileExtension,
java.lang.String versionLabel,
java.lang.String sourceFileName,
java.io.InputStream is)
throws com.liferay.portal.kernel.exception.PortalException,
com.liferay.portal.kernel.exception.SystemException
- Specified by:
updateFile in interface com.liferay.portlet.documentlibrary.store.DLStore
- Throws:
com.liferay.portal.kernel.exception.PortalException
com.liferay.portal.kernel.exception.SystemException
updateFileVersion
public void updateFileVersion(long companyId,
long repositoryId,
java.lang.String fileName,
java.lang.String fromVersionLabel,
java.lang.String toVersionLabel)
throws com.liferay.portal.kernel.exception.PortalException,
com.liferay.portal.kernel.exception.SystemException
- Specified by:
updateFileVersion in interface com.liferay.portlet.documentlibrary.store.DLStore
- Throws:
com.liferay.portal.kernel.exception.PortalException
com.liferay.portal.kernel.exception.SystemException
validate
public void validate(java.lang.String fileName,
boolean validateFileExtension)
throws com.liferay.portal.kernel.exception.PortalException,
com.liferay.portal.kernel.exception.SystemException
- Specified by:
validate in interface com.liferay.portlet.documentlibrary.store.DLStore
- Throws:
com.liferay.portal.kernel.exception.PortalException
com.liferay.portal.kernel.exception.SystemException
validate
public void validate(java.lang.String fileName,
boolean validateFileExtension,
byte[] bytes)
throws com.liferay.portal.kernel.exception.PortalException,
com.liferay.portal.kernel.exception.SystemException
- Specified by:
validate in interface com.liferay.portlet.documentlibrary.store.DLStore
- Throws:
com.liferay.portal.kernel.exception.PortalException
com.liferay.portal.kernel.exception.SystemException
validate
public void validate(java.lang.String fileName,
boolean validateFileExtension,
java.io.File file)
throws com.liferay.portal.kernel.exception.PortalException,
com.liferay.portal.kernel.exception.SystemException
- Specified by:
validate in interface com.liferay.portlet.documentlibrary.store.DLStore
- Throws:
com.liferay.portal.kernel.exception.PortalException
com.liferay.portal.kernel.exception.SystemException
validate
public void validate(java.lang.String fileName,
boolean validateFileExtension,
java.io.InputStream is)
throws com.liferay.portal.kernel.exception.PortalException,
com.liferay.portal.kernel.exception.SystemException
- Specified by:
validate in interface com.liferay.portlet.documentlibrary.store.DLStore
- Throws:
com.liferay.portal.kernel.exception.PortalException
com.liferay.portal.kernel.exception.SystemException
validate
public void validate(java.lang.String fileName,
java.lang.String fileExtension,
java.lang.String sourceFileName,
boolean validateFileExtension,
java.io.File file)
throws com.liferay.portal.kernel.exception.PortalException,
com.liferay.portal.kernel.exception.SystemException
- Specified by:
validate in interface com.liferay.portlet.documentlibrary.store.DLStore
- Throws:
com.liferay.portal.kernel.exception.PortalException
com.liferay.portal.kernel.exception.SystemException
validate
public void validate(java.lang.String fileName,
java.lang.String fileExtension,
java.lang.String sourceFileName,
boolean validateFileExtension,
java.io.InputStream is)
throws com.liferay.portal.kernel.exception.PortalException,
com.liferay.portal.kernel.exception.SystemException
- Specified by:
validate in interface com.liferay.portlet.documentlibrary.store.DLStore
- Throws:
com.liferay.portal.kernel.exception.PortalException
com.liferay.portal.kernel.exception.SystemException
isValidName
protected boolean isValidName(java.lang.String name)
validate
protected void validate(java.lang.String fileName,
java.lang.String fileExtension,
java.lang.String sourceFileName,
boolean validateFileExtension)
throws com.liferay.portal.kernel.exception.PortalException,
com.liferay.portal.kernel.exception.SystemException
- Throws:
com.liferay.portal.kernel.exception.PortalException
com.liferay.portal.kernel.exception.SystemException