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

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

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

Resets a URL attached to a particular Web-Page Resource to the given new URL. It has the side effect of closing the open web viewer (if there currently is one) for the updated resource.

This command is invoked by the Resource Explorer's UpdateUrlAction

Author:
John Bradley

Constructor Summary
ChangeUrlCommand(Resource theResource, String newURL)
          constructs the command to change the URL associated with the identifier for the given resource.
 
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

ChangeUrlCommand

public ChangeUrlCommand(Resource theResource,
                        String newURL)
constructs the command to change the URL associated with the identifier for the given resource.

Parameters:
theResource - Resource the resource to a web page
newURL - the new URL to attach to it.
Method Detail

execute

public void execute()

undo

public void undo()