KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > pde > internal > build > jarprocessor > UnsignCommand


1 /*******************************************************************************
2  * Copyright (c) 2007 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 - Initial API and implementation
10  *******************************************************************************/

11 package org.eclipse.pde.internal.build.jarprocessor;
12
13 import java.io.File JavaDoc;
14 import java.util.List JavaDoc;
15 import java.util.Properties JavaDoc;
16 import org.eclipse.update.internal.jarprocessor.SignCommandStep;
17
18 public class UnsignCommand extends SignCommandStep {
19
20     public UnsignCommand(Properties JavaDoc options, String JavaDoc command, boolean verbose) {
21         super(options, command, verbose);
22     }
23
24     public File JavaDoc postProcess(File JavaDoc input, File JavaDoc workingDirectory, List JavaDoc containers) {
25         if (command != null && input != null && shouldSign(input, containers)) {
26             execute(input);
27         }
28         return null;
29     }
30
31     private void execute(File JavaDoc input) {
32         Unsigner jarUnsigner = new Unsigner();
33         jarUnsigner.setJar(input);
34         jarUnsigner.setKeepManifestEntries(false);
35         jarUnsigner.execute();
36     }
37 }
38
Popular Tags