KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > update > internal > core > FragmentEntry


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.internal.core;
12
13
14 /**
15  * This class is used to retrieve the fragments associated with a plugin.
16  */

17 public class FragmentEntry {
18     
19     private String JavaDoc pluginId;
20     private String JavaDoc pluginVersion;
21     private String JavaDoc name;
22     private String JavaDoc location;
23     
24     public FragmentEntry(String JavaDoc id, String JavaDoc version, String JavaDoc name, String JavaDoc location) {
25         this.pluginId = id;
26         this.pluginVersion = version;
27         this.name = name;
28         this.location = location;
29     }
30
31     /**
32      * @return the plugin translatable name
33      */

34     public String JavaDoc getName() {
35         return name;
36     }
37     
38     /**
39      * @return the location of the plugin
40      */

41     public String JavaDoc getLocation() {
42         return location;
43     }
44     
45     /**
46      * Returns the plug-in identifier for this entry.
47      *
48      * @return the plug-in identifier, or <code>null</code>
49      */

50     public String JavaDoc getPluginIdentifier() {
51         return pluginId;
52     }
53
54     /**
55      * Returns the plug-in version for this entry.
56      *
57      * @return the plug-in version, or <code>null</code>
58      */

59     public String JavaDoc getPluginVersion() {
60         return pluginVersion;
61     }
62
63     /**
64      * @see Object#toString()
65      */

66     public String JavaDoc toString() {
67         String JavaDoc msg = (getPluginIdentifier()!=null)?getPluginIdentifier().toString():""; //$NON-NLS-1$
68
msg += getPluginVersion()!=null?" "+getPluginVersion().toString():""; //$NON-NLS-1$ //$NON-NLS-2$
69
return msg;
70     }
71 }
72
Popular Tags