001    /**
002     * Copyright (c) 2000-2012 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.repository.proxy;
016    
017    import com.liferay.portal.kernel.exception.PortalException;
018    import com.liferay.portal.kernel.exception.SystemException;
019    import com.liferay.portal.kernel.repository.model.Folder;
020    import com.liferay.portal.security.permission.PermissionChecker;
021    import com.liferay.portlet.expando.model.ExpandoBridge;
022    
023    import java.io.Serializable;
024    
025    import java.util.Date;
026    import java.util.List;
027    import java.util.Map;
028    
029    /**
030     * @author Mika Koivisto
031     */
032    public class FolderProxyBean
033            extends RepositoryModelProxyBean implements Folder {
034    
035            public FolderProxyBean(Folder folder, ClassLoader classLoader) {
036                    super(classLoader);
037    
038                    _folder = folder;
039            }
040    
041            public boolean containsPermission(
042                            PermissionChecker permissionChecker, String actionId)
043                    throws PortalException, SystemException {
044    
045                    return _folder.containsPermission(permissionChecker, actionId);
046            }
047    
048            public List<Long> getAncestorFolderIds()
049                    throws PortalException, SystemException {
050    
051                    return _folder.getAncestorFolderIds();
052            }
053    
054            public List<Folder> getAncestors() throws PortalException, SystemException {
055                    List<Folder> folders = _folder.getAncestors();
056    
057                    return toFolderProxyBeans(folders);
058            }
059    
060            public Map<String, Serializable> getAttributes() {
061                    return _folder.getAttributes();
062            }
063    
064            public long getCompanyId() {
065                    return _folder.getCompanyId();
066            }
067    
068            public Date getCreateDate() {
069                    return _folder.getCreateDate();
070            }
071    
072            public String getDescription() {
073                    return _folder.getDescription();
074            }
075    
076            public ExpandoBridge getExpandoBridge() {
077                    ExpandoBridge expandoBridge = _folder.getExpandoBridge();
078    
079                    return (ExpandoBridge)newProxyInstance(
080                            expandoBridge, ExpandoBridge.class);
081            }
082    
083            public long getFolderId() {
084                    return _folder.getFolderId();
085            }
086    
087            public long getGroupId() {
088                    return _folder.getGroupId();
089            }
090    
091            public Date getLastPostDate() {
092                    return _folder.getLastPostDate();
093            }
094    
095            public Object getModel() {
096                    return _folder.getModel();
097            }
098    
099            public Class<?> getModelClass() {
100                    return _folder.getModelClass();
101            }
102    
103            public String getModelClassName() {
104                    return _folder.getModelClassName();
105            }
106    
107            public Date getModifiedDate() {
108                    return _folder.getModifiedDate();
109            }
110    
111            public String getName() {
112                    return _folder.getName();
113            }
114    
115            public Folder getParentFolder() throws PortalException, SystemException {
116                    Folder folder = _folder.getParentFolder();
117    
118                    return newFolderProxyBean(folder);
119            }
120    
121            public long getParentFolderId() {
122                    return _folder.getParentFolderId();
123            }
124    
125            public long getPrimaryKey() {
126                    return _folder.getPrimaryKey();
127            }
128    
129            public Serializable getPrimaryKeyObj() {
130                    return _folder.getPrimaryKeyObj();
131            }
132    
133            public long getRepositoryId() {
134                    return _folder.getRepositoryId();
135            }
136    
137            public long getUserId() {
138                    return _folder.getUserId();
139            }
140    
141            public String getUserName() {
142                    return _folder.getUserName();
143            }
144    
145            public String getUserUuid() throws SystemException {
146                    return _folder.getUserUuid();
147            }
148    
149            public String getUuid() {
150                    return _folder.getUuid();
151            }
152    
153            public boolean hasInheritableLock() {
154                    return _folder.hasInheritableLock();
155            }
156    
157            public boolean hasLock() {
158                    return _folder.hasLock();
159            }
160    
161            public boolean isDefaultRepository() {
162                    return _folder.isDefaultRepository();
163            }
164    
165            public boolean isEscapedModel() {
166                    return _folder.isEscapedModel();
167            }
168    
169            public boolean isLocked() {
170                    return _folder.isLocked();
171            }
172    
173            public boolean isMountPoint() {
174                    return _folder.isMountPoint();
175            }
176    
177            public boolean isRoot() {
178                    return _folder.isRoot();
179            }
180    
181            public boolean isSupportsLocking() {
182                    return _folder.isSupportsLocking();
183            }
184    
185            public boolean isSupportsMetadata() {
186                    return _folder.isSupportsMetadata();
187            }
188    
189            public boolean isSupportsMultipleUpload() {
190                    return _folder.isSupportsMultipleUpload();
191            }
192    
193            public boolean isSupportsShortcuts() {
194                    return _folder.isSupportsShortcuts();
195            }
196    
197            public boolean isSupportsSocial() {
198                    return _folder.isSupportsSocial();
199            }
200    
201            public boolean isSupportsSubscribing() {
202                    return _folder.isSupportsSubscribing();
203            }
204    
205            public void setCompanyId(long companyId) {
206                    _folder.setCompanyId(companyId);
207            }
208    
209            public void setCreateDate(Date date) {
210                    _folder.setCreateDate(date);
211            }
212    
213            public void setGroupId(long groupId) {
214                    _folder.setGroupId(groupId);
215            }
216    
217            public void setModifiedDate(Date date) {
218                    _folder.setModifiedDate(date);
219            }
220    
221            public void setPrimaryKeyObj(Serializable primaryKeyObj) {
222                    _folder.setPrimaryKeyObj(primaryKeyObj);
223            }
224    
225            public void setUserId(long userId) {
226                    _folder.setUserId(userId);
227            }
228    
229            public void setUserName(String userName) {
230                    _folder.setUserName(userName);
231            }
232    
233            public void setUserUuid(String userUuid) {
234                    _folder.setUserUuid(userUuid);
235            }
236    
237            public Folder toEscapedModel() {
238                    Folder folder = _folder.toEscapedModel();
239    
240                    return newFolderProxyBean(folder);
241            }
242    
243            public Folder toUnescapedModel() {
244                    Folder folder = _folder.toUnescapedModel();
245    
246                    return newFolderProxyBean(folder);
247            }
248    
249            private Folder _folder;
250    
251    }