public class Config extends Object
| Modifier and Type | Field and Description |
|---|---|
protected String |
environment |
protected String |
URL |
protected String |
URLSCHEMA |
protected String |
VERSION |
| Constructor and Description |
|---|
Config()
BuiltConfig constructor
Example : BuiltConfig config = new BuiltConfig(); |
| Modifier and Type | Method and Description |
|---|---|
String |
getEnvironment()
return String environment
Get environment.
|
String |
getHost() |
String |
getVersion()
Get version of the Built.io Contentstack server.
|
protected void |
setEnvironment(String environment)
set environment.
|
void |
setHost(String hostName)
Sets host name of the Built.io Contentstack server.
|
protected String URLSCHEMA
protected String URL
protected String VERSION
protected String environment
public Config()
BuiltConfig config = new BuiltConfig();
public void setHost(String hostName)
hostName - host name.
Note: Default hostname sets to cdn.contentstack.io
and default protocol is HTTPS.
Example :
config.setHost("cdn.contentstack.io");
public String getHost()
String url = config.getHost();
public String getVersion()
String version = config.getVersion();
protected void setEnvironment(String environment)
environment - environment uid/name
config.setEnvironment("stag", false);
public String getEnvironment()
String environment = config.getEnvironment();
Copyright © 2019 Contentstack. All rights reserved.