com.ace.moab.api.request
Class ModifyReservationRequest

java.lang.Object
  extended by com.ace.moab.api.request.ModifyReservationRequest
All Implemented Interfaces:
com.moab.api.commands.Request

public class ModifyReservationRequest
extends java.lang.Object
implements com.moab.api.commands.Request

Creates the commands necessary to modify a reservation. For more information about modifying reservations, see http://www.clusterresources.com/products/mwm /docs/commands/mrsvctl.shtml#MODIFY

The following is a list of supported attribute changes:

Author:
Scott Brown

Constructor Summary
ModifyReservationRequest(Reservation oldReservation, Reservation newReservation)
          Creates the modify request using the differences between the input parameter oldReservation and the parameter newReservation.
 
Method Summary
 java.util.List<java.lang.String> getMoabCommands()
          Returns a list of commands that define the request.
 boolean hasChanges()
          Returns true if changes exist for the request.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ModifyReservationRequest

public ModifyReservationRequest(Reservation oldReservation,
                                Reservation newReservation)
Creates the modify request using the differences between the input parameter oldReservation and the parameter newReservation. Calling the getMoabCommands() will return commands necessary to modify the object in Moab.

Parameters:
oldReservation - The old data for the reservation
newReservation - What the new reservation should look like
Method Detail

getMoabCommands

public java.util.List<java.lang.String> getMoabCommands()
                                                 throws com.moab.api.connect.exception.RequestException
Description copied from interface: com.moab.api.commands.Request
Returns a list of commands that define the request. These commands are run on the server containing Moab. These will only be run if the Request.hasChanges() method returns true.

Specified by:
getMoabCommands in interface com.moab.api.commands.Request
Returns:
a list of Strings representing commands defining the request.
Throws:
com.moab.api.connect.exception.RequestException - thrown if the implementing Request class has problems building the associated commands.

hasChanges

public boolean hasChanges()
Description copied from interface: com.moab.api.commands.Request
Returns true if changes exist for the request.

Specified by:
hasChanges in interface com.moab.api.commands.Request
Returns:
true if changes exist for the request.


Copyright © 2001-2009 Cluster Resources, Inc. All Rights Reserved.