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          java.lang.String[] tagsEntries, boolean addCommunityPermissions,
44          boolean addGuestPermissions)
45          throws com.liferay.portal.PortalException,
46              com.liferay.portal.SystemException, java.rmi.RemoteException {
47          return getService()
48                     .addImage(folderId, name, description, file, contentType,
49              tagsEntries, addCommunityPermissions, addGuestPermissions);
50      }
51  
52      public static com.liferay.portlet.imagegallery.model.IGImage addImage(
53          long folderId, java.lang.String name, java.lang.String description,
54          java.io.File file, java.lang.String contentType,
55          java.lang.String[] tagsEntries,
56          java.lang.String[] communityPermissions,
57          java.lang.String[] guestPermissions)
58          throws com.liferay.portal.PortalException,
59              com.liferay.portal.SystemException, java.rmi.RemoteException {
60          return getService()
61                     .addImage(folderId, name, description, file, contentType,
62              tagsEntries, communityPermissions, guestPermissions);
63      }
64  
65      public static void deleteImage(long imageId)
66          throws com.liferay.portal.PortalException,
67              com.liferay.portal.SystemException, java.rmi.RemoteException {
68          getService().deleteImage(imageId);
69      }
70  
71      public static void deleteImageByFolderIdAndNameWithExtension(
72          long folderId, java.lang.String nameWithExtension)
73          throws com.liferay.portal.PortalException,
74              com.liferay.portal.SystemException, java.rmi.RemoteException {
75          getService()
76              .deleteImageByFolderIdAndNameWithExtension(folderId,
77              nameWithExtension);
78      }
79  
80      public static com.liferay.portlet.imagegallery.model.IGImage getImage(
81          long imageId)
82          throws com.liferay.portal.PortalException,
83              com.liferay.portal.SystemException, java.rmi.RemoteException {
84          return getService().getImage(imageId);
85      }
86  
87      public static com.liferay.portlet.imagegallery.model.IGImage getImageByFolderIdAndNameWithExtension(
88          long folderId, java.lang.String nameWithExtension)
89          throws com.liferay.portal.PortalException,
90              com.liferay.portal.SystemException, java.rmi.RemoteException {
91          return getService()
92                     .getImageByFolderIdAndNameWithExtension(folderId,
93              nameWithExtension);
94      }
95  
96      public static com.liferay.portlet.imagegallery.model.IGImage getImageByLargeImageId(
97          long largeImageId)
98          throws com.liferay.portal.PortalException,
99              com.liferay.portal.SystemException, java.rmi.RemoteException {
100         return getService().getImageByLargeImageId(largeImageId);
101     }
102 
103     public static com.liferay.portlet.imagegallery.model.IGImage getImageBySmallImageId(
104         long smallImageId)
105         throws com.liferay.portal.PortalException,
106             com.liferay.portal.SystemException, java.rmi.RemoteException {
107         return getService().getImageBySmallImageId(smallImageId);
108     }
109 
110     public static java.util.List<com.liferay.portlet.imagegallery.model.IGImage> getImages(
111         long folderId)
112         throws com.liferay.portal.PortalException,
113             com.liferay.portal.SystemException, java.rmi.RemoteException {
114         return getService().getImages(folderId);
115     }
116 
117     public static com.liferay.portlet.imagegallery.model.IGImage updateImage(
118         long imageId, long folderId, java.lang.String name,
119         java.lang.String description, java.io.File file,
120         java.lang.String contentType, java.lang.String[] tagsEntries)
121         throws com.liferay.portal.PortalException,
122             com.liferay.portal.SystemException, java.rmi.RemoteException {
123         return getService()
124                    .updateImage(imageId, folderId, name, description, file,
125             contentType, tagsEntries);
126     }
127 
128     public static IGImageService getService() {
129         if (_service == null) {
130             _service = (IGImageService)PortalBeanLocatorUtil.locate(IGImageService.class.getName());
131         }
132 
133         return _service;
134     }
135 
136     public void setService(IGImageService service) {
137         _service = service;
138     }
139 
140     private static IGImageService _service;
141 }