01: /*******************************************************************************
02: * Copyright (c) 2000, 2006 IBM Corporation and others.
03: * All rights reserved. This program and the accompanying materials
04: * are made available under the terms of the Eclipse Public License v1.0
05: * which accompanies this distribution, and is available at
06: * http://www.eclipse.org/legal/epl-v10.html
07: *
08: * Contributors:
09: * IBM Corporation - initial API and implementation
10: *******************************************************************************/package org.eclipse.pde.core.plugin;
11:
12: /**
13: * This interface contains constants used throughout the plug-in
14: * for plug-in reference matching. These rules are used to
15: * control when determining if two compared versions are
16: * equivalent.
17: */
18: public interface IMatchRules {
19: /**
20: * No rule.
21: */
22: int NONE = 0;
23:
24: /**
25: * A match that is equivalent to the required version.
26: */
27: int EQUIVALENT = 1;
28:
29: /**
30: * Attribute value for the 'equivalent' rule.
31: */
32: String RULE_EQUIVALENT = "equivalent"; //$NON-NLS-1$
33: /**
34: * A match that is compatible with the required version.
35: */
36: int COMPATIBLE = 2;
37: /**
38: * Attribute value for the 'compatible' rule.
39: */
40: String RULE_COMPATIBLE = "compatible"; //$NON-NLS-1$
41: /**
42: * An perfect match.
43: */
44: int PERFECT = 3;
45:
46: /**
47: * Attribute value for the 'perfect' rule.
48: */
49: String RULE_PERFECT = "perfect"; //$NON-NLS-1$
50: /**
51: * A match requires that a version is greater or equal to the
52: * specified version.
53: */
54: int GREATER_OR_EQUAL = 4;
55: /**
56: * Attribute value for the 'greater or equal' rule
57: */
58: String RULE_GREATER_OR_EQUAL = "greaterOrEqual"; //$NON-NLS-1$
59: /**
60: * An id match requires that the specified id is a prefix of
61: * a candidate id.
62: */
63: int PREFIX = 5;
64: /**
65: * Attribute value for the 'prefix' id rule
66: */
67: String RULE_PREFIX = "prefix"; //$NON-NLS-1$
68: /**
69: * Table of rule names that match rule values defined in this
70: * interface. It can be used directly against the rule values
71: * used in plug-in models.
72: */
73: String[] RULE_NAME_TABLE = {
74: "", RULE_EQUIVALENT, RULE_COMPATIBLE, RULE_PERFECT, RULE_GREATER_OR_EQUAL }; //$NON-NLS-1$
75: }
|