class sap.ui.generic.app.navigation.service.SelectionVariant

Visiblity: public
UX Guidelines:
Implements:
Available since: N/A
Module: sap/ui/generic/app/navigation/service/SelectionVariant
Application Component: CA-UI5-FE-NAV

Creates a new instance of a SelectionVariant class. If no parameter is passed, an new empty instance is created whose ID has been set to "". Passing a JSON-serialized string complying to the Selection Variant Specification will parse it, and the newly created instance will contain the same information.


Constructor

new sap.ui.generic.app.navigation.service.SelectionVariant(vSelectionVariant?)
Param Type Default Value Description
vSelectionVariant? string object

If of type string, the selection variant is JSON-formatted; if of type object, the object represents a selection variant


Methods Overview

Method Description
sap.ui.generic.app.navigation.service.SelectionVariant.addParameter

Sets the value of a parameter called sName to the new value sValue. If the parameter has already been set before, its value is overwritten.

sap.ui.generic.app.navigation.service.SelectionVariant.addSelectOption

Adds a new range to the list of select options for a given parameter.

sap.ui.generic.app.navigation.service.SelectionVariant.extend

Creates a new subclass of class sap.ui.generic.app.navigation.service.SelectionVariant with name sClassName and enriches it with the information contained in oClassInfo.

oClassInfo might contain the same kind of information as described in sap.fe.navigation.SelectionVariant.extend.

sap.ui.generic.app.navigation.service.SelectionVariant.getFilterContextUrl

Gets the current context URL intended for the filters.

sap.ui.generic.app.navigation.service.SelectionVariant.getID

Returns the identification of the selection variant.

sap.ui.generic.app.navigation.service.SelectionVariant.getMetadata

Returns a metadata object for class sap.ui.generic.app.navigation.service.SelectionVariant.

sap.ui.generic.app.navigation.service.SelectionVariant.getParameter

Returns the value of the parameter called sName if it has been set. If the parameter has never been set or has been removed, undefined is returned.

sap.ui.generic.app.navigation.service.SelectionVariant.getParameterContextUrl

Gets the current context URL intended for the parameters.

sap.ui.generic.app.navigation.service.SelectionVariant.getParameterNames

Returns the set of parameter names available in this selection variant

sap.ui.generic.app.navigation.service.SelectionVariant.getPropertyNames

Returns the names of the parameter and select option properties available for this instance.

sap.ui.generic.app.navigation.service.SelectionVariant.getSelectOption

Returns the set of select options/ranges available for a given property name.

sap.ui.generic.app.navigation.service.SelectionVariant.getSelectOptionsPropertyNames

Returns the names of the properties available for this instance.

sap.ui.generic.app.navigation.service.SelectionVariant.getText

Returns the current text / description of this selection variant.

sap.ui.generic.app.navigation.service.SelectionVariant.getValue

First tries to retrieve the set of select options/ranges available for sName as property name. If successful, this array of selections is being returned. If it fails, an attempt to find a parameter, whose name is sName, is made. If the latter succeeds, the single value is converted to fit into an array of selections to make it type compatible with ranges. This array is then returned.
If neither a select option nor a parameter could be found, undefined is returned.

sap.ui.generic.app.navigation.service.SelectionVariant.isEmpty

Returns true if the selection variant does neither contain parameters nor ranges.

sap.ui.generic.app.navigation.service.SelectionVariant.massAddSelectOption

Adds a set of select options to the list of select options for a given parameter.

sap.ui.generic.app.navigation.service.SelectionVariant.removeParameter

Removes a parameter called sName from the selection variant.

sap.ui.generic.app.navigation.service.SelectionVariant.removeSelectOption

Removes a select option called sName from the selection variant.

sap.ui.generic.app.navigation.service.SelectionVariant.renameParameter

Renames a parameter called sNameOld to sNameNew. If a parameter or a select option with the name sNameNew already exist, an error is thrown. If a parameter with the name sNameOld does not exist, nothing is changed.

sap.ui.generic.app.navigation.service.SelectionVariant.renameSelectOption

Renames a select option called sNameOld to sNameNew. If a select option or a parameter with the name sNameNew already exist, an error is thrown. If a select option with the name sNameOld does not exist, nothing is changed.

sap.ui.generic.app.navigation.service.SelectionVariant.setFilterContextUrl

Sets the context URL intended for the filters.

sap.ui.generic.app.navigation.service.SelectionVariant.setID

Sets the identification of the selection variant.

sap.ui.generic.app.navigation.service.SelectionVariant.setParameterContextUrl

Sets the context URL intended for the parameters.

sap.ui.generic.app.navigation.service.SelectionVariant.setText

Sets the text / description of the selection variant.

sap.ui.generic.app.navigation.service.SelectionVariant.toJSONObject

Returns the external representation of the selection variant as JSON object.

sap.ui.generic.app.navigation.service.SelectionVariant.toJSONString

Serializes this instance into a JSON-formatted string

sap.ui.generic.app.navigation.service.SelectionVariant.addParameter

Sets the value of a parameter called sName to the new value sValue. If the parameter has already been set before, its value is overwritten.

Param Type DefaultValue Description
sName string

The name of the parameter to be set; the null value is not allowed

sValue string

The value of the parameter to be set

sap.ui.generic.app.navigation.service.SelectionVariant.addSelectOption

Adds a new range to the list of select options for a given parameter.

Param Type DefaultValue Description
sPropertyName string

The name of the property for which the selection range is added

sSign string

The sign of the range (Include or Exclude)

sOption string

