JDeveloper SCM API

oracle.ide.scm.util
Class SCMFileSelectionCommand

java.lang.Object
  |
  +--oracle.ide.scm.util.SCMFileSelectionCommand

public abstract class SCMFileSelectionCommand
extends java.lang.Object

Abstract superclass for a multi-file command runnable.

This class encourages the 'rolling together' of commands on files to reduce process creation. It also ensures that commands are run on a per-folder basis, and that (by splitting execution on lists of filenames) the command string passed to Runtime.exec() does not exceed the command-line buffer limit on NT.


Constructor Summary
SCMFileSelectionCommand(java.util.Iterator files)
          Constructs a file selection command for the given files.
SCMFileSelectionCommand(java.util.Iterator files, java.util.List baseCommand)
          Constructs a file selection command for the given files and base command.
SCMFileSelectionCommand(SCMFileSelection selection, java.util.List baseCommand)
          Constructs a file selection command for the given files and base command.
 
Method Summary
 void runCommand()
          Executes the file selection command.
protected abstract  void runCommand(SCMFile parent, java.util.List filenames)
          Runs the command on the given filenames.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SCMFileSelectionCommand

public SCMFileSelectionCommand(java.util.Iterator files)
Constructs a file selection command for the given files.

Parameters:
files - the file selection iterator.

SCMFileSelectionCommand

public SCMFileSelectionCommand(java.util.Iterator files,
                               java.util.List baseCommand)
Constructs a file selection command for the given files and base command.

Parameters:
files - the file selection iterator.
baseCommand - items of the base command used in the command string.

SCMFileSelectionCommand

public SCMFileSelectionCommand(SCMFileSelection selection,
                               java.util.List baseCommand)
Constructs a file selection command for the given files and base command.

Parameters:
selection - the file selection instance.
baseCommand - items of the base command used in the command string.
Method Detail

runCommand

public final void runCommand()
                      throws SCMException
Executes the file selection command.

Throws:
SCMException - if the command fails.

runCommand

protected abstract void runCommand(SCMFile parent,
                                   java.util.List filenames)
                            throws SCMException
Runs the command on the given filenames.

Parameters:
parent - the parent folder for all filenames.
filenames - the list of filenames for the command.
SCMException

Copyright © 2002 Oracle Corporation

 

Copyright ©1997, 2003, Oracle. All rights reserved.