com.ace.moab.api.request
Class CreateStandingRsvRequest

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

public class CreateStandingRsvRequest
extends CreateReservationRequest

This class represents a request to create a Standing Reservation. To use the request, the user must specify a Standing reservation to create. Although most attributes may be null or empty for the reservation, a list of necessary reservation attributes can be viewed by examining verifyReservation(). These requirements will be checked if the user attempts to get moab commands using getMoabCommands().

The following is a list of reservation attributes that are currently implemented:

Author:
Scott Brown


Field Summary
 
Fields inherited from class com.ace.moab.api.request.CreateReservationRequest
MOAB_RSV_DATE_FORMAT
 
Constructor Summary
CreateStandingRsvRequest(StandingReservation reservation)
          Default constructor.
 
Method Summary
 java.util.List<java.lang.String> getMoabCommands()
          Creates a list of moab commands needed to create this standing reservation This method performs checks on the internal reservation object as defined by verifyReservation() in this class
 boolean hasChanges()
          Returns true if changes exist for the request.
 void verifyReservation()
          Verifies the reservation object is complete enough to create it in Moab.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CreateStandingRsvRequest

public CreateStandingRsvRequest(StandingReservation reservation)
Default constructor. Passes in an already existing, valid reservation that will be used to implement the Request interface

Parameters:
reservation - The reservation as explained in class javadocs
Method Detail

verifyReservation

public void verifyReservation()
                       throws com.moab.api.connect.exception.RequestException
Verifies the reservation object is complete enough to create it in Moab. Before calling getMoabCommands(), this method is used to make sure the reservation is complete to create a list of commands to create it.

Specifically, these values are checked:

NOTE: According to Dave Jackson as of 1/17/08, Reservations no longer need a start or end time

Throws:
com.moab.api.connect.exception.RequestException

getMoabCommands

public java.util.List<java.lang.String> getMoabCommands()
                                                 throws com.moab.api.connect.exception.RequestException
Creates a list of moab commands needed to create this standing reservation This method performs checks on the internal reservation object as defined by verifyReservation() in this class

Returns:
a list of Strings representing commands defining the request.
Throws:
com.moab.api.connect.exception.RequestException - Throws this exception if verifyReservation fails
See Also:
verifyReservation()

hasChanges

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

Returns:
true if changes exist for the request.


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