org.xcmis.spi.model
Class Choice<T>

java.lang.Object
  extended by org.xcmis.spi.model.Choice<T>

public class Choice<T>
extends Object

Indicates an explicit ordered set of single values allowed for the property.

Version:
$Id: $
Author:
Andrey Parfonov

Constructor Summary
Choice()
           
Choice(T[] values, String displayName)
           
 
Method Summary
 List<Choice<T>> getChoices()
          Sub-choices of current choice.
 String getDisplayName()
          Display name of choice.
 T[] getValues()
          Values of choice.
 void setDisplayName(String displayName)
          Set choice display name.
 void setValues(T[] values)
          Set choice values.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Choice

public Choice()

Choice

public Choice(T[] values,
              String displayName)
Method Detail

getChoices

public List<Choice<T>> getChoices()
Sub-choices of current choice.

Returns:
sub-choices. May give null or empty list if no sub-choices provided

getDisplayName

public String getDisplayName()
Display name of choice. It is used for presentation purpose.

Returns:
choice display name

getValues

public T[] getValues()
Values of choice. One of it will be stored as value of property it selected.

Returns:
choice values

setDisplayName

public void setDisplayName(String displayName)
Set choice display name.

Parameters:
displayName - display name

setValues

public void setValues(T[] values)
Set choice values.

Parameters:
values - choice values


Copyright © 2003-2013 eXo Platform SAS. All Rights Reserved.