com.partnersoft.v3x.apps.Staker.domain
Class LocationCommands

java.lang.Object
  extended by com.partnersoft.v3x.apps.Staker.domain.LocationCommands

public class LocationCommands
extends java.lang.Object

A factory for LocationCommands. Encapsulates the interactive logic of manipulation of Locations.


Constructor Summary
LocationCommands()
           
 
Method Summary
static Command createAddLocationCommand(Job job, java.util.Set set, StakingNode parent, Coord3D coords)
          Returns a command object that, when invoked, adds a new location to the given set at the given point with the given parent.
static Command createCopyUnitsCommand(Location from, Location to)
          Returns a command object that, when invoked, copies the units from the supplied template Location on to the victim location.
static Command createDeleteLocationCommand(java.util.Set set, Location victim)
          Returns a command object that, when invoked, deletes the location and its intermediate points.
static Command createReparentLocationCommand(java.util.Set set, Location victim, StakingNode newParent)
          Returns a command object that, when invoked, changes the parent of the location.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LocationCommands

public LocationCommands()
Method Detail

createCopyUnitsCommand

public static Command createCopyUnitsCommand(Location from,
                                             Location to)
Returns a command object that, when invoked, copies the units from the supplied template Location on to the victim location.


createAddLocationCommand

public static Command createAddLocationCommand(Job job,
                                               java.util.Set set,
                                               StakingNode parent,
                                               Coord3D coords)
Returns a command object that, when invoked, adds a new location to the given set at the given point with the given parent.


createReparentLocationCommand

public static Command createReparentLocationCommand(java.util.Set set,
                                                    Location victim,
                                                    StakingNode newParent)
Returns a command object that, when invoked, changes the parent of the location.


createDeleteLocationCommand

public static Command createDeleteLocationCommand(java.util.Set set,
                                                  Location victim)
Returns a command object that, when invoked, deletes the location and its intermediate points.