public class ApiConfig extends Object implements FF4jProvider
| Constructor and Description |
|---|
ApiConfig()
Default constructor.
|
ApiConfig(FF4j ff)
Initialized with a ff4j.
|
| Modifier and Type | Method and Description |
|---|---|
ApiConfig |
createApiKey(String apiKey,
boolean read,
boolean write,
Set<String> usrPerm)
Helper method to create an apiKey.
|
ApiConfig |
createUser(String userName,
String password,
boolean read,
boolean write,
Set<String> usrPerm)
Helper method to create a user.
|
Set<String> |
getApiKeys()
Getter accessor for attribute 'apiKeys'.
|
String |
getContextPath()
Getter accessor for attribute 'contextPath'.
|
FF4j |
getFF4j()
Initialize the
FF4j object to be injected within console. |
String |
getHost()
Getter accessor for attribute 'host'.
|
Map<String,Set<String>> |
getPermissions()
Getter accessor for attribute 'permissions'.
|
int |
getPort()
Getter accessor for attribute 'port'.
|
Map<String,String> |
getUsers()
Getter accessor for attribute 'users'.
|
String |
getVersion()
Getter accessor for attribute 'version'.
|
String |
getWebContext()
Getter accessor for attribute 'webContext'.
|
boolean |
isAuthenticate()
Getter accessor for attribute 'authenticate'.
|
boolean |
isAutorize()
Getter accessor for attribute 'autorize'.
|
boolean |
isDocumentation()
Getter accessor for attribute 'documentation'.
|
boolean |
isLog()
Getter accessor for attribute 'log'.
|
void |
setApiKeys(Set<String> apiKeys)
Setter accessor for attribute 'apiKeys'.
|
void |
setAuthenticate(boolean authenticate)
Setter accessor for attribute 'authenticate'.
|
void |
setAutorize(boolean autorize)
Setter accessor for attribute 'autorize'.
|
void |
setDocumentation(boolean documentation)
Setter accessor for attribute 'documentation'.
|
void |
setFF4j(FF4j fF4j)
Setter accessor for attribute 'fF4j'.
|
void |
setHost(String host)
Setter accessor for attribute 'host'.
|
void |
setLog(boolean log)
Setter accessor for attribute 'log'.
|
void |
setPermissions(Map<String,Set<String>> permissions)
Setter accessor for attribute 'permissions'.
|
void |
setPort(int port)
Setter accessor for attribute 'port'.
|
void |
setUsers(Map<String,String> users)
Setter accessor for attribute 'users'.
|
void |
setVersion(String version)
Setter accessor for attribute 'version'.
|
void |
setWebContext(String webContext)
Setter accessor for attribute 'webContext'.
|
public ApiConfig()
public ApiConfig(FF4j ff)
public ApiConfig createUser(String userName, String password, boolean read, boolean write, Set<String> usrPerm)
userName - target usernamepassword - target passwordread - role readwrite - role writepublic ApiConfig createApiKey(String apiKey, boolean read, boolean write, Set<String> usrPerm)
apiKey - target apiKeyread - role readwrite - role writepublic FF4j getFF4j()
FF4j object to be injected within console.getFF4j in interface FF4jProviderpublic void setFF4j(FF4j fF4j)
fF4j - new value for 'fF4j 'public Map<String,String> getUsers()
public void setUsers(Map<String,String> users)
users - new value for 'users 'public Set<String> getApiKeys()
public void setApiKeys(Set<String> apiKeys)
apiKeys - new value for 'apiKeys 'public Map<String,Set<String>> getPermissions()
public void setPermissions(Map<String,Set<String>> permissions)
permissions - new value for 'permissions 'public String getContextPath()
public String getHost()
public void setHost(String host)
host - new value for 'host 'public int getPort()
public void setPort(int port)
port - new value for 'port 'public String getWebContext()
public void setWebContext(String webContext)
webContext - new value for 'webContext 'public boolean isAuthenticate()
public void setAuthenticate(boolean authenticate)
authenticate - new value for 'authenticate 'public boolean isAutorize()
public void setAutorize(boolean autorize)
autorize - new value for 'autorize 'public boolean isLog()
public void setLog(boolean log)
log - new value for 'log 'public boolean isDocumentation()
public void setDocumentation(boolean documentation)
documentation - new value for 'documentation 'public String getVersion()
public void setVersion(String version)
version - new value for 'version 'Copyright © 2013–2017 FF4J. All rights reserved.