Class PurposesViewModel
-
- All Implemented Interfaces:
@Singleton() public class PurposesViewModel extends ViewModelView model associated to the purposes fragment/adapter. We should use this class to separate the business logic from the purposes view.
-
-
Field Summary
-
Constructor Summary
Constructors Constructor Description PurposesViewModel(ApiEventsRepository apiEventsRepository, ConfigurationRepository configurationRepository, ConsentRepository consentRepository, ContextHelper contextHelper, EventsRepository eventsRepository, LanguagesHelper languagesHelper, UserChoicesInfoProvider userChoicesInfoProvider, UserStatusRepository userStatusRepository, UIProvider uiProvider, VendorRepository vendorRepository, LogoProvider logoProvider, NavigationManager navigationManager)
-
Method Summary
Modifier and Type Method Description final BooleangetExcludeBulkConsentButtons()If true, only Save button should be displayed final Set<InternalVendor>getRequiredVendorsLegInt()final MutableLiveData<InternalPurpose>getSelectedPurpose()final MutableLiveData<PurposeCategory>getSelectedCategory()final BooleangetUsePurposeTitleInPurposeCategory()final BooleangetDisableButtonsUntilScroll()final BooleangetShouldConsentBeCollected()final BooleangetHasScrolledToTheBottom()final UnitsetHasScrolledToTheBottom(Boolean hasScrolledToTheBottom)final MutableLiveData<DidomiToggle.State>getSelectedPurposeConsentState()final MutableLiveData<DidomiToggle.State>getSelectedPurposeLegIntState()final MutableLiveData<DidomiToggle.State>getSelectedCategoryState()final BooleangetCanCloseWhenConsentIsMissing()Get the canCloseWhenConsentIsMissing flag. final BooleangetShowWhenConsentIsMissing()Get the showWhenConsentIsMissing flag. final BooleangetShouldBeCancelable()Determine if the purposes view should be cancelable or not. final BooleanisSpecialFeature()final StringgetAgreeButtonLabel()final StringgetAccessibilityAgreeButtonActionDescription()final StringgetConsentToggleText()final StringgetDisagreeButtonLabel()final StringgetDisagreeButtonAccessibilityActionDescription()StringgetEssentialPurposeText()final StringgetLegitimateInterestToggleText()final StringgetPurposeDescriptionLegal()final List<String>getIllustrations()StringgetIllustrationsHeaderLabel()final StringgetPurposesMessageRawText()final StringgetScrollIndicatorText()final StringgetSaveAndCloseButtonTitle()final StringgetAccessibilitySaveButtonActionDescription()final StringgetAccessibilityCloseDescription()final AccessibilitygetCloseDetailsButtonAccessibility()final StringgetAccessibilityClosePurposesActionDescription()final StringgetAccessibilitySavePurposeDetailActionDescription()final StringgetSaveButtonLabel()final StringgetTitle()final StringgetAccessibilityHintForPurposes()final StringgetVendorsButtonLabel()final StringgetSaveButtonDescriptionText()final StringgetYouAllowText()final DidomiToggle.StategetBulkActionState()final BooleanisSaveButtonEnabled()final UIProvidergetUiProvider()final VendorRepositorygetVendorRepository()final LogoProvidergetLogoProvider()final BooleanshouldDisplayDividerForCategoryHeader(PurposeCategory category)Whether a divider should be display below the category header final UnitupdateConsentState()Initialize view consent state (enabled / disabled vendors and purposes) from the consent token, if state was not initialized yet final BooleanshouldShowAdditionalDataProcessing()Whether the Additional data processing section should be shown or not We show it if we have at least one required special purpose or feature final StringgetAdditionalDataProcessingSectionDescription()Text for the additional data processing section final List<DataProcessing>getSortedAdditionalDataProcessingList()Required Additional data processing sorted by name final List<PurposeDisplay>createPurposeDisplayListForCategory(PurposeCategory category)Build Purpose Category display items list final List<PurposeDisplay>updatePurposeCategoryDisplayList(PurposeCategory category, Boolean accessibilityAnnounceState)final List<PurposeDisplay>createPurposeDisplayList()Build Purpose display items list final List<PurposeDisplay>updatePurposeDisplayList(Boolean accessibilityAnnounceState)final List<PurposeDisplayItem>createPurposeDisplayItemList()Build Purpose and Category list items List<InternalPurpose>initializePurposesForPresentation()Refresh prepared purposes for presentation to the user. final List<InternalPurpose>preparePurposesForPresentation()Prepare purposes for presentation to the user. final UnittriggerEvent(Event event)Trigger an (app) event. final InternalPurposegetPurposeById(String id)final PurposeCategorygetCategoryById(String id)final Set<InternalPurpose>getEnabledPurposesWithoutPersonalData()Get a set that contains the purposes enabled, excluding Personal Data. final Set<InternalPurpose>getDisabledPurposesWithoutPersonalData()Get a set that contains the purposes disabled, excluding Personal Data. final Set<InternalPurpose>getEnabledPurposes()Get a set that contains the purposes enabled. final Set<InternalPurpose>getDisabledPurposes()Get a set that contains the purposes disabled. final Set<InternalPurpose>getEnabledLegitimatePurposes()Get a set that contains the legitimate purposes enabled. final Set<InternalPurpose>getDisabledLegitimatePurposes()Get a set that contains the legitimate purposes disabled. final Set<InternalVendor>getEnabledVendorsConsent()Getter method for the enabledVendors array. final Set<InternalVendor>getDisabledVendorsConsent()Getter method for the disabledVendors array. final Set<InternalVendor>getEnabledVendorsLegInt()Retrieve the list of enabled legitimate interest vendors (all vendors with legitimate interest not disabled) final Set<InternalVendor>getDisabledVendorsLegInt()Get the list of disabled legitimate interest vendors final StringgetPurposeName(InternalPurpose purpose)Get the name of a purpose. final StringgetPurposeDescription(InternalPurpose purpose)Get the description of a purpose. final BooleanselectedPurposeHasConsentSection()Whether selected purpose is linked to vendors as Consent final BooleanselectedPurposeHasLegIntSection()Whether selected purpose is linked to vendors as Legitimate Interest final StringgetCategoryName(PurposeCategory category)Get the name of a category. final BooleanshouldShowDescriptionLegal()Indicate if description legal should be shown. final StringgetDataProcessingDescription(DataProcessing dataProcessing)Get the description of a data processing. final StringgetDataProcessingDescriptionLegal(DataProcessing dataProcessing)Get the legal description of a data processing. final StringgetVendorsCountLabel(InternalPurpose purpose)Get the label for the count of vendors associated with a purpose final StringgetVendorsCountLabelForConsent(InternalPurpose purpose)Get the label for the count of vendors associated with a consent purpose final StringgetVendorsCountLabelForLegitimateInterest(InternalPurpose purpose)Get the label for the count of vendors associated with a LI purpose final BooleanenabledPlusDisabledEqualRequired()Check if the number of enabled and disabled purposes is equal to the number of required purposes. final BooleannoPurposeIsDefined()Check if no purpose has been defined (unknown). final BooleanareAllPurposesDefinedForCategory(PurposeCategory category)final BooleanisCategoryEssential(PurposeCategory purposeCategory)Check if PurposeCategory contains only essential purposes final BooleanshouldSuggestScrolling()Check if the UI should suggest scrolling. final UnitdisableAll()Disable all purposes and update disabled vendors based on enabled vendors. final UnitenablePurpose(InternalPurpose purpose)Add a purpose to the enabled purposes array and remove it from the disabled purposes array. final UnitdisablePurpose(InternalPurpose purpose)Add a purpose to the disabled purposes array and remove it from the enabled purposes array. final UnitunsetPurpose(InternalPurpose purpose)Remove a purposes from both disabled and enabled purposes. final UnitenableLegitimatePurpose(InternalPurpose purpose)Add a purpose to the enabled legitimate purposes array and remove it from the disabled legitimate purposes array. final UnitdisableLegitimatePurpose(InternalPurpose purpose)Add a purpose to the disabled legitimate purposes array and remove it from the enabled legitimate purposes array. final BooleanisLegitimatePurposeEnabled(InternalPurpose purpose)final UnitloadEnabledVendors()Load enabled vendors (that are enabled or undefined). final BooleanshouldHideDidomiLogo(Boolean isMainScreen)Check if Didomi logo should be hidden. final BooleanshouldAllowDismiss()Check if user should be able to dismiss purposes screen. final BooleanareAllPurposesEnabled()final BooleanisAnyPurposeEnabled()UnitupdateVendorsAndSaveConsent()Save a customized vendors and purposes final UnitresetSelectedPurpose()final UnitsetSelectedPurpose(InternalPurpose item)Setter method for the selectedPurpose. final UnitsetSelectedPurposeConsentState(DidomiToggle.State value)Setter method for the selectedPurposeConsentState. final UnitsetSelectedCategory(PurposeCategory item)Setter method for the selectedCategory. final DidomiToggle.StategetCategoryState(PurposeCategory category)final DidomiToggle.StategetPurposeSwitchStatus(InternalPurpose purpose)Get the status of a vendor final UnitsetSelectedPurposeLegIntState(DidomiToggle.State selectedPurposeLegIntState)final UnitinitializeSelectedPurposeStates(InternalPurpose selectedPurpose)final UnitinitializeSelectedCategory(PurposeCategory selectedCategory)final BooleanshouldHandleLegitimateInterestState(InternalPurpose purpose)final BooleanshouldHandleConsentState(InternalPurpose purpose)final UnitonAgreeAllButtonClicked()final UnitonDisagreeAllButtonClicked()final UnitonSaveButtonClicked()final UnitonDismissButtonClicked()final UnitonViewCancelled()final UnitonPurposeSwitchToggled(InternalPurpose purpose, DidomiToggle.State state)final UnitonPurposeDetailConsentSwitchToggled(InternalPurpose purpose, DidomiToggle.State state)final UnitonPurposeDetailLegIntSwitchToggled(InternalPurpose purpose, DidomiToggle.State state)final UnitonCategorySwitchToggled(PurposeCategory category, DidomiToggle.State state)final UnitonPurposeConsentChanged(InternalPurpose purpose, DidomiToggle.State consentStatus)final UnitonPurposeLegIntChanged(InternalPurpose purpose, DidomiToggle.State legIntState)final UnitonBulkPurposesSwitchWasToggled(DidomiToggle.State state)final UnitonCategoryDetailScreenLoaded()final UnitonPurposeDetailScreenLoaded()final UnitonCategoryDetailScreenCloseClicked()final UnitonPurposeDetailScreenCloseClicked()final BooleanisSelectedPurposeEssential()final BooleanisSelectedPurposeDefined()This function checks if there any choice made with regards to consent status of this purpose final AccessibilitygetSelectedPurposeConsentAccessibility()Accessibility information for purpose details Consent switch final AccessibilitygetSelectedPurposeLegIntAccessibility()Accessibility information for purpose details Legitimate Interest switch final UnitsaveConsent()Save consent. final UnitupdatePurposesStatus(Set<InternalPurpose> enabledPurposes, Set<InternalPurpose> disabledPurposes, Set<InternalPurpose> enabledLegitimatePurposes, Set<InternalPurpose> disabledLegitimatePurposes)Update enabled and disabled purposes. final UnitenableAllVendorUnselected()Enable vendors not selected by the user. final UnitdisableAllVendorUnselected()Disable vendors not enabled by the user. final UnitenableAllVendorLegIntUnselected()Enable legitimate interest for vendors not disabled by the user. final UnitdisableAllVendorLegIntUnselected()Disable legitimate interest for vendors not enabled by the user. final UnitenableAll()Enable all purposes and update disabled vendors based on enabled vendors. final UnitenableAllConsentPurposes()Enable all purposes. final UnitenableAllConsentPurposesExceptEssentials()Enable all purposes except essential ones. final UnitmixAllConsentPurposes()Mix all purposes. final UnitdisableAllConsentPurposes()Disable all purposes. final UnitdisableAllConsentPurposesExceptEssentials()Disable all purposes except essential ones. final UnitenableAllLegitimatePurposes()Enable all legitimate purposes. final UnitonPurposeWasShown()-
-
Constructor Detail
-
PurposesViewModel
PurposesViewModel(ApiEventsRepository apiEventsRepository, ConfigurationRepository configurationRepository, ConsentRepository consentRepository, ContextHelper contextHelper, EventsRepository eventsRepository, LanguagesHelper languagesHelper, UserChoicesInfoProvider userChoicesInfoProvider, UserStatusRepository userStatusRepository, UIProvider uiProvider, VendorRepository vendorRepository, LogoProvider logoProvider, NavigationManager navigationManager)
-
-
Method Detail
-
getExcludeBulkConsentButtons
final Boolean getExcludeBulkConsentButtons()
If true, only Save button should be displayed
-
getRequiredVendorsLegInt
final Set<InternalVendor> getRequiredVendorsLegInt()
-
getSelectedPurpose
final MutableLiveData<InternalPurpose> getSelectedPurpose()
-
getSelectedCategory
final MutableLiveData<PurposeCategory> getSelectedCategory()
-
getUsePurposeTitleInPurposeCategory
final Boolean getUsePurposeTitleInPurposeCategory()
-
getDisableButtonsUntilScroll
final Boolean getDisableButtonsUntilScroll()
-
getShouldConsentBeCollected
final Boolean getShouldConsentBeCollected()
-
getHasScrolledToTheBottom
final Boolean getHasScrolledToTheBottom()
-
setHasScrolledToTheBottom
final Unit setHasScrolledToTheBottom(Boolean hasScrolledToTheBottom)
-
getSelectedPurposeConsentState
final MutableLiveData<DidomiToggle.State> getSelectedPurposeConsentState()
-
getSelectedPurposeLegIntState
final MutableLiveData<DidomiToggle.State> getSelectedPurposeLegIntState()
-
getSelectedCategoryState
final MutableLiveData<DidomiToggle.State> getSelectedCategoryState()
-
getCanCloseWhenConsentIsMissing
final Boolean getCanCloseWhenConsentIsMissing()
Get the canCloseWhenConsentIsMissing flag.
-
getShowWhenConsentIsMissing
final Boolean getShowWhenConsentIsMissing()
Get the showWhenConsentIsMissing flag.
-
getShouldBeCancelable
final Boolean getShouldBeCancelable()
Determine if the purposes view should be cancelable or not.
-
isSpecialFeature
final Boolean isSpecialFeature()
-
getAgreeButtonLabel
final String getAgreeButtonLabel()
-
getAccessibilityAgreeButtonActionDescription
final String getAccessibilityAgreeButtonActionDescription()
-
getConsentToggleText
final String getConsentToggleText()
-
getDisagreeButtonLabel
final String getDisagreeButtonLabel()
-
getDisagreeButtonAccessibilityActionDescription
final String getDisagreeButtonAccessibilityActionDescription()
-
getEssentialPurposeText
String getEssentialPurposeText()
-
getLegitimateInterestToggleText
final String getLegitimateInterestToggleText()
-
getPurposeDescriptionLegal
final String getPurposeDescriptionLegal()
-
getIllustrations
final List<String> getIllustrations()
-
getIllustrationsHeaderLabel
String getIllustrationsHeaderLabel()
-
getPurposesMessageRawText
final String getPurposesMessageRawText()
-
getScrollIndicatorText
final String getScrollIndicatorText()
-
getSaveAndCloseButtonTitle
final String getSaveAndCloseButtonTitle()
-
getAccessibilitySaveButtonActionDescription
final String getAccessibilitySaveButtonActionDescription()
-
getAccessibilityCloseDescription
final String getAccessibilityCloseDescription()
-
getCloseDetailsButtonAccessibility
final Accessibility getCloseDetailsButtonAccessibility()
-
getAccessibilityClosePurposesActionDescription
final String getAccessibilityClosePurposesActionDescription()
-
getAccessibilitySavePurposeDetailActionDescription
final String getAccessibilitySavePurposeDetailActionDescription()
-
getSaveButtonLabel
final String getSaveButtonLabel()
-
getAccessibilityHintForPurposes
final String getAccessibilityHintForPurposes()
-
getVendorsButtonLabel
final String getVendorsButtonLabel()
-
getSaveButtonDescriptionText
final String getSaveButtonDescriptionText()
-
getYouAllowText
final String getYouAllowText()
-
getBulkActionState
final DidomiToggle.State getBulkActionState()
-
isSaveButtonEnabled
final Boolean isSaveButtonEnabled()
-
getUiProvider
final UIProvider getUiProvider()
-
getVendorRepository
final VendorRepository getVendorRepository()
-
getLogoProvider
final LogoProvider getLogoProvider()
-
shouldDisplayDividerForCategoryHeader
final Boolean shouldDisplayDividerForCategoryHeader(PurposeCategory category)
Whether a divider should be display below the category header
-
updateConsentState
final Unit updateConsentState()
Initialize view consent state (enabled / disabled vendors and purposes) from the consent token, if state was not initialized yet
-
shouldShowAdditionalDataProcessing
final Boolean shouldShowAdditionalDataProcessing()
Whether the Additional data processing section should be shown or not We show it if we have at least one required special purpose or feature
-
getAdditionalDataProcessingSectionDescription
final String getAdditionalDataProcessingSectionDescription()
Text for the additional data processing section
-
getSortedAdditionalDataProcessingList
final List<DataProcessing> getSortedAdditionalDataProcessingList()
Required Additional data processing sorted by name
-
createPurposeDisplayListForCategory
final List<PurposeDisplay> createPurposeDisplayListForCategory(PurposeCategory category)
Build Purpose Category display items list
- Parameters:
category- the selected category as PurposeCategory
-
updatePurposeCategoryDisplayList
final List<PurposeDisplay> updatePurposeCategoryDisplayList(PurposeCategory category, Boolean accessibilityAnnounceState)
-
createPurposeDisplayList
final List<PurposeDisplay> createPurposeDisplayList()
Build Purpose display items list
-
updatePurposeDisplayList
final List<PurposeDisplay> updatePurposeDisplayList(Boolean accessibilityAnnounceState)
-
createPurposeDisplayItemList
final List<PurposeDisplayItem> createPurposeDisplayItemList()
Build Purpose and Category list items
-
initializePurposesForPresentation
List<InternalPurpose> initializePurposesForPresentation()
Refresh prepared purposes for presentation to the user. It is used when device language changes.
-
preparePurposesForPresentation
final List<InternalPurpose> preparePurposesForPresentation()
Prepare purposes for presentation to the user. This might change the order of the purposes, add icons, etc.
-
triggerEvent
final Unit triggerEvent(Event event)
Trigger an (app) event.
- Parameters:
event- event to be triggered.
-
getPurposeById
final InternalPurpose getPurposeById(String id)
-
getCategoryById
final PurposeCategory getCategoryById(String id)
-
getEnabledPurposesWithoutPersonalData
final Set<InternalPurpose> getEnabledPurposesWithoutPersonalData()
Get a set that contains the purposes enabled, excluding Personal Data.
-
getDisabledPurposesWithoutPersonalData
final Set<InternalPurpose> getDisabledPurposesWithoutPersonalData()
Get a set that contains the purposes disabled, excluding Personal Data.
-
getEnabledPurposes
final Set<InternalPurpose> getEnabledPurposes()
Get a set that contains the purposes enabled.
-
getDisabledPurposes
final Set<InternalPurpose> getDisabledPurposes()
Get a set that contains the purposes disabled.
-
getEnabledLegitimatePurposes
final Set<InternalPurpose> getEnabledLegitimatePurposes()
Get a set that contains the legitimate purposes enabled.
-
getDisabledLegitimatePurposes
final Set<InternalPurpose> getDisabledLegitimatePurposes()
Get a set that contains the legitimate purposes disabled.
-
getEnabledVendorsConsent
final Set<InternalVendor> getEnabledVendorsConsent()
Getter method for the enabledVendors array.
-
getDisabledVendorsConsent
final Set<InternalVendor> getDisabledVendorsConsent()
Getter method for the disabledVendors array.
-
getEnabledVendorsLegInt
final Set<InternalVendor> getEnabledVendorsLegInt()
Retrieve the list of enabled legitimate interest vendors (all vendors with legitimate interest not disabled)
-
getDisabledVendorsLegInt
final Set<InternalVendor> getDisabledVendorsLegInt()
Get the list of disabled legitimate interest vendors
-
getPurposeName
final String getPurposeName(InternalPurpose purpose)
Get the name of a purpose.
- Parameters:
purpose- purpose to get the translated name from.
-
getPurposeDescription
final String getPurposeDescription(InternalPurpose purpose)
Get the description of a purpose.
- Parameters:
purpose- InternalPurpose to get the description from.
-
selectedPurposeHasConsentSection
final Boolean selectedPurposeHasConsentSection()
Whether selected purpose is linked to vendors as Consent
-
selectedPurposeHasLegIntSection
final Boolean selectedPurposeHasLegIntSection()
Whether selected purpose is linked to vendors as Legitimate Interest
-
getCategoryName
final String getCategoryName(PurposeCategory category)
Get the name of a category.
- Parameters:
category- PurposeCategory to get the translated name from.
-
shouldShowDescriptionLegal
final Boolean shouldShowDescriptionLegal()
Indicate if description legal should be shown.
-
getDataProcessingDescription
final String getDataProcessingDescription(DataProcessing dataProcessing)
Get the description of a data processing.
- Parameters:
dataProcessing- data processing to get the description from.
-
getDataProcessingDescriptionLegal
final String getDataProcessingDescriptionLegal(DataProcessing dataProcessing)
Get the legal description of a data processing.
- Parameters:
dataProcessing- data processing to get the description from.
-
getVendorsCountLabel
final String getVendorsCountLabel(InternalPurpose purpose)
Get the label for the count of vendors associated with a purpose
-
getVendorsCountLabelForConsent
final String getVendorsCountLabelForConsent(InternalPurpose purpose)
Get the label for the count of vendors associated with a consent purpose
-
getVendorsCountLabelForLegitimateInterest
final String getVendorsCountLabelForLegitimateInterest(InternalPurpose purpose)
Get the label for the count of vendors associated with a LI purpose
-
enabledPlusDisabledEqualRequired
final Boolean enabledPlusDisabledEqualRequired()
Check if the number of enabled and disabled purposes is equal to the number of required purposes. Once the user toggles a Legitimate interest toggle, we should hide the Agree to all / Disagree to all buttons and switch to the Save button like we do with consent-based toggles (TCFv2 only).
-
noPurposeIsDefined
final Boolean noPurposeIsDefined()
Check if no purpose has been defined (unknown). NOTE: getEnabledLegitimatePurposes().size() == 0 || getEnabledLegitimatePurposes().size() == legitimatePurposes.size() - since by default LI purposes are enabled we need this statement to handle enable all button
-
areAllPurposesDefinedForCategory
final Boolean areAllPurposesDefinedForCategory(PurposeCategory category)
-
isCategoryEssential
final Boolean isCategoryEssential(PurposeCategory purposeCategory)
Check if PurposeCategory contains only essential purposes
- Parameters:
purposeCategory- the category to check
-
shouldSuggestScrolling
final Boolean shouldSuggestScrolling()
Check if the UI should suggest scrolling.
-
disableAll
final Unit disableAll()
Disable all purposes and update disabled vendors based on enabled vendors.
-
enablePurpose
final Unit enablePurpose(InternalPurpose purpose)
Add a purpose to the enabled purposes array and remove it from the disabled purposes array.
- Parameters:
purpose- purpose to update.
-
disablePurpose
final Unit disablePurpose(InternalPurpose purpose)
Add a purpose to the disabled purposes array and remove it from the enabled purposes array.
- Parameters:
purpose- purpose to update.
-
unsetPurpose
final Unit unsetPurpose(InternalPurpose purpose)
Remove a purposes from both disabled and enabled purposes.
- Parameters:
purpose- purpose to update.
-
enableLegitimatePurpose
final Unit enableLegitimatePurpose(InternalPurpose purpose)
Add a purpose to the enabled legitimate purposes array and remove it from the disabled legitimate purposes array.
- Parameters:
purpose- purpose to update.
-
disableLegitimatePurpose
final Unit disableLegitimatePurpose(InternalPurpose purpose)
Add a purpose to the disabled legitimate purposes array and remove it from the enabled legitimate purposes array.
- Parameters:
purpose- purpose to update.
-
isLegitimatePurposeEnabled
final Boolean isLegitimatePurposeEnabled(InternalPurpose purpose)
-
loadEnabledVendors
final Unit loadEnabledVendors()
Load enabled vendors (that are enabled or undefined).
-
shouldHideDidomiLogo
final Boolean shouldHideDidomiLogo(Boolean isMainScreen)
Check if Didomi logo should be hidden.
- Parameters:
isMainScreen- true if check is for the main preferences screen
-
shouldAllowDismiss
final Boolean shouldAllowDismiss()
Check if user should be able to dismiss purposes screen.
-
areAllPurposesEnabled
final Boolean areAllPurposesEnabled()
-
isAnyPurposeEnabled
final Boolean isAnyPurposeEnabled()
-
updateVendorsAndSaveConsent
Unit updateVendorsAndSaveConsent()
Save a customized vendors and purposes
-
resetSelectedPurpose
final Unit resetSelectedPurpose()
-
setSelectedPurpose
final Unit setSelectedPurpose(InternalPurpose item)
Setter method for the selectedPurpose. Sets the currently selected purpose.
-
setSelectedPurposeConsentState
final Unit setSelectedPurposeConsentState(DidomiToggle.State value)
Setter method for the selectedPurposeConsentState. Sets the currently selected purpose consent state.
-
setSelectedCategory
final Unit setSelectedCategory(PurposeCategory item)
Setter method for the selectedCategory. Sets the currently selected category.
-
getCategoryState
final DidomiToggle.State getCategoryState(PurposeCategory category)
-
getPurposeSwitchStatus
final DidomiToggle.State getPurposeSwitchStatus(InternalPurpose purpose)
Get the status of a vendor
- Parameters:
purpose- affected purpose
-
setSelectedPurposeLegIntState
final Unit setSelectedPurposeLegIntState(DidomiToggle.State selectedPurposeLegIntState)
-
initializeSelectedPurposeStates
final Unit initializeSelectedPurposeStates(InternalPurpose selectedPurpose)
-
initializeSelectedCategory
final Unit initializeSelectedCategory(PurposeCategory selectedCategory)
-
shouldHandleLegitimateInterestState
final Boolean shouldHandleLegitimateInterestState(InternalPurpose purpose)
-
shouldHandleConsentState
final Boolean shouldHandleConsentState(InternalPurpose purpose)
-
onAgreeAllButtonClicked
final Unit onAgreeAllButtonClicked()
-
onDisagreeAllButtonClicked
final Unit onDisagreeAllButtonClicked()
-
onSaveButtonClicked
final Unit onSaveButtonClicked()
-
onDismissButtonClicked
final Unit onDismissButtonClicked()
-
onViewCancelled
final Unit onViewCancelled()
-
onPurposeSwitchToggled
final Unit onPurposeSwitchToggled(InternalPurpose purpose, DidomiToggle.State state)
-
onPurposeDetailConsentSwitchToggled
final Unit onPurposeDetailConsentSwitchToggled(InternalPurpose purpose, DidomiToggle.State state)
-
onPurposeDetailLegIntSwitchToggled
final Unit onPurposeDetailLegIntSwitchToggled(InternalPurpose purpose, DidomiToggle.State state)
-
onCategorySwitchToggled
final Unit onCategorySwitchToggled(PurposeCategory category, DidomiToggle.State state)
-
onPurposeConsentChanged
final Unit onPurposeConsentChanged(InternalPurpose purpose, DidomiToggle.State consentStatus)
-
onPurposeLegIntChanged
final Unit onPurposeLegIntChanged(InternalPurpose purpose, DidomiToggle.State legIntState)
-
onBulkPurposesSwitchWasToggled
final Unit onBulkPurposesSwitchWasToggled(DidomiToggle.State state)
-
onCategoryDetailScreenLoaded
final Unit onCategoryDetailScreenLoaded()
-
onPurposeDetailScreenLoaded
final Unit onPurposeDetailScreenLoaded()
-
onCategoryDetailScreenCloseClicked
final Unit onCategoryDetailScreenCloseClicked()
-
onPurposeDetailScreenCloseClicked
final Unit onPurposeDetailScreenCloseClicked()
-
isSelectedPurposeEssential
final Boolean isSelectedPurposeEssential()
-
isSelectedPurposeDefined
final Boolean isSelectedPurposeDefined()
This function checks if there any choice made with regards to consent status of this purpose
-
getSelectedPurposeConsentAccessibility
final Accessibility getSelectedPurposeConsentAccessibility()
Accessibility information for purpose details Consent switch
-
getSelectedPurposeLegIntAccessibility
final Accessibility getSelectedPurposeLegIntAccessibility()
Accessibility information for purpose details Legitimate Interest switch
-
saveConsent
final Unit saveConsent()
Save consent.
-
updatePurposesStatus
final Unit updatePurposesStatus(Set<InternalPurpose> enabledPurposes, Set<InternalPurpose> disabledPurposes, Set<InternalPurpose> enabledLegitimatePurposes, Set<InternalPurpose> disabledLegitimatePurposes)
Update enabled and disabled purposes.
- Parameters:
enabledPurposes- enabled purposes to set.disabledPurposes- disabled purposes to set.enabledLegitimatePurposes- enabled legitimate interest purposes to set.disabledLegitimatePurposes- disabled legitimate interest purposes to set.
-
enableAllVendorUnselected
final Unit enableAllVendorUnselected()
Enable vendors not selected by the user.
-
disableAllVendorUnselected
final Unit disableAllVendorUnselected()
Disable vendors not enabled by the user.
-
enableAllVendorLegIntUnselected
final Unit enableAllVendorLegIntUnselected()
Enable legitimate interest for vendors not disabled by the user.
-
disableAllVendorLegIntUnselected
final Unit disableAllVendorLegIntUnselected()
Disable legitimate interest for vendors not enabled by the user.
-
enableAll
final Unit enableAll()
Enable all purposes and update disabled vendors based on enabled vendors.
-
enableAllConsentPurposes
final Unit enableAllConsentPurposes()
Enable all purposes.
-
enableAllConsentPurposesExceptEssentials
final Unit enableAllConsentPurposesExceptEssentials()
Enable all purposes except essential ones.
-
mixAllConsentPurposes
final Unit mixAllConsentPurposes()
Mix all purposes.
-
disableAllConsentPurposes
final Unit disableAllConsentPurposes()
Disable all purposes.
-
disableAllConsentPurposesExceptEssentials
final Unit disableAllConsentPurposesExceptEssentials()
Disable all purposes except essential ones.
-
enableAllLegitimatePurposes
final Unit enableAllLegitimatePurposes()
Enable all legitimate purposes.
-
onPurposeWasShown
final Unit onPurposeWasShown()
-
-
-
-