edu.whoi.ursa.argoDatabase.entity
Class Solo2.QueuedMissionParameters

java.lang.Object
  extended by edu.whoi.ursa.argoDatabase.servletUtil.page.BasePage.OverviewItem.OverviewPrintFunctions
      extended by edu.whoi.ursa.argoDatabase.entity.Solo2.MissionParameters
          extended by edu.whoi.ursa.argoDatabase.entity.Solo2.QueuedMissionParameters
Enclosing class:
Solo2

@Entity(name="Solo2_MissionParameters_Queued")
public static class Solo2.QueuedMissionParameters
extends Solo2.MissionParameters

Queued Mission Parameters. These mission parameters are created as a result of a web form submission. Upon creation, and external process is called that generates an SBD file based on the assembled command. The SBD file is then emailed to Iridium in the five-day window before the floats next surfacing.

Author:
Alexander K. Ekholm

Nested Class Summary
static class Solo2.QueuedMissionParameters.QueuedMissionParametersId
           
static class Solo2.QueuedMissionParameters.QueueType
           
static class Solo2.QueuedMissionParameters.SummaryTable
           
 
Nested classes/interfaces inherited from class edu.whoi.ursa.argoDatabase.entity.Solo2.MissionParameters
Solo2.MissionParameters.AbortParameters, Solo2.MissionParameters.AirVentParameters, Solo2.MissionParameters.AscentDescentTimingParameters, Solo2.MissionParameters.CTDParameters, Solo2.MissionParameters.DivesTargetDepthsDescentPumpTimeParameters, Solo2.MissionParameters.DriftParameters, Solo2.MissionParameters.Exceptions, Solo2.MissionParameters.HydraulicPumpParameters, Solo2.MissionParameters.InformationRequest, Solo2.MissionParameters.SaveParameters, Solo2.MissionParameters.SeekParameters, Solo2.MissionParameters.SleepParameters, Solo2.MissionParameters.SurfaceCommunicationParameters, Solo2.MissionParameters.SurfaceDriftParameters
 
Field Summary
private  java.lang.Boolean acknowledged
           
private  java.lang.Integer aoml
           
private  java.lang.Boolean confirmed
           
private  java.lang.Boolean custom
           
private  Solo2.QueuedMissionParameters.QueuedMissionParametersId id
           
private  java.lang.Long imei
           
private  java.lang.Integer lastDive
           
private static java.lang.String mailto
           
private  java.util.Calendar nextSurface
           
private static java.lang.String queuePath
           
private  ADBFile sbdFile
           
private  java.lang.String sbdOutput
           
private  java.lang.Integer sbdReturnValue
           
private static java.lang.String solo2uploadProcess
           
private  java.lang.Integer transmissionId
           
private  Solo2.QueuedMissionParameters.QueueType type
           
private  java.lang.Boolean uploaded
           
private  java.util.Calendar uploadTime
           
private static int uploadWindowOffset
           
private  java.lang.Integer wmo
           
 
Fields inherited from class edu.whoi.ursa.argoDatabase.entity.Solo2.MissionParameters
abortParameters, airVentParameters, ascentDescentTimingParameters, command, ctdParameters, divesTargetDepthsDescentPumpTimeParameters, driftParameters, exceptions, hydraulicPumpParameters, informationRequest, notset, sections, seekParameters, sleepParameters, surfaceCommunicationParameters, surfaceDriftParameters
 
Constructor Summary
Solo2.QueuedMissionParameters()
           
Solo2.QueuedMissionParameters(java.util.Map<java.lang.String,java.lang.String[]> parameterMap, java.lang.Integer whoi, java.lang.Integer userId)
           
Solo2.QueuedMissionParameters(java.lang.String command, int whoi, int userId)
           
 
Method Summary
protected  java.lang.String assembleCommand()
           
 void checkValues()
           
 java.lang.Boolean getAcknowledged()
           
 java.lang.Integer getAoml()
           
 java.lang.Boolean getConfirmed()
           
 java.lang.Boolean getCustom()
           
 Solo2.QueuedMissionParameters.QueuedMissionParametersId getId()
           
 java.lang.Long getImei()
           
 java.lang.Integer getLastDive()
           
 java.util.Calendar getNextSurface()
           
static Solo2.QueuedMissionParameters getQueuedMissionParametersFromADBFileId(java.lang.Long id)
          Get QueuedMissionParameters from ID of ADBFile corresponding to SBD file.
 ADBFile getSbdFile()
           
 java.lang.String getSbdOutput()
           
 java.lang.Integer getSbdReturnValue()
           
 java.lang.Integer getTransmissionId()
           
 Solo2.QueuedMissionParameters.QueueType getType()
           
 java.lang.Boolean getUploaded()
           
 java.util.Calendar getUploadTime()
           
 java.lang.Integer getWmo()
           
 Form print(org.w3c.dom.Element element)
           
 Form printConfirmationForm(org.w3c.dom.Element element, java.lang.String header)
           
 org.w3c.dom.Element printOverviewSection(org.w3c.dom.Element element)
           
