com.liferay.documentlibrary.util
Class AdvancedFileSystemHook
java.lang.Object
com.liferay.documentlibrary.util.BaseHook
com.liferay.documentlibrary.util.FileSystemHook
com.liferay.documentlibrary.util.AdvancedFileSystemHook
- All Implemented Interfaces:
- com.liferay.documentlibrary.util.Hook
public class AdvancedFileSystemHook
- extends FileSystemHook
View Source
See http://issues.liferay.com/browse/LPS-1976.
- Author:
- Jorge Ferrer, Ryan Park, Brian Wing Shun Chan
Fields inherited from interface com.liferay.documentlibrary.util.Hook |
DEFAULT_VERSION |
Method Summary |
protected void |
buildPath(com.liferay.portal.kernel.util.StringBundler sb,
java.lang.String fileNameFragment)
|
protected int |
getDepth(java.lang.String path)
|
protected java.io.File |
getDirNameDir(long companyId,
long repositoryId,
java.lang.String dirName)
|
protected java.util.Collection<com.liferay.portal.kernel.search.Document> |
getDocuments(long companyId,
java.lang.String portletId,
long groupId,
long repositoryId,
java.lang.String fileName)
|
protected java.io.File |
getFileNameDir(long companyId,
long repositoryId,
java.lang.String fileName)
|
protected java.io.File |
getFileNameVersionFile(long companyId,
long repositoryId,
java.lang.String fileName,
java.lang.String version)
|
protected java.lang.String |
getHeadVersionNumber(long companyId,
long repositoryId,
java.lang.String fileName)
|
void |
reindex(java.lang.String[] ids)
|
void |
updateFile(long companyId,
java.lang.String portletId,
long groupId,
long repositoryId,
java.lang.String fileName,
java.lang.String newFileName,
boolean reindex)
|
Methods inherited from class com.liferay.documentlibrary.util.FileSystemHook |
addDirectory, addFile, checkRoot, deleteDirectory, deleteFile, deleteFile, getCompanyDir, getFileAsStream, getFileNames, getFileSize, getRepositoryDir, hasFile, move, updateFile, updateFile |
Methods inherited from class com.liferay.documentlibrary.util.BaseHook |
addFile, addFile, getFile, getFile, getFileAsStream, updateFile, updateFile |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AdvancedFileSystemHook
public AdvancedFileSystemHook()
reindex
public void reindex(java.lang.String[] ids)
throws com.liferay.portal.kernel.search.SearchException
- Specified by:
reindex
in interface com.liferay.documentlibrary.util.Hook
- Overrides:
reindex
in class FileSystemHook
- Throws:
com.liferay.portal.kernel.search.SearchException
updateFile
public void updateFile(long companyId,
java.lang.String portletId,
long groupId,
long repositoryId,
java.lang.String fileName,
java.lang.String newFileName,
boolean reindex)
throws com.liferay.portal.kernel.exception.PortalException
- Specified by:
updateFile
in interface com.liferay.documentlibrary.util.Hook
- Overrides:
updateFile
in class FileSystemHook
- Throws:
com.liferay.portal.kernel.exception.PortalException
buildPath
protected void buildPath(com.liferay.portal.kernel.util.StringBundler sb,
java.lang.String fileNameFragment)
getDepth
protected int getDepth(java.lang.String path)
getDirNameDir
protected java.io.File getDirNameDir(long companyId,
long repositoryId,
java.lang.String dirName)
- Overrides:
getDirNameDir
in class FileSystemHook
getDocuments
protected java.util.Collection<com.liferay.portal.kernel.search.Document> getDocuments(long companyId,
java.lang.String portletId,
long groupId,
long repositoryId,
java.lang.String fileName)
throws com.liferay.portal.kernel.search.SearchException
- Throws:
com.liferay.portal.kernel.search.SearchException
getFileNameDir
protected java.io.File getFileNameDir(long companyId,
long repositoryId,
java.lang.String fileName)
- Overrides:
getFileNameDir
in class FileSystemHook
getFileNameVersionFile
protected java.io.File getFileNameVersionFile(long companyId,
long repositoryId,
java.lang.String fileName,
java.lang.String version)
- Overrides:
getFileNameVersionFile
in class FileSystemHook
getHeadVersionNumber
protected java.lang.String getHeadVersionNumber(long companyId,
long repositoryId,
java.lang.String fileName)
- Overrides:
getHeadVersionNumber
in class FileSystemHook