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.annotation.Isolation;
018    import com.liferay.portal.kernel.annotation.Propagation;
019    import com.liferay.portal.kernel.annotation.Transactional;
020    import com.liferay.portal.kernel.exception.PortalException;
021    import com.liferay.portal.kernel.exception.SystemException;
022    
023    /**
024     * <p>
025     * This interface defines the service. The default implementation is
026     * {@link
027     * com.liferay.portal.service.impl.ImageLocalServiceImpl}.
028     * Modify methods in that class and rerun ServiceBuilder to populate this class
029     * and all other generated classes.
030     * </p>
031     *
032     * <p>
033     * This is a local service. Methods of this service will not have security checks based on the propagated JAAS credentials because this service can only be accessed from within the same VM.
034     * </p>
035     *
036     * @author    Brian Wing Shun Chan
037     * @see       ImageLocalServiceUtil
038     * @generated
039     */
040    @Transactional(isolation = Isolation.PORTAL, rollbackFor =  {
041            PortalException.class, SystemException.class})
042    public interface ImageLocalService {
043            public com.liferay.portal.model.Image addImage(
044                    com.liferay.portal.model.Image image)
045                    throws com.liferay.portal.kernel.exception.SystemException;
046    
047            public com.liferay.portal.model.Image createImage(long imageId);
048    
049            public void deleteImage(long imageId)
050                    throws com.liferay.portal.kernel.exception.PortalException,
051                            com.liferay.portal.kernel.exception.SystemException;
052    
053            public void deleteImage(com.liferay.portal.model.Image image)
054                    throws com.liferay.portal.kernel.exception.SystemException;
055    
056            @SuppressWarnings("unchecked")
057            public java.util.List dynamicQuery(
058                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
059                    throws com.liferay.portal.kernel.exception.SystemException;
060    
061            @SuppressWarnings("unchecked")
062            public 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    
066            @SuppressWarnings("unchecked")
067            public java.util.List dynamicQuery(
068                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
069                    int end,
070                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
071                    throws com.liferay.portal.kernel.exception.SystemException;
072    
073            public long dynamicQueryCount(
074                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
075                    throws com.liferay.portal.kernel.exception.SystemException;
076    
077            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
078            public com.liferay.portal.model.Image getImage(long imageId)
079                    throws com.liferay.portal.kernel.exception.PortalException,
080                            com.liferay.portal.kernel.exception.SystemException;
081    
082            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
083            public java.util.List<com.liferay.portal.model.Image> getImages(int start,
084                    int end) throws com.liferay.portal.kernel.exception.SystemException;
085    
086            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
087            public int getImagesCount()
088                    throws com.liferay.portal.kernel.exception.SystemException;
089    
090            public com.liferay.portal.model.Image updateImage(
091                    com.liferay.portal.model.Image image)
092                    throws com.liferay.portal.kernel.exception.SystemException;
093    
094            public com.liferay.portal.model.Image updateImage(
095                    com.liferay.portal.model.Image image, boolean merge)
096                    throws com.liferay.portal.kernel.exception.SystemException;
097    
098            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
099            public com.liferay.portal.model.Image getCompanyLogo(long imageId);
100    
101            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
102            public com.liferay.portal.model.Image getDefaultCompanyLogo();
103    
104            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
105            public com.liferay.portal.model.Image getDefaultOrganizationLogo();
106    
107            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
108            public com.liferay.portal.model.Image getDefaultSpacer();
109    
110            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
111            public com.liferay.portal.model.Image getDefaultUserFemalePortrait();
112    
113            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
114            public com.liferay.portal.model.Image getDefaultUserMalePortrait();
115    
116            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
117            public com.liferay.portal.model.Image getImage(byte[] bytes)
118                    throws com.liferay.portal.kernel.exception.PortalException,
119                            com.liferay.portal.kernel.exception.SystemException;
120    
121            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
122            public com.liferay.portal.model.Image getImage(java.io.File file)
123                    throws com.liferay.portal.kernel.exception.PortalException,
124                            com.liferay.portal.kernel.exception.SystemException;
125    
126            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
127            public com.liferay.portal.model.Image getImage(java.io.InputStream is)
128                    throws com.liferay.portal.kernel.exception.PortalException,
129                            com.liferay.portal.kernel.exception.SystemException;
130    
131            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
132            public com.liferay.portal.model.Image getImageOrDefault(long imageId);
133    
134            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
135            public java.util.List<com.liferay.portal.model.Image> getImages()
136                    throws com.liferay.portal.kernel.exception.SystemException;
137    
138            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
139            public java.util.List<com.liferay.portal.model.Image> getImagesBySize(
140                    int size) throws com.liferay.portal.kernel.exception.SystemException;
141    
142            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
143            public boolean isNullOrDefaultSpacer(byte[] bytes);
144    
145            public com.liferay.portal.model.Image updateImage(long imageId, byte[] bytes)
146                    throws com.liferay.portal.kernel.exception.PortalException,
147                            com.liferay.portal.kernel.exception.SystemException;
148    
149            public com.liferay.portal.model.Image updateImage(long imageId,
150                    java.io.File file)
151                    throws com.liferay.portal.kernel.exception.PortalException,
152                            com.liferay.portal.kernel.exception.SystemException;
153    
154            public com.liferay.portal.model.Image updateImage(long imageId,
155                    java.io.InputStream is)
156                    throws com.liferay.portal.kernel.exception.PortalException,
157                            com.liferay.portal.kernel.exception.SystemException;
158    
159            public com.liferay.portal.model.Image updateImage(long imageId,
160                    byte[] bytes, java.lang.String type, int height, int width, int size)
161                    throws com.liferay.portal.kernel.exception.PortalException,
162                            com.liferay.portal.kernel.exception.SystemException;
163    }