001    /**
002     * Copyright (c) 2000-present 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.kernel.repository.model;
016    
017    import com.liferay.portal.kernel.exception.PortalException;
018    import com.liferay.portal.kernel.util.Accessor;
019    import com.liferay.portal.security.permission.PermissionChecker;
020    
021    import java.util.Date;
022    import java.util.List;
023    
024    /**
025     * @author Alexander Chow
026     */
027    public interface Folder extends RepositoryEntry, RepositoryModel<Folder> {
028    
029            public static final Accessor<Folder, Long> FOLDER_ID_ACCESSOR =
030    
031                    new Accessor<Folder, Long>() {
032    
033                            @Override
034                            public Long get(Folder folder) {
035                                    return folder.getFolderId();
036                            }
037    
038                            @Override
039                            public Class<Long> getAttributeClass() {
040                                    return Long.class;
041                            }
042    
043                            @Override
044                            public Class<Folder> getTypeClass() {
045                                    return Folder.class;
046                            }
047    
048                    };
049    
050            public boolean containsPermission(
051                            PermissionChecker permissionChecker, String actionId)
052                    throws PortalException;
053    
054            public List<Long> getAncestorFolderIds() throws PortalException;
055    
056            public List<Folder> getAncestors() throws PortalException;
057    
058            @Override
059            public long getCompanyId();
060    
061            @Override
062            public Date getCreateDate();
063    
064            public String getDescription();
065    
066            public long getFolderId();
067    
068            @Override
069            public long getGroupId();
070    
071            public Date getLastPostDate();
072    
073            @Override
074            public Date getModifiedDate();
075    
076            public String getName();
077    
078            public Folder getParentFolder() throws PortalException;
079    
080            public long getParentFolderId();
081    
082            public long getRepositoryId();
083    
084            @Override
085            public long getUserId();
086    
087            @Override
088            public String getUserName();
089    
090            @Override
091            public String getUserUuid();
092    
093            @Override
094            public String getUuid();
095    
096            public boolean hasInheritableLock();
097    
098            public boolean hasLock();
099    
100            public boolean isDefaultRepository();
101    
102            public boolean isLocked();
103    
104            public boolean isMountPoint();
105    
106            public boolean isRoot();
107    
108            public boolean isSupportsLocking();
109    
110            public boolean isSupportsMetadata();
111    
112            public boolean isSupportsMultipleUpload();
113    
114            public boolean isSupportsShortcuts();
115    
116            public boolean isSupportsSocial();
117    
118            public boolean isSupportsSubscribing();
119    
120    }