]> gerrit.simantics Code Review - simantics/platform.git/blob - bundles/org.simantics.project/src/org/eclipse/equinox/internal/provisional/p2/installer/InstallDescription.java
Fixed all line endings of the repository
[simantics/platform.git] / bundles / org.simantics.project / src / org / eclipse / equinox / internal / provisional / p2 / installer / InstallDescription.java
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
7  * 
8  *  Contributors:
9  *     IBM Corporation - initial API and implementation
10  *     Code 9 - ongoing development
11  *******************************************************************************/
12 package org.eclipse.equinox.internal.provisional.p2.installer;
13
14 import java.net.URI;
15 import java.util.HashMap;
16 import java.util.Map;
17
18 import org.eclipse.core.runtime.IPath;
19 import org.eclipse.equinox.p2.metadata.IVersionedId;
20
21 /**
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.
25  */
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>();
37
38         /**
39          * Returns the p2 agent location, or <code>null</code> to indicate
40          * the default agent location.
41          */
42         public IPath getAgentLocation() {
43                 return agentLocation;
44         }
45
46         /**
47          * Returns the locations of the artifact repositories to install from
48          * @return a list of artifact repository URLs
49          */
50         public URI[] getArtifactRepositories() {
51                 return artifactRepos;
52         }
53
54         /**
55          * Returns the bundle pool location, or <code>null</code> to
56          * indicate the default bundle pool location.
57          */
58         public IPath getBundleLocation() {
59                 return bundleLocation;
60         }
61
62         /**
63          * Returns the local file system location to install into.
64          * @return a local file system location
65          */
66         public IPath getInstallLocation() {
67                 return installLocation;
68         }
69
70         /**
71          * Returns the name of the product's launcher executable
72          * @return the name of the launcher executable
73          */
74         public String getLauncherName() {
75                 return launcherName;
76         }
77
78         /**
79          * Returns the locations of the metadata repositories to install from
80          * @return a list of metadata repository URLs
81          */
82         public URI[] getMetadataRepositories() {
83                 return metadataRepos;
84         }
85
86         /**
87          * Returns the profile properties for this install.
88          */
89         public Map<String, String> getProfileProperties() {
90                 return profileProperties;
91         }
92
93         /**
94          * Returns a human-readable name for this install.
95          * @return the name of the product
96          */
97         public String getProductName() {
98                 return productName;
99         }
100
101         /**
102          * Returns whether the installed product should be started upon successful
103          * install.
104          * @return <code>true</code> if the product should be started upon successful
105          * install, and <code>false</code> otherwise
106          */
107         public boolean isAutoStart() {
108                 return isAutoStart;
109         }
110
111         public void setAgentLocation(IPath agentLocation) {
112                 this.agentLocation = agentLocation;
113         }
114
115         public void setArtifactRepositories(URI[] value) {
116                 this.artifactRepos = value;
117         }
118
119         public void setAutoStart(boolean value) {
120                 this.isAutoStart = value;
121         }
122
123         public void setBundleLocation(IPath bundleLocation) {
124                 this.bundleLocation = bundleLocation;
125         }
126
127         public void setInstallLocation(IPath location) {
128                 this.installLocation = location;
129         }
130
131         public void setLauncherName(String name) {
132                 this.launcherName = name;
133         }
134
135         public void setMetadataRepositories(URI[] value) {
136                 this.metadataRepos = value;
137         }
138
139         /**
140          * Supplies a set of profile properties to be added when the profile is created.
141          * @param properties the profile properties to be added
142          */
143         public void setProfileProperties(Map<String, String> properties) {
144                 profileProperties.putAll(properties);
145         }
146
147         /**
148          * Returns the set of roots to be installed for this installation
149          * @return the roots to install
150          */
151         public IVersionedId[] getRoots() {
152                 return roots;
153         }
154
155         /**
156          * Set the list of roots to install
157          * @param value the set of roots to install
158          */
159         public void setRoots(IVersionedId[] value) {
160                 roots = value;
161         }
162
163         /**
164          * Set the name of the product being installed.
165          * @param value the new name of the product to install
166          */
167         public void setProductName(String value) {
168                 productName = value;
169         }
170
171 }