1   /**
2    * Copyright (c) 2000-2010 Liferay, Inc. All rights reserved.
3    *
4    * This library is free software; you can redistribute it and/or modify it under
5    * the terms of the GNU Lesser General Public License as published by the Free
6    * Software Foundation; either version 2.1 of the License, or (at your option)
7    * any later version.
8    *
9    * This library is distributed in the hope that it will be useful, but WITHOUT
10   * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
11   * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
12   * details.
13   */
14  
15  package com.liferay.portlet.imagegallery.service;
16  
17  import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
18  
19  /**
20   * <a href="IGImageServiceUtil.java.html"><b><i>View Source</i></b></a>
21   *
22   * <p>
23   * ServiceBuilder generated this class. Modifications in this class will be
24   * overwritten the next time is generated.
25   * </p>
26   *
27   * <p>
28   * This class provides static methods for the
29   * {@link IGImageService} bean. The static methods of
30   * this class calls the same methods of the bean instance. It's convenient to be
31   * able to just write one line to call a method on a bean instead of writing a
32   * lookup call and a method call.
33   * </p>
34   *
35   * @author    Brian Wing Shun Chan
36   * @see       IGImageService
37   * @generated
38   */
39  public class IGImageServiceUtil {
40      public static com.liferay.portlet.imagegallery.model.IGImage addImage(
41          long groupId, long folderId, java.lang.String name,
42          java.lang.String description, java.io.File file,
43          java.lang.String contentType,
44          com.liferay.portal.service.ServiceContext serviceContext)
45          throws com.liferay.portal.kernel.exception.PortalException,
46              com.liferay.portal.kernel.exception.SystemException {
47          return getService()
48                     .addImage(groupId, folderId, name, description, file,
49              contentType, serviceContext);
50      }
51  
52      public static void deleteImage(long imageId)
53          throws com.liferay.portal.kernel.exception.PortalException,
54              com.liferay.portal.kernel.exception.SystemException {
55          getService().deleteImage(imageId);
56      }
57  
58      public static void deleteImageByFolderIdAndNameWithExtension(long groupId,
59          long folderId, java.lang.String nameWithExtension)
60          throws com.liferay.portal.kernel.exception.PortalException,
61              com.liferay.portal.kernel.exception.SystemException {
62          getService()
63              .deleteImageByFolderIdAndNameWithExtension(groupId, folderId,
64              nameWithExtension);
65      }
66  
67      public static com.liferay.portlet.imagegallery.model.IGImage getImage(
68          long imageId)
69          throws com.liferay.portal.kernel.exception.PortalException,
70              com.liferay.portal.kernel.exception.SystemException {
71          return getService().getImage(imageId);
72      }
73  
74      public static com.liferay.portlet.imagegallery.model.IGImage getImageByFolderIdAndNameWithExtension(
75          long groupId, long folderId, java.lang.String nameWithExtension)
76          throws com.liferay.portal.kernel.exception.PortalException,
77              com.liferay.portal.kernel.exception.SystemException {
78          return getService()
79                     .getImageByFolderIdAndNameWithExtension(groupId, folderId,
80              nameWithExtension);
81      }
82  
83      public static com.liferay.portlet.imagegallery.model.IGImage getImageByLargeImageId(
84          long largeImageId)
85          throws com.liferay.portal.kernel.exception.PortalException,
86              com.liferay.portal.kernel.exception.SystemException {
87          return getService().getImageByLargeImageId(largeImageId);
88      }
89  
90      public static com.liferay.portlet.imagegallery.model.IGImage getImageBySmallImageId(
91          long smallImageId)
92          throws com.liferay.portal.kernel.exception.PortalException,
93              com.liferay.portal.kernel.exception.SystemException {
94          return getService().getImageBySmallImageId(smallImageId);
95      }
96  
97      public static java.util.List<com.liferay.portlet.imagegallery.model.IGImage> getImages(
98          long groupId, long folderId)
99          throws com.liferay.portal.kernel.exception.PortalException,
100             com.liferay.portal.kernel.exception.SystemException {
101         return getService().getImages(groupId, folderId);
102     }
103 
104     public static com.liferay.portlet.imagegallery.model.IGImage updateImage(
105         long imageId, long groupId, long folderId, java.lang.String name,
106         java.lang.String description, java.io.File file,
107         java.lang.String contentType,
108         com.liferay.portal.service.ServiceContext serviceContext)
109         throws com.liferay.portal.kernel.exception.PortalException,
110             com.liferay.portal.kernel.exception.SystemException {
111         return getService()
112                    .updateImage(imageId, groupId, folderId, name, description,
113             file, contentType, serviceContext);
114     }
115 
116     public static IGImageService getService() {
117         if (_service == null) {
118             _service = (IGImageService)PortalBeanLocatorUtil.locate(IGImageService.class.getName());
119         }
120 
121         return _service;
122     }
123 
124     public void setService(IGImageService service) {
125         _service = service;
126     }
127 
128     private static IGImageService _service;
129 }