home *** CD-ROM | disk | FTP | other *** search
Java Source | 1998-10-16 | 1.6 KB | 74 lines |
- package com.symantec.itools.tools.archive;
-
-
- import java.io.File;
- import java.io.IOException;
- import com.symantec.itools.io.FileSystem;
- import com.symantec.itools.lang.Debug;
- import com.symantec.itools.lang.ProcessManager;
-
-
- /**
- * @author Symantec Internet Tools Division
- * @version 1.0
- * @since VCafe 3.0
- */
-
- public class NetscapeSigning
- extends TypeSigning
- {
-
- /**
- * @since VCafe 3.0
- */
- protected ProcessManager processManager;
-
- public NetscapeSigning(Options options)
- {
- super(options);
- }
-
- /**
- * @param errorMsg TODO
- * @since VCafe 3.0
- */
-
- public boolean sign(StringBuffer errorMsg)
- {
- StringBuffer command;
-
- command = new StringBuffer();
- // command = new StringBuffer(FileSystem.quoteIfNeeded(FileSystem.getCanonicalPath(options.getNetscapeTools(), true) + "signtool.exe"));
- command.append(FileSystem.quoteIfNeeded(options.getOutputLocation()));
-
- try
- {
- processManager = new ProcessManager();
-
- if(processManager.monitorLaunchedProcess(Runtime.getRuntime().exec(command.toString())) != 0)
- {
- return (false);
- }
- }
- catch(IOException ex)
- {
- Debug.logException(ex);
- return (false);
- }
-
- return (true);
- }
-
- /**
- * @since VCafe 3.0
- */
-
- public void cancel()
- {
- if(processManager != null)
- {
- processManager.destroyProcess();
- processManager = null;
- }
- }
- }