KickJava   Java API By Example, From Geeks To Geeks.

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


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 import org.eclipse.core.runtime.*;
14
15 /**
16  * Verifier. This interface abstracts the archive verification step
17  * performed by specific feature implementations. The actual details
18  * of the verification are the responsibility of the concrete implementation.
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.IFeatureContentProvider#getVerifier()
30  * @since 2.0
31  */

32 public interface IVerifier {
33
34     /**
35      * Perform verification of the specified archive.
36      *
37      * @param feature feature containing this archive
38      * @param reference actual archive reference
39      * @param isFeatureVerification <code>true</code> indicates the specified
40      * reference should be considered as part of the feature description
41      * information (ie. verifying the overall feature),
42      * <code>false</code> indicates the specified reference is a plug-in
43      * or a non-plug-in archive file (ie. verifying a component of the
44      * feature)
45      * @param monitor progress monitor, can be <code>null</code>
46      * @return verification result
47      * @exception CoreException
48      * @since 2.0
49      */

50     public IVerificationResult verify(
51         IFeature feature,
52         ContentReference reference,
53         boolean isFeatureVerification,
54         InstallMonitor monitor)
55         throws CoreException;
56         
57     /**
58      * Sets the parent verifier.
59      *
60      * The parent verifier can only be set once by the parent feature.
61      * It may used for different verification strategies.
62      * (for instance, you may decide that both the parent and current verifier
63      * must sucessfully verify the content reference, or that only one of them must verify)
64      * @param parentVerifier the parent verifier.
65      */

66     public void setParent(IVerifier parentVerifier);
67     
68     /**
69      * Returns the parent verifier
70      *
71      * @return the parent verifier
72      * @since 2.0
73      */

74     public IVerifier getParent();
75 }
76
Popular Tags