net.refractions.udig.project.command.factory
Class BasicCommandFactory

java.lang.Object
  extended by net.refractions.udig.project.command.BasicCommandFactory
      extended by net.refractions.udig.project.command.factory.BasicCommandFactory

public class BasicCommandFactory
extends BasicCommandFactory

Creates Edit commands which must be used to modify editable feature data. API internal classes are in the returned API

Since:
0.3
Author:
jeichar

Constructor Summary
protected BasicCommandFactory()
           
 
Method Summary
 UndoableMapCommand createAddLayer(ILayer layer)
          Create an Add Layer command
 UndoableMapCommand createAddLayer(ILayer layer, int index)
          Create an Add Layer command
 UndoableMapCommand createAddManyLayers(java.util.Collection layers)
          Create an AddLayers command that adds all the layers in the collection
 UndoableMapCommand createAddManyLayers(java.util.Collection layers, int index)
          Create an AddLayers command that adds all the layers in the collection
 UndoableMapCommand createChangeCRS(IMap map, CoordinateReferenceSystem crs)
          Create a Change CRS command
 UndoableMapCommand createCreateMapCommand(java.util.List<IGeoResource> layerResources)
          Create a CreateMapCommand
 UndoableMapCommand createCreateMapCommand(java.util.List<IGeoResource> layerResources, Project owner)
          Create a CreateMapCommand
 UndoableMapCommand createCreateMapCommand(java.lang.String name, java.util.List<IGeoResource> layerResources)
          Create a CreateMapCommand
 UndoableMapCommand createCreateMapCommand(java.lang.String name, java.util.List<IGeoResource> layerResources, Project owner)
          Create a CreateMapCommand
 UndoableMapCommand createDeleteLayer(ILayer layer)
          Create a delete layer command
 UndoableMapCommand createSetApplicabilityCommand(ILayer layer, java.lang.String applicabilityId, boolean newValue)
           
static BasicCommandFactory getInstance()
          Creates a new EditCommandFactory object
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BasicCommandFactory

protected BasicCommandFactory()
Method Detail

getInstance

public static BasicCommandFactory getInstance()
Creates a new EditCommandFactory object

Returns:
a new EditCommandFactory object

createDeleteLayer

public UndoableMapCommand createDeleteLayer(ILayer layer)
Create a delete layer command

Overrides:
createDeleteLayer in class BasicCommandFactory
Parameters:
map - the map containing the layer
layer - the layer to delete
Returns:
a new DeleteLayerCommandobject that deletes the layer.
See Also:
DeleteLayerCommand

createAddLayer

public UndoableMapCommand createAddLayer(ILayer layer)
Create an Add Layer command

Overrides:
createAddLayer in class BasicCommandFactory
Parameters:
layer - the layer to add to the map.
Returns:
a new AddLayerCommandobject that deletes the feature.
See Also:
AddLayerCommand

createAddLayer

public UndoableMapCommand createAddLayer(ILayer layer,
                                         int index)
Create an Add Layer command

Overrides:
createAddLayer in class BasicCommandFactory
Parameters:
layer - the layer to add to the map.
index - the zorder where the layer will be added.
Returns:
a new AddLayerCommandobject that deletes the feature.
See Also:
AddLayerCommand

createAddManyLayers

public UndoableMapCommand createAddManyLayers(java.util.Collection layers,
                                              int index)
Create an AddLayers command that adds all the layers in the collection

Parameters:
evaluationObject - the layer to add to the map.
index - the zorder where the layer will be added.
Returns:
a new AddLayersCommandobject that deletes the feature.
See Also:
AddLayersCommand

createAddManyLayers

public UndoableMapCommand createAddManyLayers(java.util.Collection layers)
Create an AddLayers command that adds all the layers in the collection

Parameters:
evaluationObject - the layer to add to the map.
Returns:
a new AddLayersCommandobject that deletes the feature.
See Also:
AddLayersCommand

createChangeCRS

public UndoableMapCommand createChangeCRS(IMap map,
                                          CoordinateReferenceSystem crs)
Create a Change CRS command

Overrides:
createChangeCRS in class BasicCommandFactory
Parameters:
map - the map for which the CRS is going to change.
Returns:
a new ChangeCRSCommandobject that changes the CRS.
See Also:
ChangeCRSCommand

createCreateMapCommand

public UndoableMapCommand createCreateMapCommand(java.lang.String name,
                                                 java.util.List<IGeoResource> layerResources,
                                                 Project owner)
Create a CreateMapCommand

Parameters:
name - the name of the map
layerResources - the IGeoResources that will make up the layers of the map.
owner - The project that will contain the map.
Returns:

createCreateMapCommand

public UndoableMapCommand createCreateMapCommand(java.util.List<IGeoResource> layerResources,
                                                 Project owner)
Create a CreateMapCommand

Parameters:
layerResources - the IGeoResources that will make up the layers of the map.
owner - The project that will contain the map.
Returns:

createCreateMapCommand

public UndoableMapCommand createCreateMapCommand(java.lang.String name,
                                                 java.util.List<IGeoResource> layerResources)
Create a CreateMapCommand

Parameters:
name - the name of the map
layerResources - the IGeoResources that will make up the layers of the map.
Returns:

createCreateMapCommand

public UndoableMapCommand createCreateMapCommand(java.util.List<IGeoResource> layerResources)
Create a CreateMapCommand

Parameters:
layerResources - the objects, (Layers or IGeoResources) that will make up the map.
Returns:

createSetApplicabilityCommand

public UndoableMapCommand createSetApplicabilityCommand(ILayer layer,
                                                        java.lang.String applicabilityId,
                                                        boolean newValue)