org.acegisecurity.acl.AclProvider Maven / Gradle / Ivy
/* Copyright 2004 Acegi Technology Pty Limited
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.acegisecurity.acl;
import org.acegisecurity.Authentication;
/**
* Indicates a class can process a given domain object instance and
* authoritatively return the ACLs that apply.
*
*
* Implementations are typically called from the {@link AclProviderManager}.
*
*
* @author Ben Alex
* @version $Id: AclProvider.java,v 1.2 2005/11/17 00:55:51 benalex Exp $
*/
public interface AclProvider {
//~ Methods ================================================================
/**
* Obtains the ACLs that apply to the specified domain instance.
*
*
* Will never be called unless the {@link #supports(Object)} method
* returned true
.
*
*
* @param domainInstance the instance for which ACL information is required
* (never null
)
*
* @return the ACLs that apply, or null
if no ACLs apply to
* the specified domain instance
*/
public AclEntry[] getAcls(Object domainInstance);
/**
* Obtains the ACLs that apply to the specified domain instance
* and presented Authentication
object.
*
*
* Will never be called unless the {@link #supports(Object)} method
* returned true
.
*
*
* @param domainInstance the instance for which ACL information is required
* (never null
)
* @param authentication the prncipal for which ACL information should be
* filtered (never null
)
*
* @return only those ACLs applying to the domain instance that have been
* granted to the principal (or null
) if no such ACLs
* are found
*/
public AclEntry[] getAcls(Object domainInstance,
Authentication authentication);
/**
* Indicates whether this AclProvider
can authoritatively
* return ACL information for the specified domain object instance.
*
* @param domainInstance the instance for which ACL information is required
* (never null
)
*
* @return true
if this provider is authoritative for the
* specified domain object instance, false
otherwise
*/
public boolean supports(Object domainInstance);
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy