uk.ac.kcl.cch.jb.pliny.commands
Class DeleteResourceCommand

java.lang.Object
  extended byorg.eclipse.gef.commands.Command
      extended byuk.ac.kcl.cch.jb.pliny.commands.DeleteResourceCommand

public class DeleteResourceCommand
extends org.eclipse.gef.commands.Command

deletes a Resource item. It does a "deep" deletion -- also deleting any LinkableObjects linked to it either through their surrogateFore or displayedIn links, and then any Links that connect deleted LinkableObjects. This command is invoked through the Resource Explorer.

Author:
John Bradley

Constructor Summary
DeleteResourceCommand(Resource resource, String resourceType)
          constructs an instance of this command.
 
Method Summary
 void execute()
           
 void undo()
           
 
Methods inherited from class org.eclipse.gef.commands.Command
canExecute, canUndo, chain, dispose, getDebugLabel, getLabel, redo, setDebugLabel, setLabel
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DeleteResourceCommand

public DeleteResourceCommand(Resource resource,
                             String resourceType)
constructs an instance of this command. The resource type parameter is used so that the label associated with this instance can contain the type of resource (Note, ImageResource, etc).

Parameters:
resource - the resource to be deleted
resourceType - the name of the type of resource
Method Detail

execute

public void execute()

undo

public void undo()