The option of the range (EQ for "equals", NE for "not equals", LE for "less or equals", GE for "greater or equals", LT for "less than" (and not equals), GT for "greater than" (and not equals), BT for "between", or CP for "contains pattern" (ABAP-styled pattern matching with the asterisk as wildcard)

sLow string

The single value or the lower boundary of the interval; the null value is not allowed

sHigh string

Set only if sOption is BT: the upper boundary of the interval; must be undefined or null in all other cases

sap.ui.generic.app.navigation.service.SelectionVariant.extend

Creates a new subclass of class sap.ui.generic.app.navigation.service.SelectionVariant with name sClassName and enriches it with the information contained in oClassInfo.

oClassInfo might contain the same kind of information as described in sap.fe.navigation.SelectionVariant.extend.

Param Type DefaultValue Description
sClassName string

Name of the class being created

oClassInfo object

Object literal with information about the class

FNMetaImpl function

Constructor function for the metadata object; if not given, it defaults to the metadata implementation used by this class

sap.ui.generic.app.navigation.service.SelectionVariant.getFilterContextUrl

Gets the current context URL intended for the filters.

sap.ui.generic.app.navigation.service.SelectionVariant.getID

Returns the identification of the selection variant.

sap.ui.generic.app.navigation.service.SelectionVariant.getMetadata

Returns a metadata object for class sap.ui.generic.app.navigation.service.SelectionVariant.

sap.ui.generic.app.navigation.service.SelectionVariant.getParameter

Returns the value of the parameter called sName if it has been set. If the parameter has never been set or has been removed, undefined is returned.

Param Type DefaultValue Description
sName string

The name of the parameter to be returned

sap.ui.generic.app.navigation.service.SelectionVariant.getParameterContextUrl

Gets the current context URL intended for the parameters.

sap.ui.generic.app.navigation.service.SelectionVariant.getParameterNames

Returns the set of parameter names available in this selection variant

sap.ui.generic.app.navigation.service.SelectionVariant.getPropertyNames

Returns the names of the parameter and select option properties available for this instance.

sap.ui.generic.app.navigation.service.SelectionVariant.getSelectOption

Returns the set of select options/ranges available for a given property name.

Param Type DefaultValue Description
sPropertyName string

The name of the property for which the set of select options/ranges is returned

sap.ui.generic.app.navigation.service.SelectionVariant.getSelectOptionsPropertyNames

Returns the names of the properties available for this instance.

sap.ui.generic.app.navigation.service.SelectionVariant.getText

Returns the current text / description of this selection variant.

sap.ui.generic.app.navigation.service.SelectionVariant.getValue

First tries to retrieve the set of select options/ranges available for sName as property name. If successful, this array of selections is being returned. If it fails, an attempt to find a parameter, whose name is sName, is made. If the latter succeeds, the single value is converted to fit into an array of selections to make it type compatible with ranges. This array is then returned.
If neither a select option nor a parameter could be found, undefined is returned.

Param Type DefaultValue Description
sName string

The name of the attribute for which the value is retrieved

sap.ui.generic.app.navigation.service.SelectionVariant.isEmpty

Returns true if the selection variant does neither contain parameters nor ranges.

sap.ui.generic.app.navigation.service.SelectionVariant.massAddSelectOption

Adds a set of select options to the list of select options for a given parameter.

Param Type DefaultValue Description
sPropertyName string

The name of the property for which the set of select options is added

aSelectOptions array

Set of select options to be added

sap.ui.generic.app.navigation.service.SelectionVariant.removeParameter

Removes a parameter called sName from the selection variant.

Param Type DefaultValue Description
sName string

The name of the parameter to be removed

sap.ui.generic.app.navigation.service.SelectionVariant.removeSelectOption

Removes a select option called sName from the selection variant.

Param Type DefaultValue Description
sName string

The name of the select option to be removed

sap.ui.generic.app.navigation.service.SelectionVariant.renameParameter

Renames a parameter called sNameOld to sNameNew. If a parameter or a select option with the name sNameNew already exist, an error is thrown. If a parameter with the name sNameOld does not exist, nothing is changed.

Param Type DefaultValue Description
sNameOld string

The current name of the parameter to be renamed

sNameNew string

The new name of the parameter

sap.ui.generic.app.navigation.service.SelectionVariant.renameSelectOption

Renames a select option called sNameOld to sNameNew. If a select option or a parameter with the name sNameNew already exist, an error is thrown. If a select option with the name sNameOld does not exist, nothing is changed.

Param Type DefaultValue Description
sNameOld string

The current name of the select option property to be renamed

sNameNew string

The new name of the select option property

sap.ui.generic.app.navigation.service.SelectionVariant.setFilterContextUrl

Sets the context URL intended for the filters.

Param Type DefaultValue Description
sURL string

The URL of the filters

sap.ui.generic.app.navigation.service.SelectionVariant.setID

Sets the identification of the selection variant.

Param Type DefaultValue Description
sId string

The new identification of the selection variant

sap.ui.generic.app.navigation.service.SelectionVariant.setParameterContextUrl

Sets the context URL intended for the parameters.

Param Type DefaultValue Description
sURL string

The URL of the parameter context

sap.ui.generic.app.navigation.service.SelectionVariant.setText

Sets the text / description of the selection variant.

Param Type DefaultValue Description
sNewText string

The new description to be used

sap.ui.generic.app.navigation.service.SelectionVariant.toJSONObject

Returns the external representation of the selection variant as JSON object.

sap.ui.generic.app.navigation.service.SelectionVariant.toJSONString

Serializes this instance into a JSON-formatted string