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.cmis;
016    
017    import com.liferay.portal.kernel.exception.PortalException;
018    import com.liferay.portal.kernel.repository.BaseRepositoryImpl;
019    import com.liferay.portal.kernel.repository.model.FileEntry;
020    import com.liferay.portal.kernel.repository.model.Folder;
021    import com.liferay.portal.service.ServiceContext;
022    
023    import java.io.InputStream;
024    
025    import java.util.List;
026    import java.util.Map;
027    
028    /**
029     * @author Alexander Chow
030     */
031    public abstract class BaseCmisRepository extends BaseRepositoryImpl {
032    
033            public abstract String getLatestVersionId(String objectId);
034    
035            public abstract String getObjectName(String objectId)
036                    throws PortalException;
037    
038            public abstract List<String> getObjectPaths(String objectId)
039                    throws PortalException;
040    
041            public abstract boolean isCancelCheckOutAllowable(String objectId)
042                    throws PortalException;
043    
044            public abstract boolean isCheckInAllowable(String objectId)
045                    throws PortalException;
046    
047            public abstract boolean isCheckOutAllowable(String objectId)
048                    throws PortalException;
049    
050            public abstract boolean isSupportsMinorVersions() throws PortalException;
051    
052            public abstract FileEntry toFileEntry(String objectId)
053                    throws PortalException;
054    
055            public abstract Folder toFolder(String objectId) throws PortalException;
056    
057            public abstract FileEntry updateFileEntry(
058                            String objectId, String mimeType, Map<String, Object> properties,
059                            InputStream is, String sourceFileName, long size,
060                            ServiceContext serviceContext)
061                    throws PortalException;
062    
063    }