-
public interface IDomainStore
-
-
Method Summary
Modifier and Type Method Description abstract StringgetCurrentDomain()Determines the current domain. abstract voidupdateDomain(@Nullable() String domain)Updates the current domain with a new provided domain. abstract intincrementErrorCount()Increments the error count and returns the new error count value. abstract voidupdateLastCheckDomainDate()Updates the date of the last check performed on the domain. abstract voidresetDomainToOriginal()Resets the domain to its original value {@code DomainStore.DNS_DOMAIN_ORIGINAL}.abstract voidresetErrorCountIfNeeded()Resets the error count if needed, for instance if a successful API call was done on the current domain. abstract DatelastErrorUpdateDate()Returns the date of the last error update, or null if no error has been recorded. abstract booleancanCheckOriginalDomainAvailability()Determines if the original domain can be checked for availability. abstract booleanisOriginalDomain(String domain)Determine if the given domain is the original one abstract booleanisCurrentDomain(String domain)Determine if the given domain is the current one -
-
Method Detail
-
getCurrentDomain
abstract String getCurrentDomain()
Determines the current domain.
This domain is typically the one being used in the app for performing operations.
-
updateDomain
abstract void updateDomain(@Nullable() String domain)
Updates the current domain with a new provided domain.
If
{@code domain}is null, it resets the domain to{@code DomainStore.DNS_DOMAIN_ORIGINAL}.- Parameters:
domain- The new domain to set, or null to reset to the original domain.
-
incrementErrorCount
abstract int incrementErrorCount()
Increments the error count and returns the new error count value.
Used to track the number of errors related to the domain.
-
updateLastCheckDomainDate
abstract void updateLastCheckDomainDate()
Updates the date of the last check performed on the domain.
-
resetDomainToOriginal
abstract void resetDomainToOriginal()
Resets the domain to its original value
{@code DomainStore.DNS_DOMAIN_ORIGINAL}.
-
resetErrorCountIfNeeded
abstract void resetErrorCountIfNeeded()
Resets the error count if needed, for instance if a successful API call was done on the current domain.
-
lastErrorUpdateDate
@Nullable() abstract Date lastErrorUpdateDate()
Returns the date of the last error update, or null if no error has been recorded.
-
canCheckOriginalDomainAvailability
abstract boolean canCheckOriginalDomainAvailability()
Determines if the original domain can be checked for availability.
-
isOriginalDomain
abstract boolean isOriginalDomain(String domain)
Determine if the given domain is the original one
-
isCurrentDomain
abstract boolean isCurrentDomain(String domain)
Determine if the given domain is the current one
-
-
-
-