public class Configuration extends Object
| Constructor and Description |
|---|
Configuration(ConfigurationLoader configurationLoader,
Map<?,?> config) |
| Modifier and Type | Method and Description |
|---|---|
String |
get(String propertyKey,
String defaultValue) |
boolean |
getBoolean(String propertyKey,
boolean defaultValue) |
<T> Class<? extends T> |
getClass(String propertyKey) |
<T> Class<? extends T> |
getClass(String propertyKey,
Class<? extends T> defaultClass) |
org.json.JSONObject |
getConfigurationInfo() |
Integer |
getInt(String propertyKey) |
Integer |
getInt(String propertyKey,
Integer defaultValue) |
org.json.JSONObject |
getJsonProperties() |
Iterable<String> |
getKeys() |
Iterable<String> |
getKeys(String keyPrefix) |
Long |
getLong(String propertyKey) |
Long |
getLong(String propertyKey,
Long defaultValue) |
static SortedMap<String,Map<String,String>> |
getMultiValue(Iterable<Map.Entry<String,String>> config,
String prefix)
Processing configuration items that looks like this:
|
Map<String,Map<String,String>> |
getMultiValue(String prefix)
Similar to
getMultiValue(java.lang.Iterable, java.lang.String) but uses the internal
configuration state. |
<T> Map<String,T> |
getMultiValueConfigurables(String prefix,
Class<T> configurableType)
Similar to
getMultiValue(java.lang.String), but returns a new instance of
a configurable type for each prefix. |
protected PrivilegeRepository |
getPrivilegeRepository() |
protected SchemaRepository |
getSchemaRepository() |
Map<String,String> |
getSubset(String keyPrefix) |
void |
set(String propertyKey,
Object value) |
static <T> T |
setConfigurables(T o,
Map<String,String> config) |
<T> T |
setConfigurables(T o,
String keyPrefix) |
org.json.JSONObject |
toJSON(String workspaceId,
ResourceBundle resourceBundle) |
Map |
toMap() |
String |
toString() |
public static final String BASE_URL
public static final String LOCK_REPOSITORY
public static final String TRACE_REPOSITORY
public static final String TRACE_ENABLED
public static final String USER_REPOSITORY
public static final String WORKSPACE_REPOSITORY
public static final String GRAPH_AUTHORIZATION_REPOSITORY
public static final String ONTOLOGY_REPOSITORY
public static final String USER_SESSION_COUNTER_REPOSITORY
public static final String WORK_QUEUE_REPOSITORY
public static final String WEB_QUEUE_REPOSITORY
public static final String LONG_RUNNING_PROCESS_REPOSITORY
public static final String REGEX_REPOSITORY
public static final String SIMPLE_ORM_SESSION
public static final String EMAIL_REPOSITORY
public static final String STATUS_REPOSITORY
public static final String ACL_PROVIDER_REPOSITORY
public static final String FILE_SYSTEM_REPOSITORY
public static final String AUTHORIZATION_REPOSITORY
public static final String PRIVILEGE_REPOSITORY
public static final String CACHE_SERVICE
public static final String AUDIT_SERVICE
public static final String GRAPH_PROVIDER
public static final String VISIBILITY_TRANSLATOR
public static final String WEB_CONFIGURATION_PREFIX
public static final String WEB_GEOCODER_ENABLED
public static final String DEV_MODE
public static final boolean DEV_MODE_DEFAULT
public static final String DEFAULT_SEARCH_RESULT_COUNT
public static final String DEFAULT_TIME_ZONE
public static final String RABBITMQ_PREFETCH_COUNT
public static final String DW_QUEUE_PREFIX
public static final String DW_QUEUE_NAME
public static final String LRP_QUEUE_PREFIX
public static final String LRP_QUEUE_NAME
public static final String STATUS_PORT_RANGE
public static final String DEFAULT_STATUS_PORT_RANGE
public static final String COMMENTS_AUTO_PUBLISH
public static final boolean DEFAULT_COMMENTS_AUTO_PUBLISH
public static final String MULTIPART_LOCATION
public static final String DEFAULT_MULTIPART_LOCATION
public static final String MULTIPART_MAX_FILE_SIZE
public static final long DEFAULT_MULTIPART_MAX_FILE_SIZE
public static final String MULTIPART_MAX_REQUEST_SIZE
public static final long DEFAULT_MULTIPART_MAX_REQUEST_SIZE
public static final String MULTIPART_FILE_SIZE_THRESHOLD
public static final int DEFAULT_MULTIPART_FILE_SIZE_THRESHOLD
public static final boolean DEFAULT_TRACE_ENABLED
public static final String STATUS_REFRESH_INTERVAL_SECONDS
public static final int STATUS_REFRESH_INTERVAL_SECONDS_DEFAULT
public static final String STATUS_ENABLED
public static final boolean STATUS_ENABLED_DEFAULT
public static final String SYSTEM_PROPERTY_PREFIX
public static final String AUTH_TOKEN_PASSWORD
public static final String AUTH_TOKEN_SALT
public static final String AUTH_TOKEN_EXPIRATION_IN_MINS
public static final String AUTH_TOKEN_EXPIRATION_TOLERANCE_IN_SECS
public static final String HTTP_GZIP_ENABLED
public static final String WEB_RESPONSE_HEADER_X_FRAME_OPTIONS
public static final Configuration EMPTY
public Configuration(ConfigurationLoader configurationLoader, Map<?,?> config)
public boolean getBoolean(String propertyKey, boolean defaultValue)
public <T> Class<? extends T> getClass(String propertyKey, Class<? extends T> defaultClass)
public <T> T setConfigurables(T o,
String keyPrefix)
public Map toMap()
public org.json.JSONObject toJSON(String workspaceId, ResourceBundle resourceBundle)
public org.json.JSONObject getJsonProperties()
public <T> Map<String,T> getMultiValueConfigurables(String prefix, Class<T> configurableType)
getMultiValue(java.lang.String), but returns a new instance of
a configurable type for each prefix.
Given the following configuration:
repository.ontology.owl.dev.iri=http://bigconnect/dev
repository.ontology.owl.dev.dir=examples/ontology-dev/
repository.ontology.owl.csv.iri=http://bigconnect/csv
repository.ontology.owl.csv.dir=storm/plugins/csv/ontology/
And the following class.
class OwlItem {
@Configurable
public String iri;
@Configurable
public String dir;
}
Would produce a map with two keys "dev" and "csv" mapped to an OwlItem object.prefix - The configuration key prefixconfigurableType - The type of each configurable object to create instances ofpublic Map<String,Map<String,String>> getMultiValue(String prefix)
getMultiValue(java.lang.Iterable, java.lang.String) but uses the internal
configuration state.public static SortedMap<String,Map<String,String>> getMultiValue(Iterable<Map.Entry<String,String>> config, String prefix)
repository.ontology.owl.dev.iri=http://bigconnect/dev
repository.ontology.owl.dev.dir=examples/ontology-dev/
repository.ontology.owl.csv.iri=http://bigconnect/csv
repository.ontology.owl.csv.dir=storm/plugins/csv/ontology/
Into a hash like this:
- dev
- iri: http://bigconnect/dev
- dir: examples/ontology-dev/
- csv
- iri: http://bigconnect/csv
- dir: storm/plugins/csv/ontology/public org.json.JSONObject getConfigurationInfo()
protected SchemaRepository getSchemaRepository()
protected PrivilegeRepository getPrivilegeRepository()
Copyright © 2016–2021 MWARE SOLUTIONS. All rights reserved.