com.liferay.portlet.imagegallery.service.impl
Class IGImageLocalServiceImpl

java.lang.Object
  extended by com.liferay.portlet.imagegallery.service.base.IGImageLocalServiceBaseImpl
      extended by com.liferay.portlet.imagegallery.service.impl.IGImageLocalServiceImpl
All Implemented Interfaces:
com.liferay.portlet.imagegallery.service.IGImageLocalService, org.springframework.beans.factory.InitializingBean

public class IGImageLocalServiceImpl
extends IGImageLocalServiceBaseImpl

View Source

Author:
Brian Wing Shun Chan

Field Summary
 
Fields inherited from class com.liferay.portlet.imagegallery.service.base.IGImageLocalServiceBaseImpl
counterLocalService, counterService, igFolderLocalService, igFolderPersistence, igFolderService, igImageFinder, igImagePersistence, resourceFinder, resourceLocalService, resourcePersistence, resourceService, tagsAssetFinder, tagsAssetLocalService, tagsAssetPersistence, tagsAssetService, userFinder, userLocalService, userPersistence, userService
 
Constructor Summary
IGImageLocalServiceImpl()
           
 
Method Summary
 com.liferay.portlet.imagegallery.model.IGImage addImage(long userId, long folderId, java.lang.String name, java.lang.String description, java.io.File file, java.lang.String contentType, java.lang.String[] tagsEntries, boolean addCommunityPermissions, boolean addGuestPermissions)
           
 com.liferay.portlet.imagegallery.model.IGImage addImage(long userId, long folderId, java.lang.String name, java.lang.String description, java.io.File file, java.lang.String contentType, java.lang.String[] tagsEntries, java.lang.String[] communityPermissions, java.lang.String[] guestPermissions)
           
 com.liferay.portlet.imagegallery.model.IGImage addImage(java.lang.String uuid, long userId, long folderId, java.lang.String name, java.lang.String description, java.io.File file, java.lang.String contentType, java.lang.String[] tagsEntries, boolean addCommunityPermissions, boolean addGuestPermissions)
           
 com.liferay.portlet.imagegallery.model.IGImage addImage(java.lang.String uuid, long userId, long folderId, java.lang.String name, java.lang.String description, java.io.File file, java.lang.String contentType, java.lang.String[] tagsEntries, java.lang.Boolean addCommunityPermissions, java.lang.Boolean addGuestPermissions, java.lang.String[] communityPermissions, java.lang.String[] guestPermissions)
           
 void addImageResources(com.liferay.portlet.imagegallery.model.IGFolder folder, com.liferay.portlet.imagegallery.model.IGImage image, boolean addCommunityPermissions, boolean addGuestPermissions)
           
 void addImageResources(com.liferay.portlet.imagegallery.model.IGFolder folder, com.liferay.portlet.imagegallery.model.IGImage image, java.lang.String[] communityPermissions, java.lang.String[] guestPermissions)
           
 void addImageResources(long folderId, long imageId, boolean addCommunityPermissions, boolean addGuestPermissions)
           
 void addImageResources(long folderId, long imageId, java.lang.String[] communityPermissions, java.lang.String[] guestPermissions)
           
 void deleteImage(com.liferay.portlet.imagegallery.model.IGImage image)
           
 void deleteImage(long imageId)
           
 void deleteImages(long folderId)
           
