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

public class IGImageLocalServiceImpl
extends IGImageLocalServiceBaseImpl

View Source

Author:
Brian Wing Shun Chan, Raymond Augé

Field Summary
 
Fields inherited from class com.liferay.portlet.imagegallery.service.base.IGImageLocalServiceBaseImpl
counterLocalService, counterService, igFolderLocalService, igFolderPersistence, igFolderService, igImageFinder, igImageLocalService, igImagePersistence, igImageService, imageLocalService, imagePersistence, resourceFinder, resourceLocalService, resourcePersistence, resourceService, tagsAssetFinder, tagsAssetLocalService, tagsAssetPersistence, tagsAssetService, tagsEntryFinder, tagsEntryLocalService, tagsEntryPersistence, tagsEntryService, 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, com.liferay.portal.service.ServiceContext serviceContext)
           
 com.liferay.portlet.imagegallery.model.IGImage addImage(long userId, long folderId, java.lang.String name, java.lang.String description, java.lang.String fileName, byte[] bytes, java.lang.String contentType, com.liferay.portal.service.ServiceContext serviceContext)
           
 com.liferay.portlet.imagegallery.model.IGImage addImage(long userId, long folderId, java.lang.String name, java.lang.String description, java.lang.String fileName, java.io.InputStream is, java.lang.String contentType, com.liferay.portal.service.ServiceContext serviceContext)
           
 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, com.liferay.portal.service.ServiceContext serviceContext)
           
 com.liferay.portlet.imagegallery.model.IGImage addImage(java.lang.String uuid, long userId, long folderId, java.lang.String name, java.lang.String description, java.lang.String fileName, byte[] bytes, java.lang.String contentType, com.liferay.portal.service.ServiceContext serviceContext)
           
 com.liferay.portlet.imagegallery.model.IGImage addImage(java.lang.String uuid, long userId, long folderId, java.lang.String name, java.lang.String description, java.lang.String fileName, java.io.InputStream is, java.lang.String contentType, com.liferay.portal.service.ServiceContext serviceContext)
           
 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 start, int end)
           
 java.util.List<com.liferay.portlet.imagegallery.model.IGImage> getGroupImages(long groupId, long userId, int start, 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 start, int end)
           
 java.util.List<com.liferay.portlet.imagegallery.model.IGImage> getImages(long folderId, int start, int end, com.liferay.portal.kernel.util.OrderByComparator obc)
           
 int getImagesCount(long folderId)
           
 java.util.List<com.liferay.portlet.imagegallery.model.IGImage> getNoAssetImages()
           
 void reIndex(long imageId)
           
protected  void saveImages(long largeImageId, java.awt.image.RenderedImage renderedImage, long smallImageId, long custom1ImageId, long custom2ImageId, 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, byte[] bytes, java.lang.String contentType, com.liferay.portal.service.ServiceContext serviceContext)
           
 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, com.liferay.portal.service.ServiceContext serviceContext)
           
 com.liferay.portlet.imagegallery.model.IGImage updateImage(long userId, long imageId, long folderId, java.lang.String name, java.lang.String description, java.io.InputStream is, java.lang.String contentType, com.liferay.portal.service.ServiceContext serviceContext)
           
 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.lang.String fileName, byte[] bytes)
           
 
Methods inherited from class com.liferay.portlet.imagegallery.service.base.IGImageLocalServiceBaseImpl
addIGImage, createIGImage, deleteIGImage, deleteIGImage, dynamicQuery, dynamicQuery, getCounterLocalService, getCounterService, getIGFolderLocalService, getIGFolderPersistence, getIGFolderService, getIGImage, getIGImageFinder, getIGImageLocalService, getIGImagePersistence, getIGImages, getIGImagesCount, getIGImageService, getImageLocalService, getImagePersistence, getResourceFinder, getResourceLocalService, getResourcePersistence, getResourceService, getTagsAssetFinder, getTagsAssetLocalService, getTagsAssetPersistence, getTagsAssetService, getTagsEntryFinder, getTagsEntryLocalService, getTagsEntryPersistence, getTagsEntryService, getUserFinder, getUserLocalService, getUserPersistence, getUserService, setCounterLocalService, setCounterService, setIGFolderLocalService, setIGFolderPersistence, setIGFolderService, setIGImageFinder, setIGImageLocalService, setIGImagePersistence, setIGImageService, setImageLocalService, setImagePersistence, setResourceFinder, setResourceLocalService, setResourcePersistence, setResourceService, setTagsAssetFinder, setTagsAssetLocalService, setTagsAssetPersistence, setTagsAssetService, setTagsEntryFinder, setTagsEntryLocalService, setTagsEntryPersistence, setTagsEntryService, 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,
                                                               com.liferay.portal.service.ServiceContext serviceContext)
                                                        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.lang.String fileName,
                                                               byte[] bytes,
                                                               java.lang.String contentType,
                                                               com.liferay.portal.service.ServiceContext serviceContext)
                                                        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.lang.String fileName,
                                                               java.io.InputStream is,
                                                               java.lang.String contentType,
                                                               com.liferay.portal.service.ServiceContext serviceContext)
                                                        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,
                                                               com.liferay.portal.service.ServiceContext serviceContext)
                                                        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.lang.String fileName,
                                                               byte[] bytes,
                                                               java.lang.String contentType,
                                                               com.liferay.portal.service.ServiceContext serviceContext)
                                                        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.lang.String fileName,
                                                               java.io.InputStream is,
                                                               java.lang.String contentType,
                                                               com.liferay.portal.service.ServiceContext serviceContext)
                                                        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 start,
                                                                                     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 start,
                                                                                     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 start,
                                                                                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 start,
                                                                                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

reIndex

public void reIndex(long imageId)
             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,
                                                                  byte[] bytes,
                                                                  java.lang.String contentType,
                                                                  com.liferay.portal.service.ServiceContext serviceContext)
                                                           throws com.liferay.portal.PortalException,
                                                                  com.liferay.portal.SystemException
Throws:
com.liferay.portal.PortalException
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,
                                                                  com.liferay.portal.service.ServiceContext serviceContext)
                                                           throws com.liferay.portal.PortalException,
                                                                  com.liferay.portal.SystemException
Throws:
com.liferay.portal.PortalException
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.InputStream is,
                                                                  java.lang.String contentType,
                                                                  com.liferay.portal.service.ServiceContext serviceContext)
                                                           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,
                          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.lang.String fileName,
                        byte[] bytes)
                 throws com.liferay.portal.PortalException,
                        com.liferay.portal.SystemException
Throws:
com.liferay.portal.PortalException
com.liferay.portal.SystemException