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