1   /**
2    * Copyright (c) 2000-2009 Liferay, Inc. All rights reserved.
3    *
4    *
5    *
6    *
7    * The contents of this file are subject to the terms of the Liferay Enterprise
8    * Subscription License ("License"). You may not use this file except in
9    * compliance with the License. You can obtain a copy of the License by
10   * contacting Liferay, Inc. See the License for the specific language governing
11   * permissions and limitations under the License, including but not limited to
12   * distribution rights of the Software.
13   *
14   * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15   * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16   * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17   * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18   * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19   * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20   * SOFTWARE.
21   */
22  
23  package com.liferay.portlet.imagegallery.service;
24  
25  
26  /**
27   * <a href="IGImageServiceUtil.java.html"><b><i>View Source</i></b></a>
28   *
29   * <p>
30   * ServiceBuilder generated this class. Modifications in this class will be
31   * overwritten the next time is generated.
32   * </p>
33   *
34   * <p>
35   * This class provides static methods for the
36   * {@link IGImageService} bean. The static methods of
37   * this class calls the same methods of the bean instance. It's convenient to be
38   * able to just write one line to call a method on a bean instead of writing a
39   * lookup call and a method call.
40   * </p>
41   *
42   * @author    Brian Wing Shun Chan
43   * @see       IGImageService
44   * @generated
45   */
46  public class IGImageServiceUtil {
47      public static com.liferay.portlet.imagegallery.model.IGImage addImage(
48          long folderId, java.lang.String name, java.lang.String description,
49          java.io.File file, java.lang.String contentType,
50          java.lang.String[] tagsEntries, boolean addCommunityPermissions,
51          boolean addGuestPermissions)
52          throws com.liferay.portal.PortalException,
53              com.liferay.portal.SystemException, java.rmi.RemoteException {
54          return getService()
55                     .addImage(folderId, name, description, file, contentType,
56              tagsEntries, addCommunityPermissions, addGuestPermissions);
57      }
58  
59      public static com.liferay.portlet.imagegallery.model.IGImage addImage(
60          long folderId, java.lang.String name, java.lang.String description,
61          java.io.File file, java.lang.String contentType,
62          java.lang.String[] tagsEntries,
63          java.lang.String[] communityPermissions,
64          java.lang.String[] guestPermissions)
65          throws com.liferay.portal.PortalException,
66              com.liferay.portal.SystemException, java.rmi.RemoteException {
67          return getService()
68                     .addImage(folderId, name, description, file, contentType,
69              tagsEntries, communityPermissions, guestPermissions);
70      }
71  
72      public static void deleteImage(long imageId)
73          throws com.liferay.portal.PortalException,
74              com.liferay.portal.SystemException, java.rmi.RemoteException {
75          getService().deleteImage(imageId);
76      }
77  
78      public static void deleteImageByFolderIdAndNameWithExtension(
79          long folderId, java.lang.String nameWithExtension)
80          throws com.liferay.portal.PortalException,
81              com.liferay.portal.SystemException, java.rmi.RemoteException {
82          getService()
83              .deleteImageByFolderIdAndNameWithExtension(folderId,
84              nameWithExtension);
85      }
86  
87      public static com.liferay.portlet.imagegallery.model.IGImage getImage(
88          long imageId)
89          throws com.liferay.portal.PortalException,
90              com.liferay.portal.SystemException, java.rmi.RemoteException {
91          return getService().getImage(imageId);
92      }
93  
94      public static com.liferay.portlet.imagegallery.model.IGImage getImageByFolderIdAndNameWithExtension(
95          long folderId, java.lang.String nameWithExtension)
96          throws com.liferay.portal.PortalException,
97              com.liferay.portal.SystemException, java.rmi.RemoteException {
98          return getService()
99                     .getImageByFolderIdAndNameWithExtension(folderId,
100             nameWithExtension);
101     }
102 
103     public static com.liferay.portlet.imagegallery.model.IGImage getImageByLargeImageId(
104         long largeImageId)
105         throws com.liferay.portal.PortalException,
106             com.liferay.portal.SystemException, java.rmi.RemoteException {
107         return getService().getImageByLargeImageId(largeImageId);
108     }
109 
110     public static com.liferay.portlet.imagegallery.model.IGImage getImageBySmallImageId(
111         long smallImageId)
112         throws com.liferay.portal.PortalException,
113             com.liferay.portal.SystemException, java.rmi.RemoteException {
114         return getService().getImageBySmallImageId(smallImageId);
115     }
116 
117     public static java.util.List<com.liferay.portlet.imagegallery.model.IGImage> getImages(
118         long folderId)
119         throws com.liferay.portal.PortalException,
120             com.liferay.portal.SystemException, java.rmi.RemoteException {
121         return getService().getImages(folderId);
122     }
123 
124     public static com.liferay.portlet.imagegallery.model.IGImage updateImage(
125         long imageId, long folderId, java.lang.String name,
126         java.lang.String description, java.io.File file,
127         java.lang.String contentType, java.lang.String[] tagsEntries)
128         throws com.liferay.portal.PortalException,
129             com.liferay.portal.SystemException, java.rmi.RemoteException {
130         return getService()
131                    .updateImage(imageId, folderId, name, description, file,
132             contentType, tagsEntries);
133     }
134 
135     public static IGImageService getService() {
136         if (_service == null) {
137             throw new RuntimeException("IGImageService is not set");
138         }
139 
140         return _service;
141     }
142 
143     public void setService(IGImageService service) {
144         _service = service;
145     }
146 
147     private static IGImageService _service;
148 }