Package com.zendesk.sdk.model.settings
Class SafeMobileSettings
- java.lang.Object
-
- com.zendesk.sdk.model.settings.SafeMobileSettings
-
public class SafeMobileSettings extends java.lang.Object
WrapsMobileSettings
and makes settings call null-safe.This class will generally default to false or 0 for return values if they don't exist.
Created by Zendesk on 28/07/15.
-
-
Constructor Summary
Constructors Constructor and Description SafeMobileSettings(MobileSettings mobileSettings)
Creates an instance of SafeMobileSettings
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method and Description AuthenticationType
getAuthenticationType()
Gets the authentication type.java.util.List<java.lang.String>
getContactZendeskTags()
Gets the tags to use for theContactZendesk
components.java.lang.String
getHelpCenterLocale()
Gets the default locale of the help centerHelpCenterSettings
getHelpCenterSettings()
Gets the help center settingslong
getMaxAttachmentSize()
Gets the maximum attachment size allowed in bytesMobileSettings
getMobileSettings()
Gets the rawMobileSettings
object.long
getRateMyAppDelay()
Deprecated.Rate My App is deprecated as of 1.10.0.1. See our open source alternative instead.long
getRateMyAppDuration()
Deprecated.Rate My App is deprecated as of 1.10.0.1. See our open source alternative instead.java.lang.String
getRateMyAppStoreUrl()
Deprecated.Rate My App is deprecated as of 1.10.0.1. See our open source alternative instead.java.util.List<java.lang.String>
getRateMyAppTags()
Deprecated.Rate My App is deprecated as of 1.10.0.1. See our open source alternative instead.long
getRateMyAppVisits()
Deprecated.Rate My App is deprecated as of 1.10.0.1. See our open source alternative instead.boolean
hasHelpCenterSettings()
Checks if we have Help Center settings or not.boolean
isAttachmentsEnabled()
Checks if attachments are enabled or notboolean
isConversationsEnabled()
Checks if conversations are enabled or notboolean
isHelpCenterEnabled()
Checks if help center is enabled or not.boolean
isPathfinderEnabled()
Gets if blips are enabled for Pathfinder or not.boolean
isRateMyAppEnabled()
Deprecated.Rate My App is deprecated as of 1.10.0.1. See our open source alternative instead.boolean
isTicketFormSupportAvailable()
Gets if TicketForm support is available, or not.
-
-
-
Constructor Detail
-
SafeMobileSettings
public SafeMobileSettings(MobileSettings mobileSettings)
Creates an instance of SafeMobileSettings- Parameters:
mobileSettings
- The mobile settings to wrap
-
-
Method Detail
-
getMobileSettings
public MobileSettings getMobileSettings()
Gets the rawMobileSettings
object.- Returns:
- The raw
MobileSettings
object.
-
isConversationsEnabled
public boolean isConversationsEnabled()
Checks if conversations are enabled or not- Returns:
- true only if conversations are enabled, false if they are not or the settings are missing
-
isAttachmentsEnabled
public boolean isAttachmentsEnabled()
Checks if attachments are enabled or not- Returns:
- true only if they are enabled, false if they are not or the settings are missing
-
getMaxAttachmentSize
public long getMaxAttachmentSize()
Gets the maximum attachment size allowed in bytes- Returns:
- The maximum attachment size allowed in bytes, or 0 if the settings are missing
-
hasHelpCenterSettings
public boolean hasHelpCenterSettings()
Checks if we have Help Center settings or not.- Returns:
- true if we have a non-null
HelpCenterSettings
, false if not.
-
isHelpCenterEnabled
public boolean isHelpCenterEnabled()
Checks if help center is enabled or not.- Returns:
- true only if help center is enabled, false if it is not or if the settings are missing
-
getHelpCenterLocale
public java.lang.String getHelpCenterLocale()
Gets the default locale of the help center- Returns:
- the default locale of the help center, or the empty string if the settings are missing
-
isRateMyAppEnabled
@Deprecated public boolean isRateMyAppEnabled()
Deprecated. Rate My App is deprecated as of 1.10.0.1. See our open source alternative instead.Checks if rate my app is enabled or not- Returns:
- true only if rate my app is
-
getRateMyAppStoreUrl
@Deprecated public java.lang.String getRateMyAppStoreUrl()
Deprecated. Rate My App is deprecated as of 1.10.0.1. See our open source alternative instead.Gets the App's play store URL fromRateMyAppSettings
- Returns:
- The store url from
RateMyAppSettings
, or the empty string if null or unknown
-
getRateMyAppDelay
@Deprecated public long getRateMyAppDelay()
Deprecated. Rate My App is deprecated as of 1.10.0.1. See our open source alternative instead.Gets the rate my app delay as a long.- Returns:
- the rate my app delay from
RateMyAppSettings
, or 0L if null or unknown.
-
getRateMyAppDuration
@Deprecated public long getRateMyAppDuration()
Deprecated. Rate My App is deprecated as of 1.10.0.1. See our open source alternative instead.Gets the duration of rate my app fromRateMyAppSettings
.- Returns:
- the duration of rate my app from
RateMyAppSettings
, or 0L if null or unknown.
-
getRateMyAppVisits
@Deprecated public long getRateMyAppVisits()
Deprecated. Rate My App is deprecated as of 1.10.0.1. See our open source alternative instead.Gets the number of rate my app visits fromRateMyAppSettings
.- Returns:
- the number of rate my app visits from
RateMyAppSettings
, or 0L if null or unknown.
-
getRateMyAppTags
@Deprecated public java.util.List<java.lang.String> getRateMyAppTags()
Deprecated. Rate My App is deprecated as of 1.10.0.1. See our open source alternative instead.Gets the list of tags for rate my app fromRateMyAppSettings
.- Returns:
- the list of tags for rate my app, or an empty list if null or unknown.
-
getAuthenticationType
public AuthenticationType getAuthenticationType()
Gets the authentication type.- Returns:
- The authentication type, or null if we don't have one.
-
getHelpCenterSettings
public HelpCenterSettings getHelpCenterSettings()
Gets the help center settingsmobileSettings.getSdkSettings()
is NonNull but let's check it anyway, in case that is changed.- Returns:
- the HelpCenterSettings if we have them, null otherwise
-
getContactZendeskTags
public java.util.List<java.lang.String> getContactZendeskTags()
Gets the tags to use for theContactZendesk
components.
-
isTicketFormSupportAvailable
public boolean isTicketFormSupportAvailable()
Gets if TicketForm support is available, or not.- Returns:
true
if TicketForm support is available,false
if not.
-
isPathfinderEnabled
public boolean isPathfinderEnabled()
Gets if blips are enabled for Pathfinder or not.- Returns:
true
if Pathfinder support is enabled, orfalse
if not.
-
-