fr.ifremer.wao.ui.data
Class WaoActivationContext

java.lang.Object
  extended by fr.ifremer.wao.ui.data.WaoActivationContext

public class WaoActivationContext
extends Object

Instances of this class represent the context given in a Tapestry page. The purpose of this class is to be used in onActive() event in Tapestry a tapestry page. By given the EventContext object injected by Tapestry, to an instance of this class, you will be able to understand what context is. Another use of this class is to create in instance and fill it with values in order to create a context to create a link to a page. In Tapestry, context is stored in the URL. For example, given an URL ending by

 sampleRowCode/2011_023/observationTypeName/PHONE_CALL
 
This object will allow you to do getSampleRowCode() (return "2011_023") and getObservationType (will return ObservationType.PHONE_CALL).


Field Summary
protected static String BOAT_IMMATRICULATION
           
protected  Integer boatImmatriculation
           
protected static String OBSERVATION_TYPE_NAME
           
protected  ObservationType observationType
           
protected static String SAMPLE_ROW_CODE
           
protected static String SAMPLE_ROW_ID
           
protected  String sampleRowCode
           
protected  String sampleRowId
           
protected static String SHIP_OWNER_NAME
           
protected  String shipOwnerName
           
protected static List<String> VALID_KEYS
           
 
Constructor Summary
WaoActivationContext()
           
 
Method Summary
 Integer getBoatImmatriculation()
           
 ObservationType getObservationType()
           
 String getSampleRowCode()
           
 String getSampleRowId()
           
 String getShipOwnerName()
           
static WaoActivationContext newContextFromTapestry(org.apache.tapestry5.EventContext tapestryContext)
           
static WaoActivationContext newEmptyContext()
           
 void setBoatImmatriculation(Integer boatImmatriculation)
           
 void setBoatImmatriculation(String boatImmatriculation)
           
 void setObservationType(ObservationType observationType)
           
protected  void setObservationType(String name)
           
 void setSampleRowCode(String sampleRowCode)
           
 void setSampleRowId(String sampleRowId)
           
 void setShipOwnerName(String shipOwnerName)
           
 String toString()
           
 String[] toStrings()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

SAMPLE_ROW_CODE

protected static final String SAMPLE_ROW_CODE
See Also:
Constant Field Values

SAMPLE_ROW_ID

protected static final String SAMPLE_ROW_ID
See Also:
Constant Field Values

OBSERVATION_TYPE_NAME

protected static final String OBSERVATION_TYPE_NAME
See Also:
Constant Field Values

BOAT_IMMATRICULATION

protected static final String BOAT_IMMATRICULATION
See Also:
Constant Field Values

SHIP_OWNER_NAME

protected static final String SHIP_OWNER_NAME
See Also:
Constant Field Values

VALID_KEYS

protected static final List<String> VALID_KEYS

sampleRowCode

protected String sampleRowCode

sampleRowId

protected String sampleRowId

observationType

protected ObservationType observationType

boatImmatriculation

protected Integer boatImmatriculation

shipOwnerName

protected String shipOwnerName
Constructor Detail

WaoActivationContext

public WaoActivationContext()
Method Detail

newEmptyContext

public static WaoActivationContext newEmptyContext()

newContextFromTapestry

public static WaoActivationContext newContextFromTapestry(org.apache.tapestry5.EventContext tapestryContext)

toString

public String toString()
Overrides:
toString in class Object

toStrings

public String[] toStrings()

setObservationType

protected void setObservationType(String name)

getSampleRowCode

public String getSampleRowCode()

setSampleRowCode

public void setSampleRowCode(String sampleRowCode)

getSampleRowId

public String getSampleRowId()

setSampleRowId

public void setSampleRowId(String sampleRowId)

getObservationType

public ObservationType getObservationType()

setObservationType

public void setObservationType(ObservationType observationType)

setBoatImmatriculation

public void setBoatImmatriculation(String boatImmatriculation)

setBoatImmatriculation

public void setBoatImmatriculation(Integer boatImmatriculation)

getBoatImmatriculation

public Integer getBoatImmatriculation()

getShipOwnerName

public String getShipOwnerName()

setShipOwnerName

public void setShipOwnerName(String shipOwnerName)


Copyright © 2009-2012 Ifremer. All Rights Reserved.