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 */ 006package org.fcrepo.auth.webac; 007 008import java.util.List; 009 010import org.fcrepo.kernel.api.auth.ACLHandle; 011import org.fcrepo.kernel.api.auth.WebACAuthorization; 012import org.fcrepo.kernel.api.models.FedoraResource; 013 014/** 015 * A simple class connecting an URI pointing to an ACL to a {@link FedoraResource} that points to that ACL. 016 * 017 * @author ajs6f 018 */ 019public class ACLHandleImpl implements ACLHandle { 020 021 private final FedoraResource resource; 022 023 private final List<WebACAuthorization> authorizations; 024 /** 025 * Default constructor. 026 * 027 * @param resource the requested FedoraResource 028 * @param authorizations any authorizations associated with the uri 029 */ 030 public ACLHandleImpl(final FedoraResource resource, final List<WebACAuthorization> authorizations) { 031 this.resource = resource; 032 this.authorizations = authorizations; 033 } 034 035 @Override 036 public FedoraResource getResource() { 037 return resource; 038 } 039 040 @Override 041 public List<WebACAuthorization> getAuthorizations() { 042 return authorizations; 043 } 044}