KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > update > core > IVerificationListener


1 /*******************************************************************************
2  * Copyright (c) 2000, 2005 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;
12  
13 /**
14  * Verification listener. This interface abstract the user interaction
15  * that may be required as a result of feature installation. In particular,
16  * as feature archives are downloaded and verified, the user may need to
17  * indicate whether to accept any one of the archives, or abort the
18  * installation.
19  * <p>
20  * Clients may implement this interface.
21  * </p>
22  * <p>
23  * <b>Note:</b> This class/interface is part of an interim API that is still under development and expected to
24  * change significantly before reaching stability. It is being made available at this early stage to solicit feedback
25  * from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken
26  * (repeatedly) as the API evolves.
27  * </p>
28  * @see org.eclipse.update.core.IVerificationResult
29  * @see org.eclipse.update.core.IVerifier
30  * @since 2.0
31  */

32
33 public interface IVerificationListener {
34     
35     /**
36      * Indicate the action that resulted in this notification should be aborted.
37      *
38      * @since 2.0
39      */

40     public static final int CHOICE_ABORT = 0;
41     
42     /**
43      * Indicate there was an error in processing the request.
44      * The action that resulted in this notification should be aborted.
45      *
46      * @since 2.0
47      */

48     public static final int CHOICE_ERROR = 1;
49     
50     /**
51      * Indicate that the target of the verification should be accepted,
52      * but the information supplied with the verification result
53      * should be trusted only for this request.
54      *
55      * @since 2.0
56      */

57     public static final int CHOICE_INSTALL_TRUST_ONCE = 2;
58     
59     /**
60      * Indicate that the target of the verification should be accepted,
61      * and the information supplied with the verification result
62      * should be trusted for this request, and subsequent requests.
63      *
64      * @since 2.0
65      */

66     public static final int CHOICE_INSTALL_TRUST_ALWAYS = 3;
67     
68     /**
69      * Determine if we should continue with the current action
70      * based on the indicated verification results. Typically,
71      * the implementation of this method will prompt the user
72      * for the appropriate answer. However, other respose
73      * implementations can be provided.
74      *
75      * @param result verification result
76      * @since 2.0
77      */

78     public int prompt(IVerificationResult result);
79 }
80
Popular Tags