public class SaveAsCommand extends Command
SaveAsCommand
class implements the SaveAs command.Modifier and Type | Field and Description |
---|---|
protected Context |
_context |
protected Node |
_duplicate |
protected Folder |
_elementOwner |
protected java.net.URL |
_newURL |
protected java.lang.Class |
_nodeClass |
protected boolean |
_noPlaceToAdd |
protected ContentSet |
_sourceContentSet |
protected static int |
CANCELED |
protected static int |
OK_NAME_CHANGED |
protected static int |
OK_NAME_UNCHANGED |
Modifier | Constructor and Description |
---|---|
|
SaveAsCommand() |
protected |
SaveAsCommand(int cmdId) |
Modifier and Type | Method and Description |
---|---|
protected boolean |
approveNewURL(java.net.URL selectedURL) |
protected int |
convertToDupNode(Node doc) |
protected int |
convertToNewNode(Node doc)
Rename with node conversion.
|
int |
doit()
Executes the actions associated with a specific command.
|
protected int |
doSaveAs(java.lang.String dialogTitle) |
protected void |
getOwningContentSet(Node node) |
protected boolean |
isSameFile(java.net.URL newURL,
java.net.URL elementURL)
Used to determine if the new URL we're going to Save As is the same as the
elementURL.
|
protected int |
saveAsDupNode(Node doc)
There is already a node in the cache with the new url.
|
protected int |
saveAsNewNode(Node doc)
The specified
doc is being saved as a different
name in addition to the name it already has. |
protected boolean |
saveFileDlgOK(Context context,
Node doc,
java.lang.String dialogTitle) |
protected int |
saveNode(Node doc) |
protected java.net.URL |
validateNewURL(Recognizer recognizer,
java.net.URL newURL,
java.net.URL oldURL) |
enableConfirmation, getAffectedNodes, getContext, getData, getId, getName, getProgressHandle, getType, isGlobal, setContext, setData, setTaskInfo, undo
protected static final int OK_NAME_CHANGED
protected static final int OK_NAME_UNCHANGED
protected static final int CANCELED
protected Context _context
protected java.lang.Class _nodeClass
protected Folder _elementOwner
protected java.net.URL _newURL
protected Node _duplicate
protected boolean _noPlaceToAdd
protected ContentSet _sourceContentSet
public SaveAsCommand()
protected SaveAsCommand(int cmdId)
public int doit() throws java.lang.Exception
Command
protected java.net.URL validateNewURL(Recognizer recognizer, java.net.URL newURL, java.net.URL oldURL)
protected boolean saveFileDlgOK(Context context, Node doc, java.lang.String dialogTitle)
protected int doSaveAs(java.lang.String dialogTitle)
protected int convertToNewNode(Node doc)
protected int convertToDupNode(Node doc)
protected int saveAsNewNode(Node doc)
doc
is being saved as a different
name in addition to the name it already has.
The doc
class has not changed (that is an html Node
has not been renamed as a jsp Node).protected int saveNode(Node doc)
protected int saveAsDupNode(Node doc)
protected boolean isSameFile(java.net.URL newURL, java.net.URL elementURL)
newURL
- elementURL
- protected boolean approveNewURL(java.net.URL selectedURL)
protected void getOwningContentSet(Node node)