protected  Form printSbdOutput(Form form)
          Prints output generated from external process that generates SBD file, if any exists.
private  Form printUploadComfirmationOptions(Form form)
          Print upload confirmation options
protected  Form printUploadCommand(Form form)
           
 Form printUploadInformation(Form form)
          Print upload information to form
 void setAcknowledged(java.lang.Boolean acknowledged)
           
 void setAoml(java.lang.Integer aoml)
           
 void setConfirmed(java.lang.Boolean confirmed)
           
 void setCustom(java.lang.Boolean custom)
           
 void setId(Solo2.QueuedMissionParameters.QueuedMissionParametersId id)
           
 void setImei(java.lang.Long imei)
           
 void setLastDive(java.lang.Integer lastDive)
           
 void setNextSurface(java.util.Calendar nextSurface)
           
 void setSbdFile(ADBFile sbdFile)
           
 void setSbdOutput(java.lang.String sbdOutput)
           
 void setSbdReturnValue(java.lang.Integer sbdReturnValue)
           
 void setTransmissionId(java.lang.Integer transmissionId)
           
 void setType(Solo2.QueuedMissionParameters.QueueType type)
           
 void setUploaded(java.lang.Boolean uploaded)
           
 void setUploadTime(java.util.Calendar uploadTime)
           
 void setWmo(java.lang.Integer wmo)
           
 Solo2.QueuedMissionParameters upload(java.lang.String mailfrom, java.lang.Long imei)
          Upload mission parameters via email
 java.lang.Integer writeSbdFile()
          Executes an external process that generates an SBD file from queued mission parameters.
 
Methods inherited from class edu.whoi.ursa.argoDatabase.entity.Solo2.MissionParameters
_printConfirmationFormSection, _setMissionParametersFromMap, addCustomCommandUploadFormSection, getAbortParameters, getAirVentParameters, getAscentDescentTimingParameters, getCommand, getCtdParameters, getDivesTargetDepthsDescentPumpTimeParameters, getDriftParameters, getExceptions, getHydraulicPumpParameters, getInformationRequest, getSectionColor, getSeekParameters, getSleepParameters, getSurfaceCommunicationParameters, getSurfaceDriftParameters, printBlankForm, printUploadMissionParameterForm, printUploadTimeSection, printValuesToForm, save, setAbortParameters, setAirVentParameters, setAscentDescentTimingParameters, setCommand, setCtdParameters, setDivesTargetDepthsDescentPumpTimeParameters, setDriftParameters, setExceptions, setHydraulicPumpParameters, setInformationRequest, setSeekParameters, setSleepParameters, setSurfaceCommunicationParameters, setSurfaceDriftParameters, toString
 
Methods inherited from class edu.whoi.ursa.argoDatabase.servletUtil.page.BasePage.OverviewItem.OverviewPrintFunctions
printDisabledTextArea, printFields, printFields, printWrappedDisabledTextArea
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

queuePath

private static final java.lang.String queuePath

solo2uploadProcess

private static final java.lang.String solo2uploadProcess

mailto

private static final java.lang.String mailto

id

private Solo2.QueuedMissionParameters.QueuedMissionParametersId id

nextSurface

private java.util.Calendar nextSurface

lastDive

private java.lang.Integer lastDive

uploadTime

private java.util.Calendar uploadTime

custom

private java.lang.Boolean custom

confirmed

private java.lang.Boolean confirmed

uploaded

private java.lang.Boolean uploaded

acknowledged

private java.lang.Boolean acknowledged

sbdOutput

private java.lang.String sbdOutput

sbdReturnValue

private java.lang.Integer sbdReturnValue

sbdFile

private ADBFile sbdFile

type

private Solo2.QueuedMissionParameters.QueueType type

aoml

private java.lang.Integer aoml

wmo

private java.lang.Integer wmo

imei

private java.lang.Long imei

transmissionId

private java.lang.Integer transmissionId

uploadWindowOffset

private static final int uploadWindowOffset
See Also:
Constant Field Values
Constructor Detail

Solo2.QueuedMissionParameters

public Solo2.QueuedMissionParameters()

Solo2.QueuedMissionParameters

public Solo2.QueuedMissionParameters(java.lang.String command,
                                     int whoi,
                                     int userId)

Solo2.QueuedMissionParameters

public Solo2.QueuedMissionParameters(java.util.Map<java.lang.String,java.lang.String[]> parameterMap,
                                     java.lang.Integer whoi,
                                     java.lang.Integer userId)
Parameters:
parameterMap -
Method Detail

getQueuedMissionParametersFromADBFileId

public static Solo2.QueuedMissionParameters getQueuedMissionParametersFromADBFileId(java.lang.Long id)
Get QueuedMissionParameters from ID of ADBFile corresponding to SBD file.

Parameters:
ADBFile - ID of SBD file
Returns:
corresponding QueuedMissionParameters, or null

assembleCommand

protected java.lang.String assembleCommand()
Overrides:
assembleCommand in class Solo2.MissionParameters

