1 /*******************************************************************************
2 * Copyright (c) 2007, 2009 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
9 * IBM Corporation - initial API and implementation
10 * Code 9 - ongoing development
11 *******************************************************************************/
12 package org.eclipse.equinox.internal.provisional.p2.installer;
15 import java.util.HashMap;
18 import org.eclipse.core.runtime.IPath;
19 import org.eclipse.equinox.p2.metadata.IVersionedId;
22 * An install information captures all the data needed to perform a product install.
23 * This includes information on where the installed product comes from, what will
24 * be installed, and where it will be installed.
26 public class InstallDescription {
27 private URI[] artifactRepos;
28 private IPath installLocation;
29 private IPath agentLocation;
30 private IPath bundleLocation;
31 private boolean isAutoStart;
32 private String launcherName;
33 private URI[] metadataRepos;
34 private String productName;
35 private IVersionedId[] roots;
36 private final Map<String, String> profileProperties = new HashMap<String, String>();
39 * Returns the p2 agent location, or <code>null</code> to indicate
40 * the default agent location.
42 public IPath getAgentLocation() {
47 * Returns the locations of the artifact repositories to install from
48 * @return a list of artifact repository URLs
50 public URI[] getArtifactRepositories() {
55 * Returns the bundle pool location, or <code>null</code> to
56 * indicate the default bundle pool location.
58 public IPath getBundleLocation() {
59 return bundleLocation;
63 * Returns the local file system location to install into.
64 * @return a local file system location
66 public IPath getInstallLocation() {
67 return installLocation;
71 * Returns the name of the product's launcher executable
72 * @return the name of the launcher executable
74 public String getLauncherName() {
79 * Returns the locations of the metadata repositories to install from
80 * @return a list of metadata repository URLs
82 public URI[] getMetadataRepositories() {
87 * Returns the profile properties for this install.
89 public Map<String, String> getProfileProperties() {
90 return profileProperties;
94 * Returns a human-readable name for this install.
95 * @return the name of the product
97 public String getProductName() {
102 * Returns whether the installed product should be started upon successful
104 * @return <code>true</code> if the product should be started upon successful
105 * install, and <code>false</code> otherwise
107 public boolean isAutoStart() {
111 public void setAgentLocation(IPath agentLocation) {
112 this.agentLocation = agentLocation;
115 public void setArtifactRepositories(URI[] value) {
116 this.artifactRepos = value;
119 public void setAutoStart(boolean value) {
120 this.isAutoStart = value;
123 public void setBundleLocation(IPath bundleLocation) {
124 this.bundleLocation = bundleLocation;
127 public void setInstallLocation(IPath location) {
128 this.installLocation = location;
131 public void setLauncherName(String name) {
132 this.launcherName = name;
135 public void setMetadataRepositories(URI[] value) {
136 this.metadataRepos = value;
140 * Supplies a set of profile properties to be added when the profile is created.
141 * @param properties the profile properties to be added
143 public void setProfileProperties(Map<String, String> properties) {
144 profileProperties.putAll(properties);
148 * Returns the set of roots to be installed for this installation
149 * @return the roots to install
151 public IVersionedId[] getRoots() {
156 * Set the list of roots to install
157 * @param value the set of roots to install
159 public void setRoots(IVersionedId[] value) {
164 * Set the name of the product being installed.
165 * @param value the new name of the product to install
167 public void setProductName(String value) {