|
Oracle Fusion Middleware Java API Reference for Oracle Extension SDK Reference 11g Release 1 (11.1.1.7.2) E13403-10 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object
oracle.ide.controller.Command
oracle.ide.cmd.RemoveFileCommand
public class RemoveFileCommand
The RemoveFileCommand
class implements the command to delete the file(s) that are associated with the selected element(s) from their container. To remove the files from disk, see RemoveFromDiskCommand
.
Command
Field Summary |
---|
Fields inherited from class oracle.ide.controller.Command |
---|
CANCEL, context, EXECUTING, MULTI_NODE, NO_CHANGE, NO_UNDO, NORMAL, OK, type |
Constructor Summary | |
---|---|
RemoveFileCommand() Constructor. |
|
RemoveFileCommand(int cmdId, int type) |
Method Summary | |
---|---|
protected java.lang.String |
buildFileNamesString(java.util.List elementList) Build a list of file names |
protected boolean |
canRemove(Element element, Folder ownerFolder) Returns true if the specified ownerFolder allows the element to be removed. |
protected boolean |
canRemove(TNode[] tnodes, Folder ownerFolder, java.util.List removedFiles, java.util.List unremovedFiles) Returns true if the ownerFolder allows the elements encapsulated by the specified tnodes to be removed. |
protected UpdateMessage |
createUpdateMessage() Creates an UpdateMessage whose ID is UpdateMessage.CHILD_REMOVED and stores the command ID as a user property. |
int |
doit() Presents the user with the selected list of element files to delete from disk using SelectFilesPanel.showDialog(). |
Node[] |
getAffectedNodes() This method should return an array of Nodes affected by the execution of this command. |
protected boolean |
isNeedConfirmClose() |
protected int |
remove(java.util.List files, Folder owner, boolean close) |
protected int |
remove(java.util.List files, Folder owner, boolean close, java.util.List output) Remove the list of files from their folder owner . |
protected boolean |
remove(Node node, Folder owner) Removes element from owner . |
Methods inherited from class oracle.ide.controller.Command |
---|
getContext, getData, getId, getName, getType, isGlobal, setContext, setData, undo |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public RemoveFileCommand()
public RemoveFileCommand(int cmdId, int type)
Method Detail |
---|
public int doit() throws java.lang.Exception
doit
in class Command
java.lang.Exception
public Node[] getAffectedNodes()
Command
getAffectedNodes
in class Command
protected int remove(java.util.List files, Folder owner, boolean close)
protected int remove(java.util.List files, Folder owner, boolean close, java.util.List output)
files
from their folder owner
. If the close
parameter is true
, the files are closed before they are removed from their owner
. Files that could not be removed are added to the output
list.protected UpdateMessage createUpdateMessage()
UpdateMessage
whose ID is UpdateMessage.CHILD_REMOVED
and stores the command ID as a user property.UpdateMessage
whose ID is UpdateMessage.CHILD_REMOVED
.UpdateMessage.CHILD_REMOVED
protected boolean remove(Node node, Folder owner)
element
from owner
.false
if the element could not be removed.protected java.lang.String buildFileNamesString(java.util.List elementList)
protected boolean canRemove(Element element, Folder ownerFolder)
ownerFolder
allows the element
to be removed. Precondition: element
cannot be null.protected boolean canRemove(TNode[] tnodes, Folder ownerFolder, java.util.List removedFiles, java.util.List unremovedFiles)
true
if the ownerFolder
allows the elements encapsulated by the specified tnodes
to be removed. The elements that can be reomved are listed in the removeFiles
list while the ones that cannot be removed are listed in the unremovedFiles
list. Precondition: none of the given parameters can be null.protected boolean isNeedConfirmClose()
true
if the user should be prompted to save dirty nodes prior to removing them. This allows suppression of the 'Save Files' dialog when the files are about to be removed from disk altogether.
|
Oracle Fusion Middleware Java API Reference for Oracle Extension SDK Reference 11g Release 1 (11.1.1.7.2) E13403-10 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |