001/*
002 * This library is part of OpenCms -
003 * the Open Source Content Management System
004 *
005 * Copyright (C) Alkacon Software (http://www.alkacon.com)
006 *
007 * This library is free software; you can redistribute it and/or
008 * modify it under the terms of the GNU Lesser General Public
009 * License as published by the Free Software Foundation; either
010 * version 2.1 of the License, or (at your option) any later version.
011 *
012 * This library is distributed in the hope that it will be useful,
013 * but WITHOUT ANY WARRANTY; without even the implied warranty of
014 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
015 * Lesser General Public License for more details.
016 *
017 * For further information about Alkacon Software, please see the
018 * company website: http://www.alkacon.com
019 *
020 * For further information about OpenCms, please see the
021 * project website: http://www.opencms.org
022 *
023 * You should have received a copy of the GNU Lesser General Public
024 * License along with this library; if not, write to the Free Software
025 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
026 */
027
028package org.opencms.cmis;
029
030import org.apache.chemistry.opencmis.commons.data.Acl;
031import org.apache.chemistry.opencmis.commons.data.AllowableActions;
032import org.apache.chemistry.opencmis.commons.data.ObjectData;
033import org.apache.chemistry.opencmis.commons.enums.IncludeRelationships;
034
035/**
036 * Interface containing the basic CRUD operations for CMIS objects.<p>
037 */
038public interface I_CmsCmisObjectHelper {
039
040    /**
041     * Deletes a CMIS object.<p>
042     *
043     * @param context the call context
044     * @param objectId the id of the object to delete
045     * @param allVersions flag to delete all version
046     */
047    void deleteObject(CmsCmisCallContext context, String objectId, boolean allVersions);
048
049    /**
050     * Gets the ACL for an object.<p>
051     *
052     * @param context the call context
053     * @param objectId the object id
054     * @param onlyBasicPermissions flag to only get basic permissions
055     *
056     * @return the ACL for the object
057     */
058    Acl getAcl(CmsCmisCallContext context, String objectId, boolean onlyBasicPermissions);
059
060    /**
061     * Gets the allowable actions for an object.<p>
062     *
063     * @param context the call context
064     * @param objectId the object id
065     * @return the allowable actions
066     */
067    AllowableActions getAllowableActions(CmsCmisCallContext context, String objectId);
068
069    /**
070     * Gets the data for a CMIS object.<p>
071     *
072     * @param context the CMIS call context
073     * @param objectId the id of the object
074     * @param filter the property filter
075     * @param includeAllowableActions flag to include allowable actions
076     * @param includeRelationships flag to include relationships
077     * @param renditionFilter the rendition filter string
078     * @param includePolicyIds flag to include policy ids
079     * @param includeAcl flag to include ACLs
080     *
081     * @return the CMIS object data
082     */
083    ObjectData getObject(
084        CmsCmisCallContext context,
085        String objectId,
086        String filter,
087        boolean includeAllowableActions,
088        IncludeRelationships includeRelationships,
089        String renditionFilter,
090        boolean includePolicyIds,
091        boolean includeAcl);
092}