in the Authoring UI.
- See Also:
ContentComponent
getDocumentType
DocumentType<? extends OptionSelectionComponent> getDocumentType()
- Description copied from interface:
ContentComponent
- Returns the
DocumentType of the ContentComponent.
- Specified by:
getDocumentType in interface ContentComponent
- Returns:
- the type
- See Also:
ContentComponent.getDocumentType()
getSelections
java.lang.String[] getSelections()
- Returns the current selections contained in this component as a
String[].
- Returns:
- the current selections or
null if no values are selected.
setSelections
void setSelections(java.lang.String[] selections)
throws OperationFailedException
- Sets the String[] contained in this
OptionSelectionComponent.
Note. This method replaces any existing String[] in this component.
- Parameters:
selections - the selected options on this OptionSelectionComponent.
- Throws:
OperationFailedException - if the String[] argument is null or the
selections could not be set
getAvailableSelectionValues
java.lang.String[] getAvailableSelectionValues()
- Returns the array of available options defined in the authoring template
for this
OptionSelectionComponent
- Returns:
- the available selections from the authoring template or
null if no values is are set. - Since:
- 7.0
isSingleSelect
boolean isSingleSelect()
- Returns
true if this OptionSelectionComponent has
been configured within the authoring template to be single select, false
if not.
- Returns:
true if this OptionSelectionComponent is
is configured to be single select, false if not.- Since:
- 7.0
getAvailableCategorySelectionValues
DocumentId[] getAvailableCategorySelectionValues()
throws OperationFailedException
- Returns the array of available category options defined in the authoring template
for this
OptionSelectionComponent
- Returns:
- the
DocumentIds of the available categories defined in the authoring template
for this OptionSelectionComponent or null if the no values are set.
- Throws:
OperationFailedException - if the option type is OptionType#USER_DEFINED- Since:
- 7.0
getCategorySelections
DocumentId[] getCategorySelections()
throws OperationFailedException
- Returns the list of categories selected in this component as a
DocumentId[].
Returns null if the values is not set.
- Returns:
- the DocumentId[]
- Throws:
OperationFailedException - if the option type is OptionType#USER_DEFINED- Since:
- 7.0
setCategorySelections
void setCategorySelections(DocumentId[] selections)
throws OperationFailedException
Sets the selected categories on this OptionSelectionComponent.
Note. This method replaces any existing Categories in this component.
- Parameters:
selections - the DocumentIds of the selected Categories on this OptionSelectionComponent.
- Throws:
OperationFailedException - if the option type is OptionType#USER_DEFINED or the selections could not be set.
java.lang.IllegalArgumentException - if the selections argument is null or the provided DocumentIds are not Categories.- Since:
- 7.0
getOptionType
OptionType getOptionType()
- Returns the
OptionType of this option selection element.
Either OptionType#USE_TAXONOMY or OptionType#USER_DEFINED
- Returns:
- the
OptionType. - Since:
- 7.0
setOptionType
void setOptionType(OptionType type)
throws java.lang.IllegalArgumentException
- Set the
OptionType for this OptionSelectionComponent
- Parameters:
type - the OptionType to set. The parameter type should be either OptionType#USE_TAXONOMY or OptionType#USER_DEFINED.
- Throws:
IllegalArgumentException - if the OptionType provided was null.
java.lang.IllegalArgumentException