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.portal.service;
16  
17  import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
18  import com.liferay.portal.kernel.util.MethodCache;
19  import com.liferay.portal.kernel.util.ReferenceRegistry;
20  
21  /**
22   * <a href="ImageLocalServiceUtil.java.html"><b><i>View Source</i></b></a>
23   *
24   * <p>
25   * ServiceBuilder generated this class. Modifications in this class will be
26   * overwritten the next time is generated.
27   * </p>
28   *
29   * <p>
30   * This class provides static methods for the
31   * {@link ImageLocalService} bean. The static methods of
32   * this class calls the same methods of the bean instance. It's convenient to be
33   * able to just write one line to call a method on a bean instead of writing a
34   * lookup call and a method call.
35   * </p>
36   *
37   * @author    Brian Wing Shun Chan
38   * @see       ImageLocalService
39   * @generated
40   */
41  public class ImageLocalServiceUtil {
42      public static com.liferay.portal.model.Image addImage(
43          com.liferay.portal.model.Image image)
44          throws com.liferay.portal.SystemException {
45          return getService().addImage(image);
46      }
47  
48      public static com.liferay.portal.model.Image createImage(long imageId) {
49          return getService().createImage(imageId);
50      }
51  
52      public static void deleteImage(long imageId)
53          throws com.liferay.portal.PortalException,
54              com.liferay.portal.SystemException {
55          getService().deleteImage(imageId);
56      }
57  
58      public static void deleteImage(com.liferay.portal.model.Image image)
59          throws com.liferay.portal.SystemException {
60          getService().deleteImage(image);
61      }
62  
63      @SuppressWarnings("rawtypes")
64      public static java.util.List dynamicQuery(
65          com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
66          throws com.liferay.portal.SystemException {
67          return getService().dynamicQuery(dynamicQuery);
68      }
69  
70      @SuppressWarnings("rawtypes")
71      public static java.util.List dynamicQuery(
72          com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
73          int end) throws com.liferay.portal.SystemException {
74          return getService().dynamicQuery(dynamicQuery, start, end);
75      }
76  
77      @SuppressWarnings("rawtypes")
78      public static java.util.List dynamicQuery(
79          com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
80          int end,
81          com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
82          throws com.liferay.portal.SystemException {
83          return getService()
84                     .dynamicQuery(dynamicQuery, start, end, orderByComparator);
85      }
86  
87      public static int dynamicQueryCount(
88          com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
89          throws com.liferay.portal.SystemException {
90          return getService().dynamicQueryCount(dynamicQuery);
91      }
92  
93      public static com.liferay.portal.model.Image getImage(long imageId)
94          throws com.liferay.portal.PortalException,
95              com.liferay.portal.SystemException {
96          return getService().getImage(imageId);
97      }
98  
99      public static java.util.List<com.liferay.portal.model.Image> getImages(
100         int start, int end) throws com.liferay.portal.SystemException {
101         return getService().getImages(start, end);
102     }
103 
104     public static int getImagesCount()
105         throws com.liferay.portal.SystemException {
106         return getService().getImagesCount();
107     }
108 
109     public static com.liferay.portal.model.Image updateImage(
110         com.liferay.portal.model.Image image)
111         throws com.liferay.portal.SystemException {
112         return getService().updateImage(image);
113     }
114 
115     public static com.liferay.portal.model.Image updateImage(
116         com.liferay.portal.model.Image image, boolean merge)
117         throws com.liferay.portal.SystemException {
118         return getService().updateImage(image, merge);
119     }
120 
121     public static com.liferay.portal.model.Image getCompanyLogo(long imageId) {
122         return getService().getCompanyLogo(imageId);
123     }
124 
125     public static com.liferay.portal.model.Image getDefaultCompanyLogo() {
126         return getService().getDefaultCompanyLogo();
127     }
128 
129     public static com.liferay.portal.model.Image getDefaultOrganizationLogo() {
130         return getService().getDefaultOrganizationLogo();
131     }
132 
133     public static com.liferay.portal.model.Image getDefaultSpacer() {
134         return getService().getDefaultSpacer();
135     }
136 
137     public static com.liferay.portal.model.Image getDefaultUserFemalePortrait() {
138         return getService().getDefaultUserFemalePortrait();
139     }
140 
141     public static com.liferay.portal.model.Image getDefaultUserMalePortrait() {
142         return getService().getDefaultUserMalePortrait();
143     }
144 
145     public static com.liferay.portal.model.Image getImage(byte[] bytes)
146         throws java.io.IOException {
147         return getService().getImage(bytes);
148     }
149 
150     public static com.liferay.portal.model.Image getImage(java.io.File file)
151         throws java.io.IOException {
152         return getService().getImage(file);
153     }
154 
155     public static com.liferay.portal.model.Image getImage(
156         java.io.InputStream is) throws java.io.IOException {
157         return getService().getImage(is);
158     }
159 
160     public static com.liferay.portal.model.Image getImageOrDefault(long imageId) {
161         return getService().getImageOrDefault(imageId);
162     }
163 
164     public static java.util.List<com.liferay.portal.model.Image> getImages()
165         throws com.liferay.portal.SystemException {
166         return getService().getImages();
167     }
168 
169     public static java.util.List<com.liferay.portal.model.Image> getImagesBySize(
170         int size) throws com.liferay.portal.SystemException {
171         return getService().getImagesBySize(size);
172     }
173 
174     public static boolean isNullOrDefaultSpacer(byte[] bytes) {
175         return getService().isNullOrDefaultSpacer(bytes);
176     }
177 
178     public static com.liferay.portal.model.Image updateImage(long imageId,
179         byte[] bytes)
180         throws com.liferay.portal.PortalException,
181             com.liferay.portal.SystemException {
182         return getService().updateImage(imageId, bytes);
183     }
184 
185     public static com.liferay.portal.model.Image updateImage(long imageId,
186         java.io.File file)
187         throws com.liferay.portal.PortalException,
188             com.liferay.portal.SystemException {
189         return getService().updateImage(imageId, file);
190     }
191 
192     public static com.liferay.portal.model.Image updateImage(long imageId,
193         java.io.InputStream is)
194         throws com.liferay.portal.PortalException,
195             com.liferay.portal.SystemException {
196         return getService().updateImage(imageId, is);
197     }
198 
199     public static com.liferay.portal.model.Image updateImage(long imageId,
200         byte[] bytes, java.lang.String type, int height, int width, int size)
201         throws com.liferay.portal.PortalException,
202             com.liferay.portal.SystemException {
203         return getService()
204                    .updateImage(imageId, bytes, type, height, width, size);
205     }
206 
207     public static ImageLocalService getService() {
208         if (_service == null) {
209             _service = (ImageLocalService)PortalBeanLocatorUtil.locate(ImageLocalService.class.getName());
210 
211             ReferenceRegistry.registerReference(ImageLocalServiceUtil.class,
212                 "_service");
213             MethodCache.remove(ImageLocalService.class);
214         }
215 
216         return _service;
217     }
218 
219     public void setService(ImageLocalService service) {
220         MethodCache.remove(ImageLocalService.class);
221 
222         _service = service;
223 
224         ReferenceRegistry.registerReference(ImageLocalServiceUtil.class,
225             "_service");
226         MethodCache.remove(ImageLocalService.class);
227     }
228 
229     private static ImageLocalService _service;
230 }