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.security.pacl.permission;
016    
017    /**
018     * @author Raymond Aug??
019     */
020    public class PortalFilePermission {
021    
022            public static void checkCopy(String source, String destination) {
023                    _pacl.checkCopy(source, destination);
024            }
025    
026            public static void checkDelete(String path) {
027                    _pacl.checkDelete(path);
028            }
029    
030            public static void checkMove(String source, String destination) {
031                    _pacl.checkMove(source, destination);
032            }
033    
034            public static void checkRead(String path) {
035                    _pacl.checkRead(path);
036            }
037    
038            public static void checkWrite(String path) {
039                    _pacl.checkWrite(path);
040            }
041    
042            public static interface PACL {
043    
044                    public void checkCopy(String source, String destination);
045    
046                    public void checkDelete(String path);
047    
048                    public void checkMove(String source, String destination);
049    
050                    public void checkRead(String path);
051    
052                    public void checkWrite(String path);
053    
054            }
055    
056            private static PACL _pacl = new NoPACL();
057    
058            private static class NoPACL implements PACL {
059    
060                    @Override
061                    public void checkCopy(String source, String destination) {
062                    }
063    
064                    @Override
065                    public void checkDelete(String path) {
066                    }
067    
068                    @Override
069                    public void checkMove(String source, String destination) {
070                    }
071    
072                    @Override
073                    public void checkRead(String path) {
074                    }
075    
076                    @Override
077                    public void checkWrite(String path) {
078                    }
079    
080            }
081    
082    }