1 package org.codehaus.plexus.classworlds.realm; 2 3 import org.codehaus.plexus.classworlds.ClassWorld; 4 import org.codehaus.plexus.classworlds.ClassWorldException; 5 6 /* 7 * Copyright 2001-2006 Codehaus Foundation. 8 * 9 * Licensed under the Apache License, Version 2.0 (the "License"); 10 * you may not use this file except in compliance with the License. 11 * You may obtain a copy of the License at 12 * 13 * http://www.apache.org/licenses/LICENSE-2.0 14 * 15 * Unless required by applicable law or agreed to in writing, software 16 * distributed under the License is distributed on an "AS IS" BASIS, 17 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 18 * See the License for the specific language governing permissions and 19 * limitations under the License. 20 */ 21 22 /** 23 * Indicates an attempt to retrieve a <code>ClassRealm</code> from a 24 * <code>ClassWorld</code> with an invalid id. 25 * 26 * @author <a href="mailto:bob@eng.werken.com">bob mcwhirter</a> 27 */ 28 public class NoSuchRealmException extends ClassWorldException { 29 // ------------------------------------------------------------ 30 // Instance members 31 // ------------------------------------------------------------ 32 33 /** 34 * The realm id. 35 */ 36 private String id; 37 38 // ------------------------------------------------------------ 39 // Constructors 40 // ------------------------------------------------------------ 41 42 /** 43 * Construct. 44 * 45 * @param world The world. 46 * @param id The realm id. 47 */ 48 public NoSuchRealmException(ClassWorld world, String id) { 49 super(world, id); 50 this.id = id; 51 } 52 53 // ------------------------------------------------------------ 54 // Instance methods 55 // ------------------------------------------------------------ 56 57 /** 58 * Retrieve the invalid realm id. 59 * 60 * @return The id. 61 */ 62 public String getId() { 63 return this.id; 64 } 65 }