Main Page Cookbook/Overview ImageMeister the jcprops file Licensing Binary Installation & Configuration [ Win · Mac · Nix ] Changes Public API Source Code Main Page Java [ Common · Win · Mac · Nix ] Native Code [ Common · Win · Mac · Nix ] Manifest Native Code Overviews [ Common · Win · Mac · Nix · Strings ] Macros [ General · Native Macros ] Walkthroughs [ Java only · Java and native ] Building [ Win · Mac · Nix ] Distribution Issues

    All Packages  This Package  Class Hierarchy  Class Search  Index

Class com.jconfig.win.AppFileCommandMgrMSVM

    java.lang.Object
       |
       +----com.jconfig.win.AppFileCommandMgrMSVM

Summary

    class  AppFileCommandMgrMSVM
         extends java.lang.Object
    {
              // Fields 8
         private AppCommandWatcher acWatcher;
         private boolean bAlreadyRequestedFileTypes;
         private static final String copyrightString;
         private String filePath;
         private int numCommands;
         private AppFileMSVM owner;
         private AppCommand[] theCommands;
         private FileType[] theFileTypes;

              // Constructors 1
         AppFileCommandMgrMSVM(String, String, AppFileMSVM, AppCommandWatcher);

              // Methods 9
         private void createCommands(RegCommandMSVM[]);
         private AppCommand createDefaultCommand();
         private void createFileTypes(RegCommandMSVM[]);
         public void dumpInfo(PrintStream, String);
         AppCommand[] getAllCommands();
         private String[] getArgsFromCommand(AppCommand);
         AppCommand getCommand(String);
         FileType[] getFileTypes(int);
         AppProcess performCommand(AppCommand, int);
    }

Used by AppFileMSVM to manage its commands.

Author:
  Copyright (c) 1997,1998,1999,2000 Samizdat Productions. All Rights Reserved.

Fields

### · copyrightString | Summary | Top

       private static final String copyrightString

### · filePath | Summary | Top

       private String filePath

### · theCommands | Summary | Top

       private AppCommand[] theCommands

### · theFileTypes | Summary | Top

       private FileType[] theFileTypes

### · numCommands | Summary | Top

       private int numCommands

### · bAlreadyRequestedFileTypes | Summary | Top

       private boolean bAlreadyRequestedFileTypes

### · acWatcher | Summary | Top

       private AppCommandWatcher acWatcher

### · owner | Summary | Top

       private AppFileMSVM owner

Constructors

### · AppFileCommandMgrMSVM | Summary | Top

       AppFileCommandMgrMSVM(String path,
                             String name,
                             AppFileMSVM af,
                             AppCommandWatcher watch)

> CommandLineUtilsMSVM.findVerbs() is called to search through the Registry for shell commands ("\\shell\\commands\\open", etc.) which contain the path of this application. These commands are used to initialize the array of commands, as well as the array of file types.

> Parameter | Description
> path | the path of the app
> name | the name of the app
> af | the AppFileMSVM which owns this object
> watch | the object to which notifications will be sent

Methods

### · createDefaultCommand | Summary | Top

       private AppCommand createDefaultCommand()

> If no commands could be found in the Registry, this creates a generic 'open' command.

### · createCommands | Summary | Top

       private void createCommands(RegCommandMSVM[] vat)

> 'vat' contains an array of verbs ("open",etc.) retrieved from the Registry, together with the command lines of those verbs.

### · createFileTypes | Summary | Top

       private void createFileTypes(RegCommandMSVM[] vat)

> Look through the array of RegCommandMSVM objects, and determine each file extension. For instance, this application might be listed in the Registry as being able to open '.txt', '.doc', and '.readme' files.

### · getFileTypes | Summary | Top

       FileType[] getFileTypes(int maxToReturn)

> Return an array of this object's FileTypes.

### · performCommand | Summary | Top

       AppProcess performCommand(AppCommand command,
                                 int flags)

> Retrieves the arguments from the AppCommand, and calls AppUtilsMSVM.launchApp to launch the app with those arguments. If the app was launched OK, an AppProcessMSVM object representing the process is returned.

### · getCommand | Summary | Top

       AppCommand getCommand(String commandName)

> Searches the list of command for one with the given name, and returns it. If one couldn't be found, returns null.

### · getAllCommands | Summary | Top

       AppCommand[] getAllCommands()

> Return an array of all the commands.

### · getArgsFromCommand | Summary | Top

       private String[] getArgsFromCommand(AppCommand command)

> Returns a String array containing the 'command' object's commands, or null if it has no commands.

### · dumpInfo | Summary | Top

       public void dumpInfo(PrintStream ps,
                            String indent)

    All Packages  This Package  Class Hierarchy  Class Search  Index

Freshly brewed Java API Documentation automatically generated with polardoc Version 1.0.7