01: /*
02: * Licensed to the Apache Software Foundation (ASF) under one or more
03: * contributor license agreements. See the NOTICE file distributed with
04: * this work for additional information regarding copyright ownership.
05: * The ASF licenses this file to You under the Apache License, Version 2.0
06: * (the "License"); you may not use this file except in compliance with
07: * the License. You may obtain a copy of the License at
08: *
09: * http://www.apache.org/licenses/LICENSE-2.0
10: *
11: * Unless required by applicable law or agreed to in writing, software
12: * distributed under the License is distributed on an "AS IS" BASIS,
13: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14: * See the License for the specific language governing permissions and
15: * limitations under the License.
16: *
17: */
18:
19: /* $Id: AccessControllerResolver.java 473861 2006-11-12 03:51:14Z gregor $ */
20:
21: package org.apache.lenya.ac;
22:
23: import org.apache.avalon.framework.component.Component;
24:
25: /**
26: * An access controller resolver resolves the appropriate access controller
27: * for a given Cocoon object model.
28: */
29: public interface AccessControllerResolver extends Component {
30:
31: /**
32: * The Avalon role.
33: */
34: String ROLE = AccessControllerResolver.class.getName();
35:
36: /**
37: * The name of the default resolver to use.
38: */
39: String DEFAULT_RESOLVER = "publication";
40:
41: /**
42: * Resolves an access controller for a certain URL.
43: * @param webappUrl The URL within the web application (without context prefix).
44: * @return An access controller or <code>null</code> if no controller could be resolved.
45: * @throws AccessControlException when something went wrong.
46: */
47: AccessController resolveAccessController(String webappUrl)
48: throws AccessControlException;
49:
50: /**
51: * Releases a resolved access controller.
52: * @param controller The access controller to release.
53: */
54: void release(AccessController controller);
55:
56: }
|