public class ImageAction extends Object implements IImageAction
Constructor and Description |
---|
ImageAction() |
Modifier and Type | Method and Description |
---|---|
void |
addComment(Comment comment)
Add comment from image
|
void |
addImage(Image image)
Persist image entity to database
|
void |
addMetaTag(Image image,
MetaTag metaTag)
Add MetaTag to image
|
void |
deleteComment(Comment comment)
Remove comment from image
|
void |
deleteImage(Image image)
Remove image entity from database
|
void |
editImage(Image image,
boolean metatagsChanged)
Synchronize state of image entity with database
|
List<Comment> |
findAllUserComments(User user)
Retrieve all cooments posted by given user.
|
Long |
getCountIdenticalImages(Album album,
String path)
Return count of images with path, that started from specified path already exist in specified album
|
List<MetaTag> |
getPopularTags()
Find most-popular metatags
|
MetaTag |
getTagByName(String tag)
Find metatag object by its string representation
|
List<MetaTag> |
getTagsLikeString(String suggest)
Find List of metatags, similar to specified string.
|
boolean |
isImageWithThisPathExist(Album album,
String path)
Check if image with specified path already exist in specified album
|
void |
removeMetaTag(Image image,
MetaTag metaTag)
Remove MetaTag to image
|
void |
resetImage(Image image)
Refresh state of given image
|
public void deleteImage(Image image) throws PhotoAlbumException
deleteImage
in interface IImageAction
image
- - image to deletePhotoAlbumException
public void editImage(Image image, boolean metatagsChanged) throws PhotoAlbumException
editImage
in interface IImageAction
image
- - image to SynchronizemetatagsChanged
- - boolean value, that indicates is metatags of this image were changed(add new or delete older)PhotoAlbumException
public void addImage(Image image) throws PhotoAlbumException
addImage
in interface IImageAction
image
- - image to addPhotoAlbumException
public void deleteComment(Comment comment) throws PhotoAlbumException
deleteComment
in interface IImageAction
comment
- - comment to removePhotoAlbumException
public void addComment(Comment comment) throws PhotoAlbumException
addComment
in interface IImageAction
comment
- - comment to addPhotoAlbumException
public void addMetaTag(Image image, MetaTag metaTag) throws PhotoAlbumException
image
- - image to which the tag is addedmetaTage
- - metaTag to be addedPhotoAlbumException
public void removeMetaTag(Image image, MetaTag metaTag) throws PhotoAlbumException
image
- - image to which the tag is addedmetaTage
- - metaTag to be addedPhotoAlbumException
public MetaTag getTagByName(String tag)
getTagByName
in interface IImageAction
tag
- - string representation of metatagpublic List<MetaTag> getPopularTags()
getPopularTags
in interface IImageAction
public List<MetaTag> getTagsLikeString(String suggest)
getTagsLikeString
in interface IImageAction
suggest
- - string to search; has to be set to lowerCase since this cannot be done inside a querypublic boolean isImageWithThisPathExist(Album album, String path)
isImageWithThisPathExist
in interface IImageAction
album
- - album to checkpath
- - path to checkpublic Long getCountIdenticalImages(Album album, String path)
getCountIdenticalImages
in interface IImageAction
album
- - album to checkpath
- - path to checkpublic List<Comment> findAllUserComments(User user)
findAllUserComments
in interface IImageAction
public void resetImage(Image image)
resetImage
in interface IImageAction
image
- - image to SynchronizeCopyright © 2015. All rights reserved.