blob: 097103e3dfab7cde15f75c645aa6e87d97975156 (
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
|
/*******************************************************************************
* Copyright (c) 2007 Innoopract Informationssysteme GmbH
* 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:
* Innoopract - initial API and implementation
*******************************************************************************/
package org.eclipse.epp.packaging.core;
import java.io.File;
import java.net.MalformedURLException;
import java.net.URL;
import java.util.ArrayList;
import java.util.List;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.epp.packaging.core.configuration.IPackagerConfiguration;
import org.eclipse.epp.packaging.core.configuration.IPlatform;
import org.eclipse.update.core.VersionedIdentifier;
/** Test class */
public class DummyPackagerConfiguration implements IPackagerConfiguration {
private static final String PACKAGER_CONFIGURATION_DIRECTORY
= "packagerConfiguration"; //$NON-NLS-1$
private URL siteUrl;
private IPlatform[] platforms;
private File baseDir;
private List<VersionedIdentifier> identifiers = new ArrayList<VersionedIdentifier>();
public File getExtensionSite() {
throw new UnsupportedOperationException( "Not yet implemented." ); //$NON-NLS-1$
}
public File getTargetFolder() {
return baseDir;
}
public void addRequiredFeature( final VersionedIdentifier identifier ) {
identifiers.add( identifier );
}
public VersionedIdentifier[] getRequiredFeatures() {
return identifiers.toArray( new VersionedIdentifier[ identifiers.size() ] );
}
public IPlatform[] getTargetPlatforms() {
return platforms;
}
public String getRootFileBaseName() {
return "Rootfile"; //$NON-NLS-1$
}
public URL[] getUpdateSites() {
return new URL[]{
siteUrl
};
}
public void setUpdateSite( final String site ) throws MalformedURLException {
this.siteUrl = new URL( site );
}
public void setTargetPlatforms( final IPlatform[] platformArray ) {
this.platforms = platformArray;
}
public void setBaseFolder( final String baseFolder ) {
this.baseDir = new File( baseFolder );
}
public File getPackagerConfigurationFolder() {
File result = new File( this.baseDir, PACKAGER_CONFIGURATION_DIRECTORY );
result.mkdir();
return result;
}
public File getRootFileFolder() {
throw new UnsupportedOperationException( "Not yet implemented." ); //$NON-NLS-1$
}
public String getProductName() {
throw new UnsupportedOperationException( "Not yet implemented." ); //$NON-NLS-1$
}
public String getEclipseProductId() {
throw new UnsupportedOperationException( "Not yet implemented." ); //$NON-NLS-1$
}
public String getInitialPerspectiveId() {
throw new UnsupportedOperationException( "Not yet implemented." ); //$NON-NLS-1$
}
public IStatus checkFeatures( IProgressMonitor monitor ) throws CoreException
{
throw new UnsupportedOperationException( "Not yet implemented." ); //$NON-NLS-1$
}
}
|