blob: 31013548bfa31d0a0cc0c3e6dd0f53ec4ecb8fbc (
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
|
/*******************************************************************************
* Copyright (c) 2008 IBM Corporation 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: IBM Corporation - initial API and implementation
******************************************************************************/
package org.eclipse.equinox.internal.p2.metadata;
import org.eclipse.equinox.internal.provisional.p2.metadata.*;
public class InstallableUnitPatch extends InstallableUnit implements IInstallableUnitPatch {
private IRequirementChange[] changes;
private IRequiredCapability lifeCycle;
private IRequiredCapability[][] scope;
private void addRequiredCapability(IRequiredCapability[] toAdd) {
IRequiredCapability[] current = super.getRequiredCapabilities();
IRequiredCapability[] result = new IRequiredCapability[current.length + toAdd.length];
System.arraycopy(current, 0, result, 0, current.length);
System.arraycopy(toAdd, 0, result, current.length, toAdd.length);
setRequiredCapabilities(result);
}
public IRequiredCapability[][] getApplicabilityScope() {
return scope;
}
public IRequiredCapability getLifeCycle() {
return lifeCycle;
}
public IRequirementChange[] getRequirementsChange() {
return changes;
}
public void setApplicabilityScope(IRequiredCapability[][] applyTo) {
scope = applyTo;
}
public void setLifeCycle(IRequiredCapability lifeCycle) {
if (lifeCycle == null)
return;
this.lifeCycle = lifeCycle;
addRequiredCapability(new IRequiredCapability[] {lifeCycle});
}
public void setRequirementsChange(IRequirementChange[] changes) {
this.changes = changes;
}
}
|