public class BootConfig
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
BootConfig.BootConfigException
Exception thrown for all bootconfig parsing errors.
|
Constructor and Description |
---|
BootConfig() |
Modifier and Type | Method and Description |
---|---|
JSONObject |
asJSON() |
boolean |
attemptOfflineLoad()
Returns whether the app should attempt to load cached content when offline.
|
static BootConfig |
getBootConfig(Context ctx)
Method to (build and) get the singleton instance.
|
java.lang.String |
getErrorPage()
Returns the path to the local error page.
|
java.lang.String |
getOauthRedirectURI()
Returns the redirect URI value specified for your remote access object or connected app.
|
java.lang.String[] |
getOauthScopes()
Returns the authorization/access scope(s) that the application needs to ask for at login.
|
java.lang.String |
getRemoteAccessConsumerKey()
Returns the consumer key value specified for your remote access object or connected app.
|
java.lang.String |
getStartPage()
Returns the path to the start page (local or remote).
|
java.lang.String |
getUnauthenticatedStartPage()
Returns the path to the optional unauthenticated start page (for remote deferred
authentication).
|
static boolean |
isAbsoluteUrl(java.lang.String urlString)
Convenience method to determine whether a configured startPage value is an absolute URL.
|
boolean |
isLocal()
Returns if the start page is local or a VF page.
|
boolean |
shouldAuthenticate()
Returns whether the app should go through login flow the first time or not.
|
static void |
validateBootConfig(BootConfig config)
Validates a boot config's inputs against basic sanity tests.
|
public static BootConfig getBootConfig(Context ctx)
ctx
- Context.public static void validateBootConfig(BootConfig config)
config
- The BootConfig instance to validate.BootConfig.BootConfigException
- If the boot config is invalid.public JSONObject asJSON()
public java.lang.String getRemoteAccessConsumerKey()
public java.lang.String getOauthRedirectURI()
public java.lang.String[] getOauthScopes()
public boolean isLocal()
public java.lang.String getStartPage()
public java.lang.String getUnauthenticatedStartPage()
public static boolean isAbsoluteUrl(java.lang.String urlString)
public java.lang.String getErrorPage()
public boolean shouldAuthenticate()
public boolean attemptOfflineLoad()