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: */package org.apache.geronimo.jetty6;
17:
18: import org.mortbay.jetty.Server;
19: import org.mortbay.jetty.security.UserRealm;
20:
21: /**
22: * JettyServer extends the base Jetty Server class to prevent managing any user realm information by the web.xml realm name
23: * which is only relevant for basic and digest authentication and should not be tied to any
24: * actual information about which security realm is in use.
25: *
26: * @version $Rev: 482336 $ $Date: 2006-12-04 12:12:19 -0800 (Mon, 04 Dec 2006) $
27: */
28: public class JettyServer extends Server {
29:
30: public void addUserRealms(UserRealm[] realms) {
31: throw new IllegalArgumentException(
32: "You must supply a security-realm-name to every web module using security features");
33: }
34:
35: public void addUserRealm(UserRealm realm) {
36: throw new IllegalArgumentException(
37: "You must supply a security-realm-name to every web module using security features");
38: }
39:
40: /**
41: * TODO maybe remove intead?
42: *
43: * @param realm
44: * @return
45: * @deprecated
46: */
47: public UserRealm addRealm(UserRealm realm) {
48: throw new IllegalArgumentException(
49: "You must supply a security-realm-name to every web module using security features");
50: }
51:
52: /**
53: * TODO maybe remove instead?
54: *
55: * @param realmName
56: * @return
57: * @deprecated
58: */
59: public UserRealm getRealm(String realmName) {
60: throw new IllegalArgumentException(
61: "You must supply a security-realm-name to every web module using security features");
62: }
63:
64: /**
65: * TODO maybe remove instead?
66: *
67: * @param realm
68: * @deprecated
69: */
70: public synchronized void removeRealm(UserRealm realm) {
71: throw new IllegalArgumentException(
72: "You must supply a security-realm-name to every web module using security features");
73: }
74:
75: }
|