1   /**
2    * Copyright (c) 2000-2010 Liferay, Inc. All rights reserved.
3    *
4    * The contents of this file are subject to the terms of the Liferay Enterprise
5    * Subscription License ("License"). You may not use this file except in
6    * compliance with the License. You can obtain a copy of the License by
7    * contacting Liferay, Inc. See the License for the specific language governing
8    * permissions and limitations under the License, including but not limited to
9    * distribution rights of the Software.
10   *
11   *
12   * 
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 folderId, java.lang.String name, java.lang.String description,
42          java.io.File file, java.lang.String contentType,
43          com.liferay.portal.service.ServiceContext serviceContext)
44          throws com.liferay.portal.PortalException,
45              com.liferay.portal.SystemException {
46          return getService()
47                     .addImage(folderId, name, description, file, contentType,
48              serviceContext);
49      }
50  
51      public static void deleteImage(long imageId)
52          throws com.liferay.portal.PortalException,
53              com.liferay.portal.SystemException {
54          getService().deleteImage(imageId);
55      }
56  
57      public static void deleteImageByFolderIdAndNameWithExtension(
58          long folderId, java.lang.String nameWithExtension)
59          throws com.liferay.portal.PortalException,
60              com.liferay.portal.SystemException {
61          getService()
62              .deleteImageByFolderIdAndNameWithExtension(folderId,
63              nameWithExtension);
64      }
65  
66      public static com.liferay.portlet.imagegallery.model.IGImage getImage(
67          long imageId)
68          throws com.liferay.portal.PortalException,
69              com.liferay.portal.SystemException {
70          return getService().getImage(imageId);
71      }
72  
73      public static com.liferay.portlet.imagegallery.model.IGImage getImageByFolderIdAndNameWithExtension(
74          long folderId, java.lang.String nameWithExtension)
75          throws com.liferay.portal.PortalException,
76              com.liferay.portal.SystemException {
77          return getService()
78                     .getImageByFolderIdAndNameWithExtension(folderId,
79              nameWithExtension);
80      }
81  
82      public static com.liferay.portlet.imagegallery.model.IGImage getImageByLargeImageId(
83          long largeImageId)
84          throws com.liferay.portal.PortalException,
85              com.liferay.portal.SystemException {
86          return getService().getImageByLargeImageId(largeImageId);
87      }
88  
89      public static com.liferay.portlet.imagegallery.model.IGImage getImageBySmallImageId(
90          long smallImageId)
91          throws com.liferay.portal.PortalException,
92              com.liferay.portal.SystemException {
93          return getService().getImageBySmallImageId(smallImageId);
94      }
95  
96      public static java.util.List<com.liferay.portlet.imagegallery.model.IGImage> getImages(
97          long folderId)
98          throws com.liferay.portal.PortalException,
99              com.liferay.portal.SystemException {
100         return getService().getImages(folderId);
101     }
102 
103     public static com.liferay.portlet.imagegallery.model.IGImage updateImage(
104         long imageId, long folderId, java.lang.String name,
105         java.lang.String description, java.io.File file,
106         java.lang.String contentType,
107         com.liferay.portal.service.ServiceContext serviceContext)
108         throws com.liferay.portal.PortalException,
109             com.liferay.portal.SystemException {
110         return getService()
111                    .updateImage(imageId, folderId, name, description, file,
112             contentType, serviceContext);
113     }
114 
115     public static IGImageService getService() {
116         if (_service == null) {
117             _service = (IGImageService)PortalBeanLocatorUtil.locate(IGImageService.class.getName());
118         }
119 
120         return _service;
121     }
122 
123     public void setService(IGImageService service) {
124         _service = service;
125     }
126 
127     private static IGImageService _service;
128 }