{ } }
Tree PREV CLASS NEXT CLASS FRAMES NO FRAMES SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD com.ibm.workplace.wcm.api
Interface OptionSelectionComponent
- All Superinterfaces:
- ContentComponent, WCMApiObject
public interface OptionSelectionComponent- extends ContentComponent
Represents a OptionSelection component.
A OptionSelectionComponent is a ContentComponent and cannot be stored as a separate entity in the repository.
A OptionSelectionComponent can contain array of String values. This interface provides methods to retrieve and set the array of Strings or categories contained within this component. The user must determine or set the option type and use the appropriate methods for the option type. Those that contain 'category' are used when the type is OptionType#USE_TAXONOMY and the methods that do not contain 'category' in the name should be used when option type is OptionType#USER_DEFINED
note: since v6.0.0, a OptionSelectionComponent is referred to as an "Option Selection Element" in the Authoring UI.
- See Also:
- ContentComponent
Method Summary DocumentId[] getAvailableCategorySelectionValues()
Returns the array of available category options defined in the authoring template for this OptionSelectionComponentjava.lang.String[] getAvailableSelectionValues()
Returns the array of available options defined in the authoring template for this OptionSelectionComponentDocumentId[] getCategorySelections()
Returns the list of categories selected in this component as a DocumentId[].DocumentType<? extends OptionSelectionComponent> getDocumentType()
Returns the DocumentType of the ContentComponent.OptionType getOptionType()
Returns the OptionType of this option selection element.java.lang.String[] getSelections()
Returns the current selections contained in this component as a String[].boolean isSingleSelect()
Returns true if this OptionSelectionComponent has been configured within the authoring template to be single select, false if not.void setCategorySelections(DocumentId[] selections)
Sets the selected categories on this OptionSelectionComponent.void setOptionType(OptionType type)
Set the OptionType for this OptionSelectionComponentvoid setSelections(java.lang.String[] selections)
Sets the String[] contained in this OptionSelectionComponent.
Methods inherited from interface com.ibm.workplace.wcm.api.ContentComponent getContainer, getName
Method Detail 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
Tree PREV CLASS NEXT CLASS FRAMES NO FRAMES SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD