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<Folder> getAncestors() throws PortalException, SystemException {
049                    List<Folder> folders = _folder.getAncestors();
050    
051                    return toFolderProxyBeans(folders);
052            }
053    
054            public Map<String, Serializable> getAttributes() {
055                    return _folder.getAttributes();
056            }
057    
058            public long getCompanyId() {
059                    return _folder.getCompanyId();
060            }
061    
062            public Date getCreateDate() {
063                    return _folder.getCreateDate();
064            }
065    
066            public String getDescription() {
067                    return _folder.getDescription();
068            }
069    
070            public ExpandoBridge getExpandoBridge() {
071                    ExpandoBridge expandoBridge = _folder.getExpandoBridge();
072    
073                    return (ExpandoBridge)newProxyInstance(
074                            expandoBridge, ExpandoBridge.class);
075            }
076    
077            public long getFolderId() {
078                    return _folder.getFolderId();
079            }
080    
081            public long getGroupId() {
082                    return _folder.getGroupId();
083            }
084    
085            public Date getLastPostDate() {
086                    return _folder.getLastPostDate();
087            }
088    
089            public Object getModel() {
090                    return _folder.getModel();
091            }
092    
093            public Class<?> getModelClass() {
094                    return _folder.getModelClass();
095            }
096    
097            public String getModelClassName() {
098                    return _folder.getModelClassName();
099            }
100    
101            public Date getModifiedDate() {
102                    return _folder.getModifiedDate();
103            }
104    
105            public String getName() {
106                    return _folder.getName();
107            }
108    
109            public Folder getParentFolder() throws PortalException, SystemException {
110                    Folder folder = _folder.getParentFolder();
111    
112                    return newFolderProxyBean(folder);
113            }
114    
115            public long getParentFolderId() {
116                    return _folder.getParentFolderId();
117            }
118    
119            public long getPrimaryKey() {
120                    return _folder.getPrimaryKey();
121            }
122    
123            public Serializable getPrimaryKeyObj() {
124                    return _folder.getPrimaryKeyObj();
125            }
126    
127            public long getRepositoryId() {
128                    return _folder.getRepositoryId();
129            }
130    
131            public long getUserId() {
132                    return _folder.getUserId();
133            }
134    
135            public String getUserName() {
136                    return _folder.getUserName();
137            }
138    
139            public String getUserUuid() throws SystemException {
140                    return _folder.getUserUuid();
141            }
142    
143            public String getUuid() {
144                    return _folder.getUuid();
145            }
146    
147            public boolean hasInheritableLock() {
148                    return _folder.hasInheritableLock();
149            }
150    
151            public boolean hasLock() {
152                    return _folder.hasLock();
153            }
154    
155            public boolean isDefaultRepository() {
156                    return _folder.isDefaultRepository();
157            }
158    
159            public boolean isEscapedModel() {
160                    return _folder.isEscapedModel();
161            }
162    
163            public boolean isLocked() {
164                    return _folder.isLocked();
165            }
166    
167            public boolean isMountPoint() {
168                    return _folder.isMountPoint();
169            }
170    
171            public boolean isRoot() {
172                    return _folder.isRoot();
173            }
174    
175            public boolean isSupportsLocking() {
176                    return _folder.isSupportsLocking();
177            }
178    
179            public boolean isSupportsMetadata() {
180                    return _folder.isSupportsMetadata();
181            }
182    
183            public boolean isSupportsMultipleUpload() {
184                    return _folder.isSupportsMultipleUpload();
185            }
186    
187            public boolean isSupportsShortcuts() {
188                    return _folder.isSupportsShortcuts();
189            }
190    
191            public boolean isSupportsSocial() {
192                    return _folder.isSupportsSocial();
193            }
194    
195            public void setCompanyId(long companyId) {
196                    _folder.setCompanyId(companyId);
197            }
198    
199            public void setCreateDate(Date date) {
200                    _folder.setCreateDate(date);
201            }
202    
203            public void setGroupId(long groupId) {
204                    _folder.setGroupId(groupId);
205            }
206    
207            public void setModifiedDate(Date date) {
208                    _folder.setModifiedDate(date);
209            }
210    
211            public void setPrimaryKeyObj(Serializable primaryKeyObj) {
212                    _folder.setPrimaryKeyObj(primaryKeyObj);
213            }
214    
215            public void setUserId(long userId) {
216                    _folder.setUserId(userId);
217            }
218    
219            public void setUserName(String userName) {
220                    _folder.setUserName(userName);
221            }
222    
223            public void setUserUuid(String userUuid) {
224                    _folder.setUserUuid(userUuid);
225            }
226    
227            public Folder toEscapedModel() {
228                    Folder folder = _folder.toEscapedModel();
229    
230                    return newFolderProxyBean(folder);
231            }
232    
233            private Folder _folder;
234    
235    }