Liferay 6.0.5

com.liferay.documentlibrary.util
Class FileSystemHook

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

public class FileSystemHook
extends BaseHook


Field Summary
 
Fields inherited from interface com.liferay.documentlibrary.util.Hook
DEFAULT_VERSION
 
Constructor Summary
FileSystemHook()
           
 
Method Summary
 void addDirectory(long companyId, long repositoryId, String dirName)
           
 void addFile(long companyId, String portletId, long groupId, long repositoryId, String fileName, long fileEntryId, String properties, Date modifiedDate, ServiceContext serviceContext, InputStream is)
           
 void checkRoot(long companyId)
           
 void deleteDirectory(long companyId, String portletId, long repositoryId, String dirName)
           
 void deleteFile(long companyId, String portletId, long repositoryId, String fileName)
           
 void deleteFile(long companyId, String portletId, long repositoryId, String fileName, String versionNumber)
           
protected  File getCompanyDir(long companyId)
           
protected  File getDirNameDir(long companyId, long repositoryId, String dirName)
           
 InputStream getFileAsStream(long companyId, long repositoryId, String fileName, String versionNumber)
           
protected  File getFileNameDir(long companyId, long repositoryId, String fileName)
           
 String[] getFileNames(long companyId, long repositoryId, String dirName)
           
protected  File getFileNameVersionFile(long companyId, long repositoryId, String fileName, String version)
           
 long getFileSize(long companyId, long repositoryId, String fileName)
           
protected  String getHeadVersionNumber(long companyId, long repositoryId, String fileName)
           
protected  File getRepositoryDir(long companyId, long repositoryId)
           
 boolean hasFile(long companyId, long repositoryId, String fileName, String versionNumber)
           
 void move(String srcDir, String destDir)
           
 void reindex(String[] ids)
           
 void updateFile(long companyId, String portletId, long groupId, long repositoryId, long newRepositoryId, String fileName, long fileEntryId)
           
 void updateFile(long companyId, String portletId, long groupId, long repositoryId, String fileName, String newFileName, boolean reindex)
           
 void updateFile(long companyId, String portletId, long groupId, long repositoryId, String fileName, String versionNumber, String sourceFileName, long fileEntryId, String properties, Date modifiedDate, ServiceContext serviceContext, InputStream is)
           
 
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

FileSystemHook

public FileSystemHook()
Method Detail

addDirectory

public void addDirectory(long companyId,
                         long repositoryId,
                         String dirName)
                  throws PortalException
Specified by:
addDirectory in interface Hook
Specified by:
addDirectory in class BaseHook
Throws:
PortalException

addFile

public void addFile(long companyId,
                    String portletId,
                    long groupId,
                    long repositoryId,
                    String fileName,
                    long fileEntryId,
                    String properties,
                    Date modifiedDate,
                    ServiceContext serviceContext,
                    InputStream is)
             throws PortalException,
                    SystemException
Specified by:
addFile in interface Hook
Specified by:
addFile in class BaseHook
Throws:
PortalException
SystemException

checkRoot

public void checkRoot(long companyId)
Specified by:
checkRoot in interface Hook
Specified by:
checkRoot in class BaseHook

deleteDirectory

public void deleteDirectory(long companyId,
                            String portletId,
                            long repositoryId,
                            String dirName)
                     throws PortalException
Specified by:
deleteDirectory in interface Hook
Specified by:
deleteDirectory in class BaseHook
Throws:
PortalException

deleteFile

public void deleteFile(long companyId,
                       String portletId,
                       long repositoryId,
                       String fileName)
                throws PortalException
Specified by:
deleteFile in interface Hook
Specified by:
deleteFile in class BaseHook
Throws:
PortalException

deleteFile

public void deleteFile(long companyId,
                       String portletId,
                       long repositoryId,
                       String fileName,
                       String versionNumber)
                throws PortalException
Specified by:
deleteFile in interface Hook
Specified by:
deleteFile in class BaseHook
Throws:
PortalException

getFileAsStream

public InputStream getFileAsStream(long companyId,
                                   long repositoryId,
                                   String fileName,
                                   String versionNumber)
                            throws PortalException,
                                   SystemException
Specified by:
getFileAsStream in interface Hook
Specified by:
getFileAsStream in class BaseHook
Throws:
PortalException
SystemException

getFileNames

public String[] getFileNames(long companyId,
                             long repositoryId,
                             String dirName)
                      throws PortalException
Specified by:
getFileNames in interface Hook
Specified by:
getFileNames in class BaseHook
Throws:
PortalException

getFileSize

public long getFileSize(long companyId,
                        long repositoryId,
                        String fileName)
                 throws PortalException
Specified by:
getFileSize in interface Hook
Specified by:
getFileSize in class BaseHook
Throws:
PortalException

hasFile

public boolean hasFile(long companyId,
                       long repositoryId,
                       String fileName,
                       String versionNumber)
Specified by:
hasFile in interface Hook
Specified by:
hasFile in class BaseHook

move

public void move(String srcDir,
                 String destDir)
Specified by:
move in interface Hook
Specified by:
move in class BaseHook

reindex

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

updateFile

public void updateFile(long companyId,
                       String portletId,
                       long groupId,
                       long repositoryId,
                       long newRepositoryId,
                       String fileName,
                       long fileEntryId)
                throws PortalException
Specified by:
updateFile in interface Hook
Specified by:
updateFile in class BaseHook
Throws:
PortalException

updateFile

public void updateFile(long companyId,
                       String portletId,
                       long groupId,
                       long repositoryId,
                       String fileName,
                       String newFileName,
                       boolean reindex)
                throws PortalException
Throws:
PortalException

updateFile

public void updateFile(long companyId,
                       String portletId,
                       long groupId,
                       long repositoryId,
                       String fileName,
                       String versionNumber,
                       String sourceFileName,
                       long fileEntryId,
                       String properties,
                       Date modifiedDate,
                       ServiceContext serviceContext,
                       InputStream is)
                throws PortalException,
                       SystemException
Specified by:
updateFile in interface Hook
Specified by:
updateFile in class BaseHook
Throws:
PortalException
SystemException

getCompanyDir

protected File getCompanyDir(long companyId)

getDirNameDir

protected File getDirNameDir(long companyId,
                             long repositoryId,
                             String dirName)

getFileNameDir

protected File getFileNameDir(long companyId,
                              long repositoryId,
                              String fileName)

getFileNameVersionFile

protected File getFileNameVersionFile(long companyId,
                                      long repositoryId,
                                      String fileName,
                                      String version)

getHeadVersionNumber

protected String getHeadVersionNumber(long companyId,
                                      long repositoryId,
                                      String fileName)

getRepositoryDir

protected File getRepositoryDir(long companyId,
                                long repositoryId)

Liferay 6.0.5