Skip to main content
summaryrefslogtreecommitdiffstats
blob: 87f7fd0a9bcfe96530e87ad8889f0b9f23d3df22 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
/*******************************************************************************
 * Copyright (c) 2008, 2014 Code 9 and others. All rights reserved. This
 * program and the accompanying materials are made available under the terms of
 * the Eclipse Public License v1.0 which accompanies this distribution, and is
 * available at http://www.eclipse.org/legal/epl-v10.html
 * 
 * Contributors: 
 *   Code 9 - initial API and implementation
 *   EclipseSource - ongoing development
 *   SAP AG - ongoing development
 *   Rapicorp - additional features
 ******************************************************************************/
package org.eclipse.equinox.internal.p2.publisher.eclipse;

import java.io.File;
import java.util.List;
import java.util.Map;
import org.eclipse.equinox.frameworkadmin.BundleInfo;
import org.eclipse.equinox.p2.metadata.IVersionedId;
import org.eclipse.equinox.p2.repository.IRepositoryReference;

/**
 * Represents a product file.  
 * 
 * If getLocation returns null, then config.ini and p2 advice files cannot
 * be used (since these are both relative to the product location).
 *
 */
public interface IProductDescriptor {

	/**
	 * Flag for {@link #getFeatures(int)} to obtain the features included in the product.
	 */
	int INCLUDED_FEATURES = 0x1;
	/**
	 * Flag for {@link #getFeatures(int)} to obtain the features to be installed as separately updatable roots. 
	 */
	int ROOT_FEATURES = 0x2;

	/**
	 * Gets the name of the launcher.
	 */
	public String getLauncherName();

	/**
	 * Returns the bundles listed in this product. Note: These bundles are only part of 
	 * the product if {@link #useFeatures()} returns <code>false</code>.
	 * @param includeFragments whether or not to include the fragments in the return value
	 * @return the list of bundles in this product.
	 */
	public List<IVersionedId> getBundles(boolean includeFragments);

	/**
	 * Returns the fragments listed in the product.
	 * @see #useFeatures()
	 */
	public List<IVersionedId> getFragments();

	/**
	 * Returns the features listed in the product. Same as <code>getFeatures(INCLUDED_FEATURES)</code>. Note: These features are only part of 
	 * the product if {@link #useFeatures()} returns <code>true</code>.
	 */
	public List<IVersionedId> getFeatures();

	/**
	 * Returns the features listed in the product. Note: These features are only part of 
	 * the product if {@link #useFeatures()} returns <code>true</code>.
	 * @param options bitmask to indicate what kind of features to return.
	 * @see #INCLUDED_FEATURES 
	 * @see #ROOT_FEATURES 
	 */
	public List<IVersionedId> getFeatures(int options);

	/**
	 * Returns the path to the config.ini file as specified in the .product file.
	 */
	public String getConfigIniPath(String os);

	/**
	 * Returns the ID for this product.
	 */
	public String getId();

	/**
	 * Returns the Product extension point ID
	 */
	public String getProductId();

	/**
	 * Returns the Applicaiton extension point ID
	 */
	public String getApplication();

	/**
	 * Returns the ID of the bundle in which the splash screen resides.
	 */
	public String getSplashLocation();

	/**
	 * Returns the name of the product
	 */
	public String getProductName();

	/**
	 * Specifies whether this product was built using features only or not.
	 */
	public boolean useFeatures();

	/**
	 * Specifies what kind of installable units (e.g. bundles, features or everything) are included in the product.
	 */
	public ProductContentType getProductContentType();

	/**
	 * Returns the version of the product.
	 */
	public String getVersion();

	/**
	 * Returns the VM arguments for this product for a given OS.
	 */
	public String getVMArguments(String os);

	/**
	 * Returns the VM arguments for this product for a given OS and architecture 
	 * combination.
	 */
	public String getVMArguments(String os, String arch);

	/**
	 * Returns the program arguments for this product for a given OS.
	 */
	public String getProgramArguments(String os);

	/**
	 * Returns the program arguments for this product for a given OS and 
	 * architecture combination.
	 */
	public String getProgramArguments(String os, String arch);

	/**
	 * Returns the properties for a product file.
	 */
	public Map<String, String> getConfigurationProperties();

	/**
	 * Returns the properties for this product file for a given OS and
	 * architecture combination. If the os and/or arch are not specified,
	 * then only those properties defined without os and/or arch filtering
	 * will be returned.
	 */
	public Map<String, String> getConfigurationProperties(String os, String arch);

	/**
	 * Returns a list of icons for this product for a given OS.
	 */
	public String[] getIcons(String os);

	/**
	 * Returns a List<BundleInfo> for each bundle that has custom configuration data.
	 * @return A List<BundleInfo>
	 */
	public List<BundleInfo> getBundleInfos();

	/**
	 * This is needed for config.ini files and p2 advice
	 */
	public File getLocation();

	/**
	 * Determines if the launchers should be included in the published product
	 */
	public boolean includeLaunchers();

	/**
	 * Returns the license URL for this product
	 */
	public String getLicenseURL();

	/**
	 * Returns the license text for this product
	 */
	public String getLicenseText();

	/**
	 * Returns a List<IRepositoryReference> for each update repository used by the product.
	 * @return A List<IRepositoryReference>
	 */
	public List<IRepositoryReference> getRepositoryEntries();

}

Back to the top