001    /**
002     * Copyright (c) 2000-2010 Liferay, Inc. All rights reserved.
003     *
004     * This library is free software; you can redistribute it and/or modify it under
005     * the terms of the GNU Lesser General Public License as published by the Free
006     * Software Foundation; either version 2.1 of the License, or (at your option)
007     * any later version.
008     *
009     * This library is distributed in the hope that it will be useful, but WITHOUT
010     * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
011     * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
012     * details.
013     */
014    
015    package com.liferay.portal.service;
016    
017    import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
018    
019    /**
020     * <p>
021     * This class provides static methods for the
022     * {@link ImageLocalService} bean. The static methods of
023     * this class calls the same methods of the bean instance. It's convenient to be
024     * able to just write one line to call a method on a bean instead of writing a
025     * lookup call and a method call.
026     * </p>
027     *
028     * @author    Brian Wing Shun Chan
029     * @see       ImageLocalService
030     * @generated
031     */
032    public class ImageLocalServiceUtil {
033            public static com.liferay.portal.model.Image addImage(
034                    com.liferay.portal.model.Image image)
035                    throws com.liferay.portal.kernel.exception.SystemException {
036                    return getService().addImage(image);
037            }
038    
039            public static com.liferay.portal.model.Image createImage(long imageId) {
040                    return getService().createImage(imageId);
041            }
042    
043            public static void deleteImage(long imageId)
044                    throws com.liferay.portal.kernel.exception.PortalException,
045                            com.liferay.portal.kernel.exception.SystemException {
046                    getService().deleteImage(imageId);
047            }
048    
049            public static void deleteImage(com.liferay.portal.model.Image image)
050                    throws com.liferay.portal.kernel.exception.SystemException {
051                    getService().deleteImage(image);
052            }
053    
054            @SuppressWarnings("unchecked")
055            public static java.util.List dynamicQuery(
056                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
057                    throws com.liferay.portal.kernel.exception.SystemException {
058                    return getService().dynamicQuery(dynamicQuery);
059            }
060    
061            @SuppressWarnings("unchecked")
062            public static java.util.List dynamicQuery(
063                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
064                    int end) throws com.liferay.portal.kernel.exception.SystemException {
065                    return getService().dynamicQuery(dynamicQuery, start, end);
066            }
067    
068            @SuppressWarnings("unchecked")
069            public static java.util.List dynamicQuery(
070                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
071                    int end,
072                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
073                    throws com.liferay.portal.kernel.exception.SystemException {
074                    return getService()
075                                       .dynamicQuery(dynamicQuery, start, end, orderByComparator);
076            }
077    
078            public static long dynamicQueryCount(
079                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
080                    throws com.liferay.portal.kernel.exception.SystemException {
081                    return getService().dynamicQueryCount(dynamicQuery);
082            }
083    
084            public static com.liferay.portal.model.Image getImage(long imageId)
085                    throws com.liferay.portal.kernel.exception.PortalException,
086                            com.liferay.portal.kernel.exception.SystemException {
087                    return getService().getImage(imageId);
088            }
089    
090            public static java.util.List<com.liferay.portal.model.Image> getImages(
091                    int start, int end)
092                    throws com.liferay.portal.kernel.exception.SystemException {
093                    return getService().getImages(start, end);
094            }
095    
096            public static int getImagesCount()
097                    throws com.liferay.portal.kernel.exception.SystemException {
098                    return getService().getImagesCount();
099            }
100    
101            public static com.liferay.portal.model.Image updateImage(
102                    com.liferay.portal.model.Image image)
103                    throws com.liferay.portal.kernel.exception.SystemException {
104                    return getService().updateImage(image);
105            }
106    
107            public static com.liferay.portal.model.Image updateImage(
108                    com.liferay.portal.model.Image image, boolean merge)
109                    throws com.liferay.portal.kernel.exception.SystemException {
110                    return getService().updateImage(image, merge);
111            }
112    
113            public static com.liferay.portal.model.Image getCompanyLogo(long imageId) {
114                    return getService().getCompanyLogo(imageId);
115            }
116    
117            public static com.liferay.portal.model.Image getDefaultCompanyLogo() {
118                    return getService().getDefaultCompanyLogo();
119            }
120    
121            public static com.liferay.portal.model.Image getDefaultOrganizationLogo() {
122                    return getService().getDefaultOrganizationLogo();
123            }
124    
125            public static com.liferay.portal.model.Image getDefaultSpacer() {
126                    return getService().getDefaultSpacer();
127            }
128    
129            public static com.liferay.portal.model.Image getDefaultUserFemalePortrait() {
130                    return getService().getDefaultUserFemalePortrait();
131            }
132    
133            public static com.liferay.portal.model.Image getDefaultUserMalePortrait() {
134                    return getService().getDefaultUserMalePortrait();
135            }
136    
137            public static com.liferay.portal.model.Image getImage(byte[] bytes)
138                    throws com.liferay.portal.kernel.exception.PortalException,
139                            com.liferay.portal.kernel.exception.SystemException {
140                    return getService().getImage(bytes);
141            }
142    
143            public static com.liferay.portal.model.Image getImage(java.io.File file)
144                    throws com.liferay.portal.kernel.exception.PortalException,
145                            com.liferay.portal.kernel.exception.SystemException {
146                    return getService().getImage(file);
147            }
148    
149            public static com.liferay.portal.model.Image getImage(
150                    java.io.InputStream is)
151                    throws com.liferay.portal.kernel.exception.PortalException,
152                            com.liferay.portal.kernel.exception.SystemException {
153                    return getService().getImage(is);
154            }
155    
156            public static com.liferay.portal.model.Image getImageOrDefault(long imageId) {
157                    return getService().getImageOrDefault(imageId);
158            }
159    
160            public static java.util.List<com.liferay.portal.model.Image> getImages()
161                    throws com.liferay.portal.kernel.exception.SystemException {
162                    return getService().getImages();
163            }
164    
165            public static java.util.List<com.liferay.portal.model.Image> getImagesBySize(
166                    int size) throws com.liferay.portal.kernel.exception.SystemException {
167                    return getService().getImagesBySize(size);
168            }
169    
170            public static boolean isNullOrDefaultSpacer(byte[] bytes) {
171                    return getService().isNullOrDefaultSpacer(bytes);
172            }
173    
174            public static com.liferay.portal.model.Image updateImage(long imageId,
175                    byte[] bytes)
176                    throws com.liferay.portal.kernel.exception.PortalException,
177                            com.liferay.portal.kernel.exception.SystemException {
178                    return getService().updateImage(imageId, bytes);
179            }
180    
181            public static com.liferay.portal.model.Image updateImage(long imageId,
182                    java.io.File file)
183                    throws com.liferay.portal.kernel.exception.PortalException,
184                            com.liferay.portal.kernel.exception.SystemException {
185                    return getService().updateImage(imageId, file);
186            }
187    
188            public static com.liferay.portal.model.Image updateImage(long imageId,
189                    java.io.InputStream is)
190                    throws com.liferay.portal.kernel.exception.PortalException,
191                            com.liferay.portal.kernel.exception.SystemException {
192                    return getService().updateImage(imageId, is);
193            }
194    
195            public static com.liferay.portal.model.Image updateImage(long imageId,
196                    byte[] bytes, java.lang.String type, int height, int width, int size)
197                    throws com.liferay.portal.kernel.exception.PortalException,
198                            com.liferay.portal.kernel.exception.SystemException {
199                    return getService()
200                                       .updateImage(imageId, bytes, type, height, width, size);
201            }
202    
203            public static ImageLocalService getService() {
204                    if (_service == null) {
205                            _service = (ImageLocalService)PortalBeanLocatorUtil.locate(ImageLocalService.class.getName());
206                    }
207    
208                    return _service;
209            }
210    
211            public void setService(ImageLocalService service) {
212                    _service = service;
213            }
214    
215            private static ImageLocalService _service;
216    }