1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package org.acegisecurity.afterinvocation;
17
18 import org.acegisecurity.AccessDeniedException;
19 import org.acegisecurity.Authentication;
20 import org.acegisecurity.ConfigAttribute;
21 import org.acegisecurity.ConfigAttributeDefinition;
22
23
24 /***
25 * Indicates a class is responsible for participating in an {@link
26 * AfterInvocationProviderManager} decision.
27 *
28 * @author Ben Alex
29 * @version $Id: AfterInvocationProvider.java,v 1.2 2005/11/17 00:55:56 benalex Exp $
30 */
31 public interface AfterInvocationProvider {
32
33
34 public Object decide(Authentication authentication, Object object,
35 ConfigAttributeDefinition config, Object returnedObject)
36 throws AccessDeniedException;
37
38 /***
39 * Indicates whether this <code>AfterInvocationProvider</code> is able to
40 * participate in a decision involving the passed
41 * <code>ConfigAttribute</code>.
42 *
43 * <p>
44 * This allows the <code>AbstractSecurityInterceptor</code> to check every
45 * configuration attribute can be consumed by the configured
46 * <code>AccessDecisionManager</code> and/or <code>RunAsManager</code>
47 * and/or <code>AccessDecisionManager</code>.
48 * </p>
49 *
50 * @param attribute a configuration attribute that has been configured
51 * against the <code>AbstractSecurityInterceptor</code>
52 *
53 * @return true if this <code>AfterInvocationProvider</code> can support
54 * the passed configuration attribute
55 */
56 public boolean supports(ConfigAttribute attribute);
57
58 /***
59 * Indicates whether the <code>AfterInvocationProvider</code> is able to
60 * provide "after invocation" processing for the indicated secured object
61 * type.
62 *
63 * @param clazz the class of secure object that is being queried
64 *
65 * @return true if the implementation can process the indicated class
66 */
67 public boolean supports(Class clazz);
68 }