Liferay 6.0.5

com.liferay.documentlibrary.util
Class S3Hook

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

public class S3Hook
extends BaseHook


Field Summary
 
Fields inherited from interface com.liferay.documentlibrary.util.Hook
DEFAULT_VERSION
 
Constructor Summary
S3Hook()
           
 
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  org.jets3t.service.security.AWSCredentials getAWSCredentials()
           
 InputStream getFileAsStream(long companyId, long repositoryId, String fileName, String versionNumber)
           
protected  String getFileName(String key)
           
 String[] getFileNames(long companyId, long repositoryId, String dirName)
           
 long getFileSize(long companyId, long repositoryId, String fileName)
           
protected  String getHeadVersionNumber(long companyId, long repositoryId, String fileName)
           
protected  String getKey(long companyId, long repositoryId)
           
protected  String getKey(long companyId, long repositoryId, String fileName)
           
protected  String getKey(long companyId, long repositoryId, String fileName, String versionNumber)
           
protected  org.jets3t.service.model.S3Bucket getS3Bucket()
           
protected  org.jets3t.service.S3Service getS3Service()
           
 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

S3Hook

public S3Hook()
Method Detail

addDirectory

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

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 SystemException
Specified by:
deleteDirectory in interface Hook
Specified by:
deleteDirectory in class BaseHook
Throws:
SystemException

deleteFile

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

deleteFile

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

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 SystemException
Specified by:
getFileNames in interface Hook
Specified by:
getFileNames in class BaseHook
Throws:
SystemException

getFileSize

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

hasFile

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

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,
                       SystemException
Specified by:
updateFile in interface Hook
Specified by:
updateFile in class BaseHook
Throws:
PortalException
SystemException

updateFile

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

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

getAWSCredentials

protected org.jets3t.service.security.AWSCredentials getAWSCredentials()
                                                                throws org.jets3t.service.S3ServiceException
Throws:
org.jets3t.service.S3ServiceException

getFileName

protected String getFileName(String key)

getHeadVersionNumber

protected String getHeadVersionNumber(long companyId,
                                      long repositoryId,
                                      String fileName)
                               throws PortalException,
                                      org.jets3t.service.S3ServiceException
Throws:
PortalException
org.jets3t.service.S3ServiceException

getKey

protected String getKey(long companyId,
                        long repositoryId)

getKey

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

getKey

protected String getKey(long companyId,
                        long repositoryId,
                        String fileName,
                        String versionNumber)

getS3Bucket

protected org.jets3t.service.model.S3Bucket getS3Bucket()
                                                 throws org.jets3t.service.S3ServiceException
Throws:
org.jets3t.service.S3ServiceException

getS3Service

protected org.jets3t.service.S3Service getS3Service()
                                             throws org.jets3t.service.S3ServiceException
Throws:
org.jets3t.service.S3ServiceException

Liferay 6.0.5