Class sap.ushell.services.PersonalizationContainerVariantSetModule: sap/ushell/services/Personalization
The personalization variant set contains variants of personalization data. It is used in the personalization container mode.
Since: 1.18.0.
Constructor Summary
new sap.ushell.services.PersonalizationContainerVariantSet()To be called by the personalization container.
Method Summary
Constructor Detail
Method Detail
addVariant(sVariantSetName): object
Creates a new variant in the variant set. In case a variant with this name is already existing an exception is thrown.
Parameters:
{string} | sVariantSetName | variant set name |
- Since:
- 1.18.0
Returns:
{object} | sap.ushell.services.PersonalizationContainerVariant |
containsVariant(sVariantKey): boolean
Checks if a specific variant is contained in the variant set.
Parameters:
{string} | sVariantKey | variant key |
- Since:
- 1.18.0
Returns:
{boolean} | true if the variant set contains a variant with the key |
delVariant(sVariantKey)
Deletes a variant from the variant set. In case the variant does not exist nothing happens.
Parameters:
{string} | sVariantKey | variant key |
- Since:
- 1.18.0
getCurrentVariantKey(): string
Returns the current variant key.
- Since:
- 1.18.0
Returns:
{string} | current variant key. In case the current variant was never set null is returned. |
getVariant(sVariantKey): object
Returns a variant object.
Parameters:
{string} | sVariantKey | variant key |
- Since:
- 1.18.0
Returns:
{object} | sap.ushell.services.PersonalizationContainerVariant. In case the variant set does not contain a variant with this key undefined is returned. |
getVariantKeyByName(sVariantName): object
Returns the variant key corresponding to a variant name.
Parameters:
{string} | sVariantName | variant name |
- Since:
- 1.18.0
Returns:
{object} | variant key. In case the variant set does not contain a variant with this name undefined is returned. |