|
RichFaces Photoalbum 4.3.5.Final | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.richfaces.photoalbum.manager.FileManager
@Named @ApplicationScoped public class FileManager
| Constructor Summary | |
|---|---|
FileManager()
|
|
| Method Summary | |
|---|---|
boolean |
addImage(String fileName,
FileHandler fileHandler)
This method invoked after user upload new image |
void |
deleteImage(ImageEvent ie)
This method observes Constants.IMAGE_DELETED_EVENT and invoked after the user delete her image This method
delete image and all thumbnails of this image from the disk |
File |
getFileByAbsolutePath(String path)
This method used to get reference to the file with the absolute path |
File |
getFileByPath(String path)
This method used to get reference to the file with the specified relative path to the uploadRoot field |
boolean |
isDirectoryPresent(String path)
This utility method used to determine if the directory with specified relative path exist |
boolean |
isFilePresent(String path)
This utility method used to determine if the file with specified relative path exist |
void |
onAlbumAdded(AlbumEvent ae)
This method observes ALBUM_ADDED_EVENT and invoked after the user add new album This method add album
directory to the disk |
void |
onAlbumDeleted(AlbumEvent ae)
This method observes Constants.ALBUM_DELETED_EVENT and invoked after the user delete album. |
void |
onShelfAdded(ShelfEvent se)
This method observes SHELF_ADDED_EVENT and invoked after the user add new shelf This method add shelf
directory to the disk |
void |
onShelfDeleted(ShelfEvent se)
This method observes Constants.SHELF_DELETED_EVENT and invoked after the user delete her shelf This method
delete shelf directory from the disk |
void |
onUserDeleted(SimpleEvent se)
This method observes Constants.USER_DELETED_EVENT and invoked after the user was deleted(used in livedemo to
prevent flooding) This method delete user directory from the disk |
void |
renameAlbumDirectory(AlbumEvent ae)
This method observes Constants.ALBUM_DRAGGED_EVENT and invoked after the user dragged album form one shelf
to the another. |
void |
renameImageFile(ImageEvent ie)
This method observes Constants.IMAGE_DRAGGED_EVENT and invoked after the user dragged image form one album
to the another. |
boolean |
saveAvatar(File avatarData,
User user)
This method invoked after user set new avatar icon |
String |
transformPath(String target,
String substitute)
This method used to transform one path to another. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public FileManager()
| Method Detail |
|---|
public File getFileByPath(String path)
path - - relative path of file
public void onAlbumDeleted(@Observes
AlbumEvent ae)
Constants.ALBUM_DELETED_EVENT and invoked after the user delete album. This method
delete album directory from the disk
album - - deleted albumpath - - relative path of the album directory
public void onShelfDeleted(@Observes
ShelfEvent se)
Constants.SHELF_DELETED_EVENT and invoked after the user delete her shelf This method
delete shelf directory from the disk
shelf - - deleted shelfpath - - relative path of the shelf directory
public void onUserDeleted(@Observes
SimpleEvent se)
Constants.USER_DELETED_EVENT and invoked after the user was deleted(used in livedemo to
prevent flooding) This method delete user directory from the disk
user - - deleted userpath - - relative path of the user directory
public void onShelfAdded(@Observes
ShelfEvent se)
SHELF_ADDED_EVENT and invoked after the user add new shelf This method add shelf
directory to the disk
shelf - - added shelf
public void onAlbumAdded(@Observes
AlbumEvent ae)
ALBUM_ADDED_EVENT and invoked after the user add new album This method add album
directory to the disk
album - - added album
public boolean saveAvatar(File avatarData,
User user)
avatarData - - avatar fileuser - - user, that add avatar
public void deleteImage(@Observes
ImageEvent ie)
Constants.IMAGE_DELETED_EVENT and invoked after the user delete her image This method
delete image and all thumbnails of this image from the disk
image - - deleted imagepath - - relative path of the image file
public boolean addImage(String fileName,
FileHandler fileHandler)
throws IOException
fileName - - new relative path to the image filetempFilePath - - absolute path to uploaded image
IOException
public String transformPath(String target,
String substitute)
target - - path to transformsubstitute - - new 'addon' to the pathpublic File getFileByAbsolutePath(String path)
path - - absolute path of file
public boolean isDirectoryPresent(String path)
path - - absolute path of directory
public boolean isFilePresent(String path)
path - - absolute path of file
public void renameAlbumDirectory(@Observes
AlbumEvent ae)
Constants.ALBUM_DRAGGED_EVENT and invoked after the user dragged album form one shelf
to the another. This method rename album directory to the new directory
album - - dragged albumpathOld - - old path of album directory
public void renameImageFile(@Observes
ImageEvent ie)
Constants.IMAGE_DRAGGED_EVENT and invoked after the user dragged image form one album
to the another. This method rename image file and all thumbnails to the new name
image - - dragged imagepathOld - - old path of image file
|
RichFaces Photoalbum 4.3.5.Final | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||