net.officefloor.model
Class RemoveConnectionsAction<M extends Model>

java.lang.Object
  extended by net.officefloor.model.RemoveConnectionsAction<M>

public class RemoveConnectionsAction<M extends Model>
extends Object

Action containing the details of a delete.

Author:
Daniel Sagenschneider

Field Summary
static String REMOVE_CONNECTIONS_METHOD_NAME
          Method name on the models to remove the connections.
 
Constructor Summary
RemoveConnectionsAction(M model)
          Initiate.
 
Method Summary
<R extends Model>
void
addCascadeModel(RemoveConnectionsAction<R> child)
           Adds a cascade Model.
<C extends ConnectionModel>
void
disconnect(Collection<C> connectionModels)
          Removes the ConnectionModel instances within the input Collection.
 void disconnect(ConnectionModel connectionModel)
          Removes the ConnectionModel and holds reference to it for undo action.
 M getModel()
          Obtains the Model for which ConnectionModel instances are being removed.
 void reconnect()
          Reconnects all the ConnectionModel instances.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

REMOVE_CONNECTIONS_METHOD_NAME

public static final String REMOVE_CONNECTIONS_METHOD_NAME
Method name on the models to remove the connections.

See Also:
Constant Field Values
Constructor Detail

RemoveConnectionsAction

public RemoveConnectionsAction(M model)
Initiate.

Parameters:
model - Model for which ConnectionModel instances are being removed.
Method Detail

getModel

public M getModel()
Obtains the Model for which ConnectionModel instances are being removed.

Returns:
Model for which ConnectionModel instances are being removed.

disconnect

public void disconnect(ConnectionModel connectionModel)
Removes the ConnectionModel and holds reference to it for undo action.

Parameters:
connectionModel - ConnectionModel and may be null for easier coding.

disconnect

public <C extends ConnectionModel> void disconnect(Collection<C> connectionModels)
Removes the ConnectionModel instances within the input Collection.

Parameters:
connectionModels - ConnectionModel instances.

addCascadeModel

public <R extends Model> void addCascadeModel(RemoveConnectionsAction<R> child)

Adds a cascade Model.

Added cascade Model instances are reconnected on this being reconnected.

Parameters:
child - Cascade Model.

reconnect

public void reconnect()
Reconnects all the ConnectionModel instances.



Copyright © 2005-2013. All Rights Reserved.