protected  com.liferay.portlet.imagegallery.model.IGFolder getFolder(com.liferay.portlet.imagegallery.model.IGImage image, long folderId)
           
 int getFoldersImagesCount(java.util.List<java.lang.Long> folderIds)
           
 java.util.List<com.liferay.portlet.imagegallery.model.IGImage> getGroupImages(long groupId, int begin, int end)
           
 java.util.List<com.liferay.portlet.imagegallery.model.IGImage> getGroupImages(long groupId, long userId, int begin, int end)
           
 int getGroupImagesCount(long groupId)
           
 int getGroupImagesCount(long groupId, long userId)
           
 com.liferay.portlet.imagegallery.model.IGImage getImage(long imageId)
           
 com.liferay.portlet.imagegallery.model.IGImage getImageByCustom1ImageId(long custom1ImageId)
           
 com.liferay.portlet.imagegallery.model.IGImage getImageByCustom2ImageId(long custom2ImageId)
           
 com.liferay.portlet.imagegallery.model.IGImage getImageByFolderIdAndNameWithExtension(long folderId, java.lang.String nameWithExtension)
           
 com.liferay.portlet.imagegallery.model.IGImage getImageByLargeImageId(long largeImageId)
           
 com.liferay.portlet.imagegallery.model.IGImage getImageBySmallImageId(long smallImageId)
           
 com.liferay.portlet.imagegallery.model.IGImage getImageByUuidAndGroupId(java.lang.String uuid, long groupId)
           
 java.util.List<com.liferay.portlet.imagegallery.model.IGImage> getImages(long folderId)
           
 java.util.List<com.liferay.portlet.imagegallery.model.IGImage> getImages(long folderId, int begin, int end)
           
 java.util.List<com.liferay.portlet.imagegallery.model.IGImage> getImages(long folderId, int begin, int end, com.liferay.portal.kernel.util.OrderByComparator obc)
           
 int getImagesCount(long folderId)
           
 java.util.List<com.liferay.portlet.imagegallery.model.IGImage> getNoAssetImages()
           
protected  void saveImages(long largeImageId, java.awt.image.RenderedImage renderedImage, long smallImageId, long custom1ImageId, long custom2ImageId, java.io.File file, byte[] bytes, java.lang.String contentType)
           
protected  void saveScaledImage(java.awt.image.RenderedImage renderedImage, long imageId, java.lang.String contentType, int dimension)
           
 com.liferay.portlet.imagegallery.model.IGImage updateImage(long userId, long imageId, long folderId, java.lang.String name, java.lang.String description, java.io.File file, java.lang.String contentType, java.lang.String[] tagsEntries)
           
 void updateTagsAsset(long userId, com.liferay.portlet.imagegallery.model.IGImage image, java.lang.String[] tagsEntries)
           
protected  void validate(byte[] bytes)
           
protected  void validate(long folderId, java.lang.String nameWithExtension)
           
protected  void validate(long folderId, java.lang.String nameWithExtension, java.io.File file, byte[] bytes)
           
 
Methods inherited from class com.liferay.portlet.imagegallery.service.base.IGImageLocalServiceBaseImpl
addIGImage, afterPropertiesSet, deleteIGImage, deleteIGImage, dynamicQuery, dynamicQuery, getCounterLocalService, getCounterService, getIGFolderLocalService, getIGFolderPersistence, getIGFolderService, getIGImageFinder, getIGImagePersistence, getResourceFinder, getResourceLocalService, getResourcePersistence, getResourceService, getTagsAssetFinder, getTagsAssetLocalService, getTagsAssetPersistence, getTagsAssetService, getUserFinder, getUserLocalService, getUserPersistence, getUserService, setCounterLocalService, setCounterService, setIGFolderLocalService, setIGFolderPersistence, setIGFolderService, setIGImageFinder, setIGImagePersistence, setResourceFinder, setResourceLocalService, setResourcePersistence, setResourceService, setTagsAssetFinder, setTagsAssetLocalService, setTagsAssetPersistence, setTagsAssetService, setUserFinder, setUserLocalService, setUserPersistence, setUserService, updateIGImage
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IGImageLocalServiceImpl

public IGImageLocalServiceImpl()
Method Detail

addImage

public com.liferay.portlet.imagegallery.model.IGImage addImage(long userId,
                                                               long folderId,
                                                               java.lang.String name,
                                                               java.lang.String description,
                                                               java.io.File file,
                                                               java.lang.String contentType,
                                                               java.lang.String[] tagsEntries,
                                                               boolean addCommunityPermissions,
                                                               boolean addGuestPermissions)
                                                        throws com.liferay.portal.PortalException,
                                                               com.liferay.portal.SystemException
