oracle.ide.scm.op
Class SCMSingleFileOperation
java.lang.Object
|
+--oracle.ide.scm.op.SCMFileOperation
|
+--oracle.ide.scm.op.SCMSingleFileOperation
- All Implemented Interfaces:
- SCMOperation
- public abstract class SCMSingleFileOperation
- extends SCMFileOperation
Client adapter for single-file operations. This class provides some
implementation over SCMFileOperation
that will commonly be useful
to inherit.
Method Summary |
void |
execute()
Single file operation's implementation of execute (null selection). |
void |
execute(java.util.Iterator selection,
SCMOptions options)
Single file operation's implementation of execute. |
abstract void |
execute(SCMFile file,
SCMOptions options)
Single file execute. |
SCMDialogSpecification |
getDialogSpecification()
Single file operation's implementation of the dialog specification
retrieval method. |
int |
getMaxSelection()
Single file operation's implementation of the max selection size query
method, which returns 1 to befit this class's purpose. |
boolean |
isSelectionRecursive()
Single file operation's implementation of the recursive selection query
method. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SCMSingleFileOperation
public SCMSingleFileOperation()
isSelectionRecursive
public final boolean isSelectionRecursive()
- Single file operation's implementation of the recursive selection query
method. Returns false since we only require base selected elements.
- Overrides:
isSelectionRecursive
in class SCMFileOperation
- Returns:
- false.
getMaxSelection
public final int getMaxSelection()
- Single file operation's implementation of the max selection size query
method, which returns 1 to befit this class's purpose.
- Overrides:
getMaxSelection
in class SCMFileOperation
- Returns:
- 1.
getDialogSpecification
public SCMDialogSpecification getDialogSpecification()
- Single file operation's implementation of the dialog specification
retrieval method. Returns null, since a single selection does not merit
a dialog.
- Overrides:
getDialogSpecification
in class SCMFileOperation
- Returns:
- null.
execute
public final void execute(java.util.Iterator selection,
SCMOptions options)
throws SCMException
- Single file operation's implementation of execute. Because single file
operations deal with only one file, this implementation simplifies
the method call for subclasses. Subclasses should implement the
execute(SCMFile f, SCMOptions options) method, and cannot override this
method, as it is final.
- Overrides:
execute
in class SCMFileOperation
- Parameters:
selection
- an iterator over the filtered file selection, which may be
null if this is a no-file operation.- Throws:
SCMException
- if a client error is raised to abort execution.
execute
public abstract void execute(SCMFile file,
SCMOptions options)
throws SCMException
- Single file execute. This is the method subclasses should implement
to carry out the operation on a single file
- Parameters:
file
- The file to perform the operation on. This is guaranteed not
to be null.options
- Options for the operation. This may be null if no options have
been provided for this operation- Throws:
SCMException
- if a client error is raised to abort execution
execute
public final void execute()
throws SCMException
- Single file operation's implementation of execute (null selection).
This is unlikely to be called on a single file operation since its
control will be disabled when the selection is invalid.
- Overrides:
execute
in class SCMFileOperation
- Throws:
SCMException
- never, since it will not be required.