Extension SDK

oracle.ide.cmd
Class SaveAsCommand

java.lang.Object
  extended byoracle.ide.addin.AbstractCommand
      extended byoracle.ide.cmd.SaveAsCommand
All Implemented Interfaces:
Command
Direct Known Subclasses:
EditorSaveAsCommand, RenameCommand

public class SaveAsCommand
extends AbstractCommand

The SaveAsCommand class implements the SaveAs command.


Field Summary
protected  Context _context
           
protected  Node _duplicate
           
protected  Folder _elementOwner
           
protected  java.net.URL _newURL
           
protected  java.lang.Class _nodeClass
           
protected static int CANCELED
           
protected static int OK_NAME_CHANGED
           
protected static int OK_NAME_UNCHANGED
           
 
Fields inherited from class oracle.ide.addin.AbstractCommand
cmdId, context, name, type
 
Fields inherited from interface oracle.ide.addin.Command
CANCEL, EXECUTING, NO_CHANGE, NO_UNDO, NORMAL, OK
 
Constructor Summary
  SaveAsCommand()
           
protected SaveAsCommand(int cmdId)
           
 
Method Summary
protected  int convertToDupNode(Document doc)
           
protected  int convertToNewNode(Document doc)
          Rename with node conversion.
 int doit()
          Executes the actions associated with a specific command.
protected  int doSaveAs(java.lang.String dialogTitle)
           
protected  Folder getElementOwner(Element element, Context context, boolean parentOK)
           
protected  int saveAsDupNode(Document doc)
          There is already a node in the cache with the new url.
protected  int saveAsNewNode(Document doc)
          The specified doc is being renamed.
protected  int saveDocument(Document doc)
           
protected  boolean saveFileDlgOK(Context context, Document doc, java.lang.String dialogTitle)
           
protected  java.net.URL validateNewURL(Recognizer recognizer, java.net.URL newURL, java.net.URL oldURL)
           
 
Methods inherited from class oracle.ide.addin.AbstractCommand
getAffectedDocuments, getContext, getData, getId, getName, getType, setContext, setData, undo
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

OK_NAME_CHANGED

protected static final int OK_NAME_CHANGED
See Also:
Constant Field Values

OK_NAME_UNCHANGED

protected static final int OK_NAME_UNCHANGED
See Also:
Constant Field Values

CANCELED

protected static final int CANCELED
See Also:
Constant Field Values

_context

protected Context _context

_nodeClass

protected java.lang.Class _nodeClass

_elementOwner

protected Folder _elementOwner

_newURL

protected java.net.URL _newURL

_duplicate

protected Node _duplicate
Constructor Detail

SaveAsCommand

public SaveAsCommand()

SaveAsCommand

protected SaveAsCommand(int cmdId)
Method Detail

doit

public int doit()
         throws java.lang.Exception
Description copied from interface: Command
Executes the actions associated with a specific command. When a command executes successfully, implementations should return OK, otherwise, return CANCEL or any other non-zero value.

Throws:
java.lang.Exception

getElementOwner

protected Folder getElementOwner(Element element,
                                 Context context,
                                 boolean parentOK)

validateNewURL

protected java.net.URL validateNewURL(Recognizer recognizer,
                                      java.net.URL newURL,
                                      java.net.URL oldURL)

saveFileDlgOK

protected boolean saveFileDlgOK(Context context,
                                Document doc,
                                java.lang.String dialogTitle)

doSaveAs

protected int doSaveAs(java.lang.String dialogTitle)

convertToNewNode

protected int convertToNewNode(Document doc)
Rename with node conversion.


convertToDupNode

protected int convertToDupNode(Document doc)

saveAsNewNode

protected int saveAsNewNode(Document doc)
The specified doc is being renamed. The doc class has not changed (that is an html document has not been renamed as a jsp document).


saveDocument

protected int saveDocument(Document doc)

saveAsDupNode

protected int saveAsDupNode(Document doc)
There is already a node in the cache with the new url.


Extension SDK

 

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