-
- All Implemented Interfaces:
public class ConsentNoticeViewModel extends ViewModel
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public classConsentNoticeViewModel.Companion
-
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 StringpartnersButtonLabelprivate final StringnoticeContentTextprivate final StringnoticeTitleprivate final CharSequencevendorsViewLabelprivate final BooleanisTabletprivate final AccessibilitylearnMoreButtonAccessibilityprivate final LogoProviderlogoProviderprivate final NavigationManagernavigationManager
-
Constructor Summary
Constructors Constructor Description ConsentNoticeViewModel(ApiEventsRepository apiEventsRepository, ConfigurationRepository configurationRepository, ConsentRepository consentRepository, EventsRepository eventsRepository, ResourcesHelper resourcesHelper, LanguagesHelper languagesHelper, LogoProvider logoProvider, NavigationManager navigationManager)
-
Method Summary
-
-
Constructor Detail
-
ConsentNoticeViewModel
ConsentNoticeViewModel(ApiEventsRepository apiEventsRepository, ConfigurationRepository configurationRepository, ConsentRepository consentRepository, EventsRepository eventsRepository, 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()
-
getPartnersButtonLabel
String getPartnersButtonLabel()
-
getNoticeContentText
final String getNoticeContentText()
-
getNoticeTitle
final String getNoticeTitle()
-
getVendorsViewLabel
final CharSequence getVendorsViewLabel()
-
getLearnMoreButtonAccessibility
final Accessibility getLearnMoreButtonAccessibility()
-
getLogoProvider
final LogoProvider getLogoProvider()
-
getNavigationManager
final NavigationManager getNavigationManager()
-
getLearnMoreButtonLabel
final CharSequence getLearnMoreButtonLabel(Boolean asLink)
Method used to get the label for the learn more button.
- Parameters:
asLink- true if button has the link appearance
-
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()
-
onPartnersButtonClicked
final Unit onPartnersButtonClicked()
-
onAgreeButtonClicked
final Unit onAgreeButtonClicked()
-
onDisagreeButtonClicked
final Unit onDisagreeButtonClicked()
-
-
-
-