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.webdav;
016    
017    import com.liferay.portal.model.Lock;
018    
019    import java.util.List;
020    
021    /**
022     * @author Brian Wing Shun Chan
023     * @author Alexander Chow
024     */
025    public interface WebDAVStorage {
026    
027            public int copyCollectionResource(
028                            WebDAVRequest webDavRequest, Resource resource, String destination,
029                            boolean overwrite, long depth)
030                    throws WebDAVException;
031    
032            public int copySimpleResource(
033                            WebDAVRequest webDavRequest, Resource resource, String destination,
034                            boolean overwrite)
035                    throws WebDAVException;
036    
037            public int deleteResource(WebDAVRequest webDavRequest)
038                    throws WebDAVException;
039    
040            public Resource getResource(WebDAVRequest webDavRequest)
041                    throws WebDAVException;
042    
043            public List<Resource> getResources(WebDAVRequest webDavRequest)
044                    throws WebDAVException;
045    
046            public String getRootPath();
047    
048            public String getToken();
049    
050            public boolean isAvailable(WebDAVRequest webDavRequest)
051                    throws WebDAVException;
052    
053            public boolean isSupportsClassTwo();
054    
055            public Status lockResource(
056                            WebDAVRequest webDavRequest, String owner, long timeout)
057                    throws WebDAVException;
058    
059            public Status makeCollection(WebDAVRequest webDavRequest)
060                    throws WebDAVException;
061    
062            public int moveCollectionResource(
063                            WebDAVRequest webDavRequest, Resource resource, String destination,
064                            boolean overwrite)
065                    throws WebDAVException;
066    
067            public int moveSimpleResource(
068                            WebDAVRequest webDavRequest, Resource resource, String destination,
069                            boolean overwrite)
070                    throws WebDAVException;
071    
072            public int putResource(WebDAVRequest webDavRequest) throws WebDAVException;
073    
074            public Lock refreshResourceLock(
075                            WebDAVRequest webDavRequest, String uuid, long timeout)
076                    throws WebDAVException;
077    
078            public void setRootPath(String rootPath);
079    
080            public void setToken(String token);
081    
082            public boolean unlockResource(WebDAVRequest webDavRequest, String token)
083                    throws WebDAVException;
084    
085    }