KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > pde > internal > core > text > bundle > FragmentHostHeader


1 /*******************************************************************************
2  * Copyright (c) 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.pde.internal.core.text.bundle;
12
13 import org.eclipse.osgi.service.resolver.VersionRange;
14 import org.eclipse.pde.internal.core.ibundle.IBundle;
15 import org.osgi.framework.Constants;
16
17 public class FragmentHostHeader extends SingleManifestHeader {
18
19     private static final long serialVersionUID = 1L;
20
21     public FragmentHostHeader(String JavaDoc name, String JavaDoc value, IBundle bundle, String JavaDoc lineDelimiter) {
22         super(name, value, bundle, lineDelimiter);
23     }
24     
25     public void setHostId(String JavaDoc id) {
26         setMainComponent(id);
27     }
28     
29     public String JavaDoc getHostId() {
30         return getMainComponent();
31     }
32     
33     public void setHostRange(String JavaDoc range) {
34         setAttribute(Constants.BUNDLE_VERSION_ATTRIBUTE, range);
35     }
36     
37     public VersionRange getHostRange() {
38         return new VersionRange(getAttribute(Constants.BUNDLE_VERSION_ATTRIBUTE));
39     }
40
41 }
42
Popular Tags