com.liferay.portal.image
Class FileSystemHook

java.lang.Object
  extended by com.liferay.portal.image.BaseHook
      extended by com.liferay.portal.image.FileSystemHook
All Implemented Interfaces:
Hook

public class FileSystemHook
extends BaseHook

View Source

Author:
Jorge Ferrer

Constructor Summary
FileSystemHook()
           
 
Method Summary
protected  void buildPath(java.lang.StringBuilder sb, java.lang.String fileNameFragment)
           
 void deleteImage(com.liferay.portal.model.Image image)
           
protected  java.io.File getFile(long imageId, java.lang.String type)
           
 byte[] getImageAsBytes(com.liferay.portal.model.Image image)
           
 java.io.InputStream getImageAsStream(com.liferay.portal.model.Image image)
           
 void updateImage(com.liferay.portal.model.Image image, java.lang.String type, byte[] bytes)
           
 
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

deleteImage

public void deleteImage(com.liferay.portal.model.Image image)

getImageAsBytes

public byte[] getImageAsBytes(com.liferay.portal.model.Image image)
                       throws com.liferay.portal.PortalException,
                              com.liferay.portal.SystemException
Throws:
com.liferay.portal.PortalException
com.liferay.portal.SystemException

getImageAsStream

public java.io.InputStream getImageAsStream(com.liferay.portal.model.Image image)
                                     throws com.liferay.portal.PortalException,
                                            com.liferay.portal.SystemException
Throws:
com.liferay.portal.PortalException
com.liferay.portal.SystemException

updateImage

public void updateImage(com.liferay.portal.model.Image image,
                        java.lang.String type,
                        byte[] bytes)
                 throws com.liferay.portal.SystemException
Throws:
com.liferay.portal.SystemException

buildPath

protected void buildPath(java.lang.StringBuilder sb,
                         java.lang.String fileNameFragment)

getFile

protected java.io.File getFile(long imageId,
                               java.lang.String type)