001/* 002 * The contents of this file are subject to the license and copyright 003 * detailed in the LICENSE and NOTICE files at the root of the source 004 * tree. 005 */ 006 007package org.fcrepo.kernel.api.services; 008 009import org.apache.jena.rdf.model.Model; 010import org.fcrepo.kernel.api.Transaction; 011import org.fcrepo.kernel.api.identifiers.FedoraId; 012import org.fcrepo.kernel.api.models.WebacAcl; 013 014/** 015 * Service for creating and retrieving {@link WebacAcl} 016 * 017 * @author peichman 018 * @author whikloj 019 * @since 6.0.0 020 */ 021public interface WebacAclService { 022 023 /** 024 * Retrieve an existing WebACL by transaction and path 025 * 026 * @param fedoraId the fedoraID to the resource the ACL is part of 027 * @param transaction the transaction 028 * @return retrieved ACL 029 */ 030 WebacAcl find(final Transaction transaction, final FedoraId fedoraId); 031 032 /** 033 * Retrieve or create a new WebACL by transaction and path 034 * 035 * @param transaction the transaction 036 * @param fedoraId the fedoraID to the resource the ACL is part of 037 * @param userPrincipal the user creating the ACL. 038 * @param model the contents of the ACL RDF. 039 */ 040 void create(final Transaction transaction, final FedoraId fedoraId, final String userPrincipal, 041 final Model model); 042}