org.outerj.daisy.repository.schema
Interface SelectionList

All Known Subinterfaces:
LinkQuerySelectionList, QuerySelectionList, StaticSelectionList

public interface SelectionList

A list of values from which one can be selected by the end-user.

This SelectionList consists of ListItems.


Method Summary
 void addToFieldTypeXml(org.outerx.daisy.x10.SelectionListDocument.SelectionList selectionListXml)
           
 ListItem[] getItems()
          Gets the selection list items.
 ListItem[] getItems(long branchId, long languageId, java.util.Locale locale)
          Gets the selection list items.
 java.lang.String getLabel(java.lang.Object value, java.util.Locale locale)
          Returns the label defined in the selection list for the given value, or null if not available.
 

Method Detail

getItems

ListItem[] getItems()
Gets the selection list items.

By preference, you should use the method getItems(long, long, java.util.Locale). This method will fail if the selection list implementation requires a branch and language.


getItems

ListItem[] getItems(long branchId,
                    long languageId,
                    java.util.Locale locale)
Gets the selection list items.

Some selection list implementations might want to filter the items based on the branch and language of the context in which this selection list is used (= typically the document that is being edited). Therefore, it is important that the branch and language or specified.

Parameters:
branchId - the branch of the document that is being edited
languageId - the language of the document that is being edited

getLabel

java.lang.String getLabel(java.lang.Object value,
                          java.util.Locale locale)
Returns the label defined in the selection list for the given value, or null if not available.


addToFieldTypeXml

void addToFieldTypeXml(org.outerx.daisy.x10.SelectionListDocument.SelectionList selectionListXml)


Copyright © -2012 . All Rights Reserved.