Package io.didomi.sdk.notice.mobile
Class ConsentNoticeViewModel
-
- All Implemented Interfaces:
public class ConsentNoticeViewModel extends ViewModel
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public final classConsentNoticeViewModel.NoticeAndPartnersPropertiesDescribes data displayed in notice text and partners button
-
Field Summary
Fields Modifier and Type Field Description private final BooleanuseCcpaprivate final AccessibilitycloseButtonAccessibilityprivate final AppConfiguration.Theme.ButtonFormatdenyButtonTypeprivate final BooleandenyCrossprivate final BooleandenyLinkprivate final BooleanhasManageSpiChoicesButtonprivate final StringmanageSpiChoicesButtonLabelprivate final StringagreeButtonLabelprivate final AccessibilityagreeButtonAccessibilityprivate final StringprivacyButtonLabelprivate final StringnoticeContentTextprivate final StringnoticeTitleprivate final ConsentNoticeViewModel.NoticeAndPartnersPropertiesnoticeAndPartnersPropertiesprivate final StringmanageOurPartnersLabelprivate final BooleanisTabletprivate final AccessibilitylearnMoreButtonAccessibilityprivate final CharSequencelearnMoreButtonLabelprivate final LogoProviderlogoProviderprivate final NavigationManagernavigationManager
-
Constructor Summary
Constructors Constructor Description ConsentNoticeViewModel(ApiEventsRepository apiEventsRepository, ConfigurationRepository configurationRepository, ConsentRepository consentRepository, EventsRepository eventsRepository, VendorRepository vendorRepository, ResourcesHelper resourcesHelper, LanguagesHelper languagesHelper, LogoProvider logoProvider, NavigationManager navigationManager)
-
Method Summary
-
-
Constructor Detail
-
ConsentNoticeViewModel
ConsentNoticeViewModel(ApiEventsRepository apiEventsRepository, ConfigurationRepository configurationRepository, ConsentRepository consentRepository, EventsRepository eventsRepository, VendorRepository vendorRepository, ResourcesHelper resourcesHelper, LanguagesHelper languagesHelper, LogoProvider logoProvider, NavigationManager navigationManager)
-
-
Method Detail
-
getUseCcpa
final Boolean getUseCcpa()
-
getCloseButtonAccessibility
final Accessibility getCloseButtonAccessibility()
-
getDenyButtonType
final AppConfiguration.Theme.ButtonFormat getDenyButtonType()
Get the type of disagree button among NONE, SECONDARY, PRIMARY
-
getDenyCross
final Boolean getDenyCross()
Is Deny Cross should be enabled
-
getDenyLink
final Boolean getDenyLink()
Is Deny Link should be enabled
-
getHasManageSpiChoicesButton
final Boolean getHasManageSpiChoicesButton()
Whether the Manage SPI Choices button should be displayed
-
getManageSpiChoicesButtonLabel
final String getManageSpiChoicesButtonLabel()
-
getAgreeButtonLabel
final String getAgreeButtonLabel()
-
getAgreeButtonAccessibility
final Accessibility getAgreeButtonAccessibility()
-
getPrivacyButtonLabel
final String getPrivacyButtonLabel()
-
getNoticeContentText
final String getNoticeContentText()
-
getNoticeTitle
final String getNoticeTitle()
-
getNoticeAndPartnersProperties
ConsentNoticeViewModel.NoticeAndPartnersProperties getNoticeAndPartnersProperties()
-
getManageOurPartnersLabel
final String getManageOurPartnersLabel()
-
getLearnMoreButtonAccessibility
final Accessibility getLearnMoreButtonAccessibility()
-
getLearnMoreButtonLabel
final CharSequence getLearnMoreButtonLabel()
-
getLogoProvider
final LogoProvider getLogoProvider()
-
getNavigationManager
final NavigationManager getNavigationManager()
-
getDisagreeButtonAccessibility
final Accessibility getDisagreeButtonAccessibility(Boolean asLink)
Method used to get the accessibility params for the disagree button.
- Parameters:
asLink- true if button has the link appearance
-
getDisagreeButtonLabel
final CharSequence getDisagreeButtonLabel(Boolean asLink)
Get label for the disagree button.
- Parameters:
asLink- true if button has the link appearance
-
hasVendorLink
final Boolean hasVendorLink(String contentText)
Check if the text contains a link to the vendors page
- Parameters:
contentText- the notice or popup content text
-
triggerEvent
final Unit triggerEvent(Event event)
Method used to trigger an event through the eventsRepository.
- Parameters:
event- event to be triggered.
-
onLearnMoreButtonClicked
final Unit onLearnMoreButtonClicked()
-
onVendorButtonClicked
final Unit onVendorButtonClicked()
-
onSensitivePersonalInfoButtonClicked
final Unit onSensitivePersonalInfoButtonClicked()
-
onAgreeButtonClicked
final Unit onAgreeButtonClicked()
-
onDisagreeButtonClicked
final Unit onDisagreeButtonClicked()
-
-
-
-