1 /* 2 * Licensed to the Apache Software Foundation (ASF) under one 3 * or more contributor license agreements. See the NOTICE file 4 * distributed with this work for additional information 5 * regarding copyright ownership. The ASF licenses this file 6 * to you under the Apache License, Version 2.0 (the 7 * "License"); you may not use this file except in compliance 8 * with the License. You may obtain a copy of the License at 9 * 10 * http://www.apache.org/licenses/LICENSE-2.0 11 * 12 * Unless required by applicable law or agreed to in writing, 13 * software distributed under the License is distributed on an 14 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 * KIND, either express or implied. See the License for the 16 * specific language governing permissions and limitations 17 * under the License. 18 */ 19 package org.apache.chemistry.opencmis.commons.spi; 20 21 import org.apache.chemistry.opencmis.commons.data.Acl; 22 import org.apache.chemistry.opencmis.commons.data.ExtensionsData; 23 import org.apache.chemistry.opencmis.commons.enums.AclPropagation; 24 25 /** 26 * ACL Service interface. 27 * 28 * <p> 29 * <em> 30 * See the CMIS 1.0 and CMIS 1.1 specifications for details on the operations, parameters, 31 * exceptions and the domain model. 32 * </em> 33 * </p> 34 */ 35 public interface AclService { 36 37 /** 38 * Get the ACL currently applied to the specified object. 39 * 40 * @param repositoryId 41 * the identifier for the repository 42 * @param objectId 43 * the identifier for the object 44 * @param onlyBasicPermissions 45 * <em>(optional)</em> an indicator if only basic permissions 46 * should be returned (default is {@code true}) 47 * @param extension 48 * extension data 49 * @return the ACL of the object 50 */ 51 Acl getAcl(String repositoryId, String objectId, Boolean onlyBasicPermissions, ExtensionsData extension); 52 53 /** 54 * Adds or removes the given ACEs to or from the ACL of the object. 55 * 56 * @param repositoryId 57 * the identifier for the repository 58 * @param objectId 59 * the identifier for the object 60 * @param addAces 61 * <em>(optional)</em> the ACEs to be added 62 * @param removeAces 63 * <em>(optional)</em> the ACEs to be removed 64 * @param aclPropagation 65 * <em>(optional)</em> specifies how ACEs should be handled 66 * (default is {@link AclPropagation#REPOSITORYDETERMINED}) 67 * @param extension 68 * extension data 69 * @return the ACL of the object 70 */ 71 Acl applyAcl(String repositoryId, String objectId, Acl addAces, Acl removeAces, AclPropagation aclPropagation, 72 ExtensionsData extension); 73 }