-
- 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 BooleangetUseCcpa()final BooleangetExcludeBulkConsentButtons()If true, only Save button should be displayed final Set<Vendor>getRequiredVendorsLegInt()final MutableLiveData<Purpose>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 SpannedgetPurposesMessageText()final StringgetScrollIndicatorText()final StringgetSaveAndCloseButtonTitle()final StringgetAccessibilitySaveButtonActionDescription()final StringgetAccessibilityCloseDescription()final AccessibilitygetCloseDetailsButtonAccessibility()final StringgetAccessibilityClosePurposesActionDescription()final StringgetAccessibilitySavePurposeDetailActionDescription()final StringgetSaveButtonLabel()final StringgetTitle()final StringgetAccessibilityHintForPurposes()final StringgetVendorsButtonLabel()final StringgetViewAllText()final StringgetAllPurposesText()final StringgetSaveButtonDescriptionText()final StringgetYouAllowText()final DidomiToggle.StategetBulkActionState()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 SpannablegetAdditionalDataProcessingText(PurposeAdapter.PurposeCallback callback)Get the 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(PurposeAdapter.PurposeCallback callback)Build Purpose display items list final List<PurposeDisplay>updatePurposeDisplayList(Boolean accessibilityAnnounceState)final List<PurposeDisplayItem>createPurposeDisplayItemList()Build Purpose and Category list items List<Purpose>initializePurposesForPresentation()Refresh prepared purposes for presentation to the user. final List<Purpose>preparePurposesForPresentation()Prepare purposes for presentation to the user. final UnittriggerEvent(Event event)Trigger an (app) event. final PurposegetPurposeById(String id)final PurposeCategorygetCategoryById(String id)final Set<Purpose>getEnabledPurposesWithoutPersonalData()Get a set that contains the purposes enabled, excluding Personal Data. final Set<Purpose>getDisabledPurposesWithoutPersonalData()Get a set that contains the purposes disabled, excluding Personal Data. final Set<Purpose>getEnabledPurposes()Get a set that contains the purposes enabled. final Set<Purpose>getDisabledPurposes()Get a set that contains the purposes disabled. final Set<Purpose>getEnabledLegitimatePurposes()Get a set that contains the legitimate purposes enabled. final Set<Purpose>getDisabledLegitimatePurposes()Get a set that contains the legitimate purposes disabled. final Set<Vendor>getEnabledVendorsConsent()Getter method for the enabledVendors array. final Set<Vendor>getDisabledVendorsConsent()Getter method for the disabledVendors array. final Set<Vendor>getEnabledVendorsLegInt()Retrieve the list of enabled legitimate interest vendors (all vendors with legitimate interest not disabled) final Set<Vendor>getDisabledVendorsLegInt()Get the list of disabled legitimate interest vendors final StringgetPurposeName(Purpose purpose)Get the name of a purpose. final StringgetPurposeDescription(Purpose purpose)Get the description of a purpose. 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 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(Purpose purpose)Add a purpose to the enabled purposes array and remove it from the disabled purposes array. final UnitdisablePurpose(Purpose purpose)Add a purpose to the disabled purposes array and remove it from the enabled purposes array. final UnitunsetPurpose(Purpose purpose)Remove a purposes from both disabled and enabled purposes. final UnitenableLegitimatePurpose(Purpose purpose)Add a purpose to the enabled legitimate purposes array and remove it from the disabled legitimate purposes array. final UnitdisableLegitimatePurpose(Purpose purpose)Add a purpose to the disabled legitimate purposes array and remove it from the enabled legitimate purposes array. final BooleanisLegitimatePurposeEnabled(Purpose 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(Purpose 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(Purpose purpose)Get the status of a vendor final UnitsetSelectedPurposeLegIntState(DidomiToggle.State selectedPurposeLegIntState)final UnitinitializeSelectedPurposeStates(Purpose selectedPurpose)final UnitinitializeSelectedCategory(PurposeCategory selectedCategory)final BooleanshouldHandleLegitimateInterestState(Purpose purpose)final BooleanshouldHandleConsentState(Purpose purpose)final BooleanshouldDisplaySwitchesSeparator(Purpose purpose)Whether UI should display a separator between the consent and legitimate interest switches final UnitonAgreeAllButtonClicked()final UnitonDisagreeAllButtonClicked()final UnitonSaveButtonClicked()final UnitonDismissButtonClicked()final UnitonViewCancelled()final UnitonPurposeSwitchToggled(Purpose purpose, DidomiToggle.State state)final UnitonPurposeDetailConsentSwitchToggled(Purpose purpose, DidomiToggle.State state)final UnitonPurposeDetailLegIntSwitchToggled(Purpose purpose, DidomiToggle.State state)final UnitonCategorySwitchToggled(PurposeCategory category, DidomiToggle.State state)final UnitonPurposeConsentChanged(Purpose purpose, DidomiToggle.State consentStatus)final UnitonPurposeLegIntChanged(Purpose 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<Purpose> enabledPurposes, Set<Purpose> disabledPurposes, Set<Purpose> enabledLegitimatePurposes, Set<Purpose> 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
-
getUseCcpa
final Boolean getUseCcpa()
-
getExcludeBulkConsentButtons
final Boolean getExcludeBulkConsentButtons()
If true, only Save button should be displayed
-
getRequiredVendorsLegInt
final Set<Vendor> getRequiredVendorsLegInt()
-
getSelectedPurpose
final MutableLiveData<Purpose> 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()
-
getPurposesMessageText
final Spanned getPurposesMessageText()
-
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()
-
getViewAllText
final String getViewAllText()
-
getAllPurposesText
final String getAllPurposesText()
-
getSaveButtonDescriptionText
final String getSaveButtonDescriptionText()
-
getYouAllowText
final String getYouAllowText()
-
getBulkActionState
final DidomiToggle.State getBulkActionState()
-
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
-
getAdditionalDataProcessingText
final Spannable getAdditionalDataProcessingText(PurposeAdapter.PurposeCallback callback)
Get the text for the additional data processing section
- Parameters:
callback- callback to call when an additional data processing is clicked
-
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(PurposeAdapter.PurposeCallback callback)
Build Purpose display items list
- Parameters:
callback- the call back for additional data processing info as PurposeAdapter.PurposeCallback
-
updatePurposeDisplayList
final List<PurposeDisplay> updatePurposeDisplayList(Boolean accessibilityAnnounceState)
-
createPurposeDisplayItemList
final List<PurposeDisplayItem> createPurposeDisplayItemList()
Build Purpose and Category list items
-
initializePurposesForPresentation
List<Purpose> initializePurposesForPresentation()
Refresh prepared purposes for presentation to the user. It is used when device language changes.
-
preparePurposesForPresentation
final List<Purpose> 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 Purpose getPurposeById(String id)
-
getCategoryById
final PurposeCategory getCategoryById(String id)
-
getEnabledPurposesWithoutPersonalData
final Set<Purpose> getEnabledPurposesWithoutPersonalData()
Get a set that contains the purposes enabled, excluding Personal Data.
-
getDisabledPurposesWithoutPersonalData
final Set<Purpose> getDisabledPurposesWithoutPersonalData()
Get a set that contains the purposes disabled, excluding Personal Data.
-
getEnabledPurposes
final Set<Purpose> getEnabledPurposes()
Get a set that contains the purposes enabled.
-
getDisabledPurposes
final Set<Purpose> getDisabledPurposes()
Get a set that contains the purposes disabled.
-
getEnabledLegitimatePurposes
final Set<Purpose> getEnabledLegitimatePurposes()
Get a set that contains the legitimate purposes enabled.
-
getDisabledLegitimatePurposes
final Set<Purpose> getDisabledLegitimatePurposes()
Get a set that contains the legitimate purposes disabled.
-
getEnabledVendorsConsent
final Set<Vendor> getEnabledVendorsConsent()
Getter method for the enabledVendors array.
-
getDisabledVendorsConsent
final Set<Vendor> getDisabledVendorsConsent()
Getter method for the disabledVendors array.
-
getEnabledVendorsLegInt
final Set<Vendor> getEnabledVendorsLegInt()
Retrieve the list of enabled legitimate interest vendors (all vendors with legitimate interest not disabled)
-
getDisabledVendorsLegInt
final Set<Vendor> getDisabledVendorsLegInt()
Get the list of disabled legitimate interest vendors
-
getPurposeName
final String getPurposeName(Purpose purpose)
Get the name of a purpose.
- Parameters:
purpose- purpose to get the translated name from.
-
getPurposeDescription
final String getPurposeDescription(Purpose purpose)
Get the description of a purpose.
- Parameters:
purpose- Purpose to get the description from.
-
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.
-
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(Purpose 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(Purpose 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(Purpose purpose)
Remove a purposes from both disabled and enabled purposes.
- Parameters:
purpose- purpose to update.
-
enableLegitimatePurpose
final Unit enableLegitimatePurpose(Purpose 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(Purpose 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(Purpose 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(Purpose 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(Purpose purpose)
Get the status of a vendor
- Parameters:
purpose- affected purpose
-
setSelectedPurposeLegIntState
final Unit setSelectedPurposeLegIntState(DidomiToggle.State selectedPurposeLegIntState)
-
initializeSelectedPurposeStates
final Unit initializeSelectedPurposeStates(Purpose selectedPurpose)
-
initializeSelectedCategory
final Unit initializeSelectedCategory(PurposeCategory selectedCategory)
-
shouldHandleLegitimateInterestState
final Boolean shouldHandleLegitimateInterestState(Purpose purpose)
-
shouldHandleConsentState
final Boolean shouldHandleConsentState(Purpose purpose)
-
shouldDisplaySwitchesSeparator
final Boolean shouldDisplaySwitchesSeparator(Purpose purpose)
Whether UI should display a separator between the consent and legitimate interest switches
- Parameters:
purpose- displayed 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(Purpose purpose, DidomiToggle.State state)
-
onPurposeDetailConsentSwitchToggled
final Unit onPurposeDetailConsentSwitchToggled(Purpose purpose, DidomiToggle.State state)
-
onPurposeDetailLegIntSwitchToggled
final Unit onPurposeDetailLegIntSwitchToggled(Purpose purpose, DidomiToggle.State state)
-
onCategorySwitchToggled
final Unit onCategorySwitchToggled(PurposeCategory category, DidomiToggle.State state)
-
onPurposeConsentChanged
final Unit onPurposeConsentChanged(Purpose purpose, DidomiToggle.State consentStatus)
-
onPurposeLegIntChanged
final Unit onPurposeLegIntChanged(Purpose 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<Purpose> enabledPurposes, Set<Purpose> disabledPurposes, Set<Purpose> enabledLegitimatePurposes, Set<Purpose> 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()
-
-
-
-