Liferay 6.0.5

com.liferay.documentlibrary.util
Class AdvancedFileSystemHook

java.lang.Object
  extended by com.liferay.documentlibrary.util.BaseHook
      extended by com.liferay.documentlibrary.util.FileSystemHook
          extended by com.liferay.documentlibrary.util.AdvancedFileSystemHook
All Implemented Interfaces:
Hook

public class AdvancedFileSystemHook
extends FileSystemHook

See http://issues.liferay.com/browse/LPS-1976.


Field Summary
 
Fields inherited from interface com.liferay.documentlibrary.util.Hook
DEFAULT_VERSION
 
Constructor Summary
AdvancedFileSystemHook()
           
 
Method Summary
protected  void buildPath(StringBundler sb, String fileNameFragment)
           
protected  int getDepth(String path)
           
protected  File getDirNameDir(long companyId, long repositoryId, String dirName)
           
protected  Collection<Document> getDocuments(long companyId, String portletId, long groupId, long repositoryId, String fileName)
           
protected  File getFileNameDir(long companyId, long repositoryId, String fileName)
           
protected  File getFileNameVersionFile(long companyId, long repositoryId, String fileName, String version)
           
protected  String getHeadVersionNumber(long companyId, long repositoryId, String fileName)
           
 void reindex(String[] ids)
           
 void updateFile(long companyId, String portletId, long groupId, long repositoryId, String fileName, 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
 

Constructor Detail

AdvancedFileSystemHook

public AdvancedFileSystemHook()
Method Detail

reindex

public void reindex(String[] ids)
             throws SearchException
Specified by:
reindex in interface Hook
Overrides:
reindex in class FileSystemHook
Throws:
SearchException

updateFile

public void updateFile(long companyId,
                       String portletId,
                       long groupId,
                       long repositoryId,
                       String fileName,
                       String newFileName,
                       boolean reindex)
                throws PortalException
Specified by:
updateFile in interface Hook
Overrides:
updateFile in class FileSystemHook
Throws:
PortalException

buildPath

protected void buildPath(StringBundler sb,
                         String fileNameFragment)

getDepth

protected int getDepth(String path)

getDirNameDir

protected File getDirNameDir(long companyId,
                             long repositoryId,
                             String dirName)
Overrides:
getDirNameDir in class FileSystemHook

getDocuments

protected Collection<Document> getDocuments(long companyId,
                                            String portletId,
                                            long groupId,
                                            long repositoryId,
                                            String fileName)
                                     throws SearchException
Throws:
SearchException

getFileNameDir

protected File getFileNameDir(long companyId,
                              long repositoryId,
                              String fileName)
Overrides:
getFileNameDir in class FileSystemHook

getFileNameVersionFile

protected File getFileNameVersionFile(long companyId,
                                      long repositoryId,
                                      String fileName,
                                      String version)
Overrides:
getFileNameVersionFile in class FileSystemHook

getHeadVersionNumber

protected String getHeadVersionNumber(long companyId,
                                      long repositoryId,
                                      String fileName)
Overrides:
getHeadVersionNumber in class FileSystemHook

Liferay 6.0.5