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