org.ow2.bonita.facade.runtime.var
Class Enumeration

java.lang.Object
  extended by org.ow2.bonita.facade.runtime.var.Enumeration
All Implemented Interfaces:
java.io.Serializable

public class Enumeration
extends java.lang.Object
implements java.io.Serializable

This class is used with get methods for managing variables of the QueryRuntimeAPI
when the variables have been defined as Enumeration (DataField with EnumerationType type).
. It is also used to set Enumeration type variables (giving an object of this class to the methods:
setActivityInstanceVariable or setProcessInstanceVariable or setVariable from the RuntimeAPI.
Here after an example of code for getting Enumeration objects.

 Object var = queryRuntimeAPI.getActivityInstanceVariable(instanceUUID, activityId, key);
       if (var instanceof Enumeration) {
         Enumeration enu = (Enumeration)var;
       } else {
         String str = (String)var;
       }

Author:
Marc Blachon, Guillaume Porcher, Charles Souillard, Miguel Valdes, Pierre Vigneras
See Also:
Serialized Form

Constructor Summary
protected Enumeration()
           
  Enumeration(java.util.Set<java.lang.String> possibleValues, java.lang.String selectedValue)
          Creates an Enumeration giving the list of possible values and the selected value.
 
Method Summary
 java.util.Set<java.lang.String> getPossibleValues()
          Returns the collection of possible values.
 java.lang.String getSelectedValue()
          Returns the selected value.
protected  void setSelectedValue(java.lang.String selectedValue)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Enumeration

protected Enumeration()

Enumeration

public Enumeration(java.util.Set<java.lang.String> possibleValues,
                   java.lang.String selectedValue)
Creates an Enumeration giving the list of possible values and the selected value.
The selected value should be one of the possible values.

Parameters:
possibleValues - the list of possible values of the enumeration.
selectedValue - the selected value of the enumeration.
Method Detail

getPossibleValues

public java.util.Set<java.lang.String> getPossibleValues()
Returns the collection of possible values.

Returns:
the collection of possible values.

getSelectedValue

public java.lang.String getSelectedValue()
Returns the selected value.

Returns:
the selected value.

setSelectedValue

protected void setSelectedValue(java.lang.String selectedValue)


Copyright © 2009 OW2 Consortium. All Rights Reserved.