Throws:
com.liferay.portal.PortalException
com.liferay.portal.SystemException

addImage

public com.liferay.portlet.imagegallery.model.IGImage addImage(java.lang.String uuid,
                                                               long userId,
                                                               long folderId,
                                                               java.lang.String name,
                                                               java.lang.String description,
                                                               java.io.File file,
                                                               java.lang.String contentType,
                                                               java.lang.String[] tagsEntries,
                                                               boolean addCommunityPermissions,
                                                               boolean addGuestPermissions)
                                                        throws com.liferay.portal.PortalException,
                                                               com.liferay.portal.SystemException
Throws:
com.liferay.portal.PortalException
com.liferay.portal.SystemException

addImage

public com.liferay.portlet.imagegallery.model.IGImage addImage(long userId,
                                                               long folderId,
                                                               java.lang.String name,
                                                               java.lang.String description,
                                                               java.io.File file,
                                                               java.lang.String contentType,
                                                               java.lang.String[] tagsEntries,
                                                               java.lang.String[] communityPermissions,
                                                               java.lang.String[] guestPermissions)
                                                        throws com.liferay.portal.PortalException,
                                                               com.liferay.portal.SystemException
Throws:
com.liferay.portal.PortalException
com.liferay.portal.SystemException

addImage

public com.liferay.portlet.imagegallery.model.IGImage addImage(java.lang.String uuid,
                                                               long userId,
                                                               long folderId,
                                                               java.lang.String name,
                                                               java.lang.String description,
                                                               java.io.File file,
                                                               java.lang.String contentType,
                                                               java.lang.String[] tagsEntries,
                                                               java.lang.Boolean addCommunityPermissions,
                                                               java.lang.Boolean addGuestPermissions,
                                                               java.lang.String[] communityPermissions,
                                                               java.lang.String[] guestPermissions)
                                                        throws com.liferay.portal.PortalException,
                                                               com.liferay.portal.SystemException
Throws:
com.liferay.portal.PortalException
com.liferay.portal.SystemException

addImageResources

public void addImageResources(long folderId,
                              long imageId,
                              boolean addCommunityPermissions,
                              boolean addGuestPermissions)
                       throws com.liferay.portal.PortalException,
                              com.liferay.portal.SystemException
Throws:
com.liferay.portal.PortalException
com.liferay.portal.SystemException

addImageResources

public void addImageResources(com.liferay.portlet.imagegallery.model.IGFolder folder,
                              com.liferay.portlet.imagegallery.model.IGImage image,
                              boolean addCommunityPermissions,
                              boolean addGuestPermissions)
                       throws com.liferay.portal.PortalException,
                              com.liferay.portal.SystemException
Throws:
com.liferay.portal.PortalException
com.liferay.portal.SystemException

addImageResources

public void addImageResources(long folderId,
                              long imageId,
                              java.lang.String[] communityPermissions,
                              java.lang.String[] guestPermissions)
                       throws com.liferay.portal.PortalException,
                              com.liferay.portal.SystemException
Throws:
com.liferay.portal.PortalException
com.liferay.portal.SystemException

addImageResources

public void addImageResources(com.liferay.portlet.imagegallery.model.IGFolder folder,
                              com.liferay.portlet.imagegallery.model.IGImage image,
                              java.lang.String[] communityPermissions,
                              java.lang.String[] guestPermissions)
                       throws com.liferay.portal.PortalException,
                              com.liferay.portal.SystemException
Throws:
com.liferay.portal.PortalException
com.liferay.portal.SystemException

deleteImage

public void deleteImage(long imageId)
                 throws com.liferay.portal.PortalException,
                        com.liferay.portal.SystemException
Throws:
com.liferay.portal.PortalException
com.liferay.portal.SystemException

deleteImage

public void deleteImage(com.liferay.portlet.imagegallery.model.IGImage image)
                 throws com.liferay.portal.PortalException,
                        com.liferay.portal.SystemException
Throws:
com.liferay.portal.PortalException
com.liferay.portal.SystemException

deleteImages

public void deleteImages(long folderId)
                  throws com.liferay.portal.PortalException,
                         com.liferay.portal.SystemException
Throws:
com.liferay.portal.PortalException
com.liferay.portal.SystemException

getFoldersImagesCount

public int getFoldersImagesCount(java.util.List<java.lang.Long> folderIds)
                          throws com.liferay.portal.SystemException
Throws:
com.liferay.portal.SystemException

getGroupImages

public java.util.List<com.liferay.portlet.imagegallery.model.IGImage> getGroupImages(long groupId,
                                                                                     int begin,
                                                                                     int end)
                                                                              throws com.liferay.portal.SystemException
Throws:
com.liferay.portal.SystemException

getGroupImages

public java.util.List<com.liferay.portlet.imagegallery.model.IGImage> getGroupImages(long groupId,
                                                                                     long userId,
                                                                                     int begin,
                                                                                     int end)
                                                                              throws com.liferay.portal.SystemException
Throws:
com.liferay.portal.SystemException

getGroupImagesCount

public int getGroupImagesCount(long groupId)
                        throws com.liferay.portal.SystemException
Throws:
com.liferay.portal.SystemException

getGroupImagesCount

public int getGroupImagesCount(long groupId,
                               long userId)
                        throws com.liferay.portal.SystemException
Throws:
com.liferay.portal.SystemException

getImage

public com.liferay.portlet.imagegallery.model.IGImage getImage(long imageId)
                                                        throws com.liferay.portal.PortalException,
                                                               com.liferay.portal.SystemException
Throws:
com.liferay.portal.PortalException
com.liferay.portal.SystemException

getImageByCustom1ImageId

public com.liferay.portlet.imagegallery.model.IGImage getImageByCustom1ImageId(long custom1ImageId)
                                                                        throws com.liferay.portal.PortalException,
                                                                               com.liferay.portal.SystemException
Throws:
com.liferay.portal.PortalException
com.liferay.portal.SystemException

getImageByCustom2ImageId

public com.liferay.portlet.imagegallery.model.IGImage getImageByCustom2ImageId(long custom2ImageId)
                                                                        throws com.liferay.portal.PortalException,
                                                                               com.liferay.portal.SystemException
Throws:
com.liferay.portal.PortalException
com.liferay.portal.SystemException

getImageByFolderIdAndNameWithExtension

public com.liferay.portlet.imagegallery.model.IGImage getImageByFolderIdAndNameWithExtension(long folderId,
                                                                                             java.lang.String nameWithExtension)
                                                                                      throws com.liferay.portal.PortalException,
                                                                                             com.liferay.portal.SystemException
Throws:
com.liferay.portal.PortalException
com.liferay.portal.SystemException

getImageByLargeImageId

public com.liferay.portlet.imagegallery.model.IGImage getImageByLargeImageId(long largeImageId)
                                                                      throws com.liferay.portal.PortalException,
                                                                             com.liferay.portal.SystemException
Throws:
com.liferay.portal.PortalException
com.liferay.portal.SystemException

getImageBySmallImageId

public com.liferay.portlet.imagegallery.model.IGImage getImageBySmallImageId(long smallImageId)
                                                                      throws com.liferay.portal.PortalException,
                                                                             com.liferay.portal.SystemException
Throws:
com.liferay.portal.PortalException
com.liferay.portal.SystemException

getImageByUuidAndGroupId

public com.liferay.portlet.imagegallery.model.IGImage getImageByUuidAndGroupId(java.lang.String uuid,
                                                                               long groupId)
                                                                        throws com.liferay.portal.PortalException,
                                                                               com.liferay.portal.SystemException
Throws:
com.liferay.portal.PortalException
com.liferay.portal.SystemException

getImages

public java.util.List<com.liferay.portlet.imagegallery.model.IGImage> getImages(long folderId)
                                                                         throws com.liferay.portal.SystemException
Throws:
com.liferay.portal.SystemException

getImages

public java.util.List<com.liferay.portlet.imagegallery.model.IGImage> getImages(long folderId,
                                                                                int begin,
                                                                                int end)
                                                                         throws com.liferay.portal.SystemException
Throws:
com.liferay.portal.SystemException

getImages

public java.util.List<com.liferay.portlet.imagegallery.model.IGImage> getImages(long folderId,
                                                                                int begin,
                                                                                int end,
                                                                                com.liferay.portal.kernel.util.OrderByComparator obc)
                                                                         throws com.liferay.portal.SystemException
Throws:
com.liferay.portal.SystemException

getImagesCount

public int getImagesCount(long folderId)
                   throws com.liferay.portal.SystemException
Throws:
com.liferay.portal.SystemException

getNoAssetImages

public java.util.List<com.liferay.portlet.imagegallery.model.IGImage> getNoAssetImages()
                                                                                throws com.liferay.portal.SystemException
Throws:
com.liferay.portal.SystemException

updateImage

public com.liferay.portlet.imagegallery.model.IGImage updateImage(long userId,
                                                                  long imageId,
                                                                  long folderId,
                                                                  java.lang.String name,
                                                                  java.lang.String description,
                                                                  java.io.File file,
                                                                  java.lang.String contentType,
                                                                  java.lang.String[] tagsEntries)
                                                           throws com.liferay.portal.PortalException,
                                                                  com.liferay.portal.SystemException
Throws:
com.liferay.portal.PortalException
com.liferay.portal.SystemException

updateTagsAsset

public void updateTagsAsset(long userId,
                            com.liferay.portlet.imagegallery.model.IGImage image,
                            java.lang.String[] tagsEntries)
                     throws com.liferay.portal.PortalException,
                            com.liferay.portal.SystemException
Throws:
com.liferay.portal.PortalException
com.liferay.portal.SystemException

getFolder

protected com.liferay.portlet.imagegallery.model.IGFolder getFolder(com.liferay.portlet.imagegallery.model.IGImage image,
                                                                    long folderId)
                                                             throws com.liferay.portal.PortalException,
                                                                    com.liferay.portal.SystemException
Throws:
com.liferay.portal.PortalException
com.liferay.portal.SystemException

saveImages

protected void saveImages(long largeImageId,
                          java.awt.image.RenderedImage renderedImage,
                          long smallImageId,
                          long custom1ImageId,
                          long custom2ImageId,
                          java.io.File file,
                          byte[] bytes,
                          java.lang.String contentType)
                   throws com.liferay.portal.SystemException
Throws:
com.liferay.portal.SystemException

saveScaledImage

protected void saveScaledImage(java.awt.image.RenderedImage renderedImage,
                               long imageId,
                               java.lang.String contentType,
                               int dimension)
                        throws java.io.IOException,
                               com.liferay.portal.SystemException
Throws:
java.io.IOException
com.liferay.portal.SystemException

validate

protected void validate(byte[] bytes)
                 throws com.liferay.portlet.imagegallery.ImageSizeException
Throws:
com.liferay.portlet.imagegallery.ImageSizeException

validate

protected void validate(long folderId,
                        java.lang.String nameWithExtension)
                 throws com.liferay.portal.PortalException,
                        com.liferay.portal.SystemException
Throws:
com.liferay.portal.PortalException
com.liferay.portal.SystemException

validate

protected void validate(long folderId,
                        java.lang.String nameWithExtension,
                        java.io.File file,
                        byte[] bytes)
                 throws com.liferay.portal.PortalException,
                        com.liferay.portal.SystemException
Throws:
com.liferay.portal.PortalException
com.liferay.portal.SystemException