001    /**
002     *  Licensed to the Apache Software Foundation (ASF) under one or more
003     *  contributor license agreements.  See the NOTICE file distributed with
004     *  this work for additional information regarding copyright ownership.
005     *  The ASF licenses this file to You under the Apache License, Version 2.0
006     *  (the "License"); you may not use this file except in compliance with
007     *  the License.  You may obtain a copy of the License at
008     *
009     *     http://www.apache.org/licenses/LICENSE-2.0
010     *
011     *  Unless required by applicable law or agreed to in writing, software
012     *  distributed under the License is distributed on an "AS IS" BASIS,
013     *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
014     *  See the License for the specific language governing permissions and
015     *  limitations under the License.
016     */
017    package org.apache.geronimo.jetty6;
018    
019    import org.mortbay.jetty.Server;
020    import org.mortbay.jetty.security.UserRealm;
021    
022    
023    /**
024     * JettyServer extends the base Jetty Server class to prevent managing any user realm information by the web.xml realm name
025     * which is only relevant for basic and digest authentication and should not be tied to any
026     * actual information about which security realm is in use.
027     *
028     * @version $Rev: 706640 $ $Date: 2008-10-21 14:44:05 +0000 (Tue, 21 Oct 2008) $
029     */
030    public class JettyServer extends Server {
031    
032        public void addUserRealms(UserRealm[] realms) {
033            throw new IllegalArgumentException("You must supply a security-realm-name to every web module using security features");
034        }
035    
036        public void addUserRealm(UserRealm realm) {
037            throw new IllegalArgumentException("You must supply a security-realm-name to every web module using security features");
038        }
039    
040        /**
041         * TODO maybe remove intead?
042         *
043         * @param realm
044         * @return
045         * @deprecated
046         */
047        public UserRealm addRealm(UserRealm realm) {
048            throw new IllegalArgumentException("You must supply a security-realm-name to every web module using security features");
049        }
050    
051        /**
052         * TODO maybe remove instead?
053         *
054         * @param realmName
055         * @return
056         * @deprecated
057         */
058        public UserRealm getRealm(String realmName) {
059            throw new IllegalArgumentException("You must supply a security-realm-name to every web module using security features");
060        }
061    
062        /**
063         * TODO maybe remove instead?
064         *
065         * @param realm
066         * @deprecated
067         */
068        public synchronized void removeRealm(UserRealm realm) {
069            throw new IllegalArgumentException("You must supply a security-realm-name to every web module using security features");
070        }
071    
072    }