KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > update > core > model > InvalidSiteTypeException


1 /*******************************************************************************
2  * Copyright (c) 2000, 2006 IBM Corporation and others.
3  * All rights reserved. This program and the accompanying materials
4  * are made available under the terms of the Eclipse Public License v1.0
5  * which accompanies this distribution, and is available at
6  * http://www.eclipse.org/legal/epl-v10.html
7  *
8  * Contributors:
9  * IBM Corporation - initial API and implementation
10  *******************************************************************************/

11 package org.eclipse.update.core.model;
12
13 /**
14  * Exception thrown when the type of the site discovered in the site manifest
15  * does not correspond to the type expected by the concrete site factory.
16  *
17  * <p>
18  * <b>Note:</b> This class/interface is part of an interim API that is still under development and expected to
19  * change significantly before reaching stability. It is being made available at this early stage to solicit feedback
20  * from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken
21  * (repeatedly) as the API evolves.
22  * </p>
23  * @see org.eclipse.update.core.model.SiteModelFactory#canParseSiteType(String)
24  * @since 2.0
25  */

26
27 public class InvalidSiteTypeException extends Exception JavaDoc {
28
29     private static final long serialVersionUID = 1L;
30     private String JavaDoc newSiteType;
31
32     /**
33      * Construct the exception indicating the detected site type
34      *
35      * @since 2.0
36      */

37     public InvalidSiteTypeException(String JavaDoc newType) {
38         super();
39         newSiteType = newType;
40     }
41
42     /**
43      * Returns the site type detected in the parsed site manifest
44      *
45      * @return site type
46      * @since 2.0
47      */

48     public String JavaDoc getNewType() {
49         return newSiteType;
50     }
51 }
52
Popular Tags