getAcknowledged

public java.lang.Boolean getAcknowledged()
Returns:
the acknowledged

getAoml

public java.lang.Integer getAoml()
Returns:
the aoml

getConfirmed

public java.lang.Boolean getConfirmed()
Returns:
the confirmed

getId

public Solo2.QueuedMissionParameters.QueuedMissionParametersId getId()
Returns:
the id

getImei

public java.lang.Long getImei()
Returns:
the imei

getLastDive

public java.lang.Integer getLastDive()
Returns:
the lastDive

getNextSurface

public java.util.Calendar getNextSurface()
Returns:
the nextSurface

getSbdFile

public ADBFile getSbdFile()
Returns:
the sbdFile

getSbdOutput

public java.lang.String getSbdOutput()
Returns:
the sbdOutput

getSbdReturnValue

public java.lang.Integer getSbdReturnValue()
Returns:
the sbdReturnValue

getTransmissionId

public java.lang.Integer getTransmissionId()
Returns:
the transmissionId

getType

public Solo2.QueuedMissionParameters.QueueType getType()
Returns:
the type

getUploaded

public java.lang.Boolean getUploaded()
Returns:
the uploaded

getUploadTime

public java.util.Calendar getUploadTime()
Returns:
the uploadTime

getWmo

public java.lang.Integer getWmo()
Returns:
the wmo

print

public Form print(org.w3c.dom.Element element)

printConfirmationForm

public Form printConfirmationForm(org.w3c.dom.Element element,
                                  java.lang.String header)
Overrides:
printConfirmationForm in class Solo2.MissionParameters

printOverviewSection

public org.w3c.dom.Element printOverviewSection(org.w3c.dom.Element element)
Specified by:
printOverviewSection in class BasePage.OverviewItem.OverviewPrintFunctions

printSbdOutput

protected Form printSbdOutput(Form form)
Prints output generated from external process that generates SBD file, if any exists.

Parameters:
form - to print sbd output to
Returns:

printUploadComfirmationOptions

private Form printUploadComfirmationOptions(Form form)
Print upload confirmation options

Parameters:
form -
Returns:

printUploadInformation

public Form printUploadInformation(Form form)
Print upload information to form

Parameters:
form -
Returns:

setAcknowledged

public void setAcknowledged(java.lang.Boolean acknowledged)
Parameters:
acknowledged - the acknowledged to set

setAoml

public void setAoml(java.lang.Integer aoml)
Parameters:
aoml - the aoml to set

setConfirmed

public void setConfirmed(java.lang.Boolean confirmed)
Parameters:
confirmed - the confirmed to set

setId

public void setId(Solo2.QueuedMissionParameters.QueuedMissionParametersId id)
Parameters:
id - the id to set

setImei

public void setImei(java.lang.Long imei)
Parameters:
imei - the imei to set

setLastDive

public void setLastDive(java.lang.Integer lastDive)
Parameters:
lastDive - the lastDive to set

setNextSurface

public void setNextSurface(java.util.Calendar nextSurface)
Parameters:
nextSurface - the nextSurface to set

setSbdFile

public void setSbdFile(ADBFile sbdFile)
Parameters:
sbdFile - the sbdFile to set

setSbdOutput

public void setSbdOutput(java.lang.String sbdOutput)
Parameters:
sbdOutput - the sbdOutput to set

setSbdReturnValue

public void setSbdReturnValue(java.lang.Integer sbdReturnValue)
Parameters:
sbdReturnValue - the sbdReturnValue to set

setTransmissionId

public void setTransmissionId(java.lang.Integer transmissionId)
Parameters:
transmissionId - the transmissionId to set

setType

public void setType(Solo2.QueuedMissionParameters.QueueType type)
Parameters:
type - the type to set

setUploaded

public void setUploaded(java.lang.Boolean uploaded)
Parameters:
uploaded - the uploaded to set

setUploadTime

public void setUploadTime(java.util.Calendar uploadTime)
Parameters:
uploadTime - the uploadTime to set

setWmo

public void setWmo(java.lang.Integer wmo)
Parameters:
wmo - the wmo to set

upload

public Solo2.QueuedMissionParameters upload(java.lang.String mailfrom,
                                            java.lang.Long imei)
Upload mission parameters via email

Parameters:
mailfrom -
imei -
Returns:

writeSbdFile

public java.lang.Integer writeSbdFile()
Executes an external process that generates an SBD file from queued mission parameters. Updates sbdOutput and sbdReturnValue accordingly.

Returns:
return value of external process (0 on success, < 0 on error) -1000 if WHOI id is not set

checkValues

public void checkValues()
                 throws ADBException
Overrides:
checkValues in class Solo2.MissionParameters
Throws:
ADBException

printUploadCommand

protected Form printUploadCommand(Form form)
Overrides:
printUploadCommand in class Solo2.MissionParameters

getCustom

public java.lang.Boolean getCustom()
Returns:
the custom

setCustom

public void setCustom(java.lang.Boolean custom)
Parameters:
custom - the custom to set