001    /**
002     * Copyright (c) 2000-2011 Liferay, Inc. All rights reserved.
003     *
004     * The contents of this file are subject to the terms of the Liferay Enterprise
005     * Subscription License ("License"). You may not use this file except in
006     * compliance with the License. You can obtain a copy of the License by
007     * contacting Liferay, Inc. See the License for the specific language governing
008     * permissions and limitations under the License, including but not limited to
009     * distribution rights of the Software.
010     *
011     *
012     *
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    }