public class Config extends Object
All available configuration:
required? | name | meaning |
gsa.acceptsDocControlsHeader | use X-Gsa-Doc-Controls HTTP header with namespaced ACLs. Otherwise ACLs are sent without namespace and as metadata. If not set, then an attempt to compute from gsa.version is made. Defaults to true for 7.2.0-0 and later, and false for earlier, as defined by gsa.version. | |
adaptor.markAllDocsAsPublic | Tells GSA all
documents are public. Overrides all ACLs and even the setting of
Response.setSecure() . Defaults to false
| |
adaptor.fullListingSchedule | when to invoke
Adaptor.getDocIds , in cron format (minute,
hour, day of month, month, day of week). Defaults to 0 3 * * *
| |
adaptor.incrementalPollPeriodSecs | number
of seconds between invocations of PollingIncrementalLister.getModifiedDocIds . Defaults to 900
| |
adaptor.docContentTimeoutSecs | number of seconds adaptor has to complete sending content before it is interrupted. Timing starts when sending content starts. Defaults to 180 | |
adaptor.docHeaderTimeoutSecs | number of seconds adaptor has to start sending content before it is interrupted. Defaults to 30 | |
adaptor.heartbeatTimeoutSecs | number of seconds adaptor has to send a heartbeat response before it is interrupted. Defaults to same value as adaptor.docHeaderTimeoutSecs. | |
adaptor.disableFullAndIncrementalListing |
whether to disable calls to Adaptor.getDocIds
and PollingIncrementalLister.getModifiedDocIds .
If true , the values of the adaptor.pushDocIdsOnStartup ,
adaptor.fullListingSchedule , and
adaptor.incrementalPollPeriodSecs properties are ignored.
The AsyncDocIdPusher is still active, but
adaptors should restrict its use to Adaptor.getDocContent . Defaults to false .
| |
adaptor.pushDocIdsOnStartup | whether to invoke
Adaptor.getDocIds on process start
(in addition to adaptor.fullListingSchedule). Defaults to true
| |
adaptor.domainFormat | whether ACL names are DNS (name@domain.com), NETBIOS (domain\name), or NETBIOS_FORWARDSLASH (domain/name), or NONE (name). This format is used when adaptor needs to combine name with domain to create AuthnIdentity instances. The adaptor needs to create AuthnIdentity instances in two circumstances: (1) when it is using the GSA as an Idp and is parsing GSA authn SAML messages, and (2) when it is receiving and parsing GSA authorization requests. Defaults to DNS | |
docId.isUrl | say your adaptor's document ids are already URLs and avoid them being inserted into adaptor generated URLs. Defaults to false | |
feed.crawlImmediatelyBitEnabled | send bit telling GSA to crawl immediately. Defaults to not overriding adaptor's decision which is typically to send updates as crawl-immediately and let GSA schedule crawl of all other ids | |
feed.noRecrawlBitEnabled | send bit telling GSA to crawl your documents only once. Defaults to not overriding adaptor's decision which is typically to send all documents as recrawlable (equivalent to value of false) | |
feed.maxUrls | set max number of URLs included per feed file. Defaults to 5000 | |
feed.name | source name used in feeds. Generated if not provided | |
feed.archiveDirectory | specifies a directory in which all feeds sent to the GSA will be archived. Feeds that failed to be sent to the GSA will be tagged with "FAILED" in the file name. If no directory is specified, feed files will not be saved. | |
gsa.version | version number used to configure expected GSA features. Defaults to acquiring from GSA. Uses 7.0.14-114 if acquiring fails. | |
gsa.614FeedWorkaroundEnabled | enable detour around particular feed parsing failure found in GSA version 6.14 . Defaults to false | |
gsa.70AuthMethodWorkaroundEnabled | send authmethod in feed files to workaround early GSA 7.0 bug. Defaults to false | |
gsa.characterEncoding | character set used in feed files. Defaults to UTF-8 | |
yes | gsa.hostname | machine to send feed files to. Process errors if not provided |
gsa.admin.hostname | administrative host for the GSA. This may be different from gsa.hostname if the GSA's dedicated administrative network interface is enabled. Defaults to the same value as gsa.hostname. | |
gsa.samlEntityId | The SAML Entity ID that identifies the GSA. Defaults to http://google.com/enterprise/gsa/security-manager | |
journal.reducedMem | avoid tracking per URL information in RAM; suggested with over five hundred thousand documents. Defaults to true | |
gsa.scoringType | type of relevance algorithm GSA utilizes to rank documents. Either content or web. Is sent when gsa.acceptsDocControlsHeader is true. Defaults to content | |
server.asyncDocIdSenderQueueSize | queue size of the asynchronous DocId sender. Defaults to 2 * feed.maxUrls | |
server.dashboardPort | port on adaptor's machine for accessing adaptor's dashboard. Defaults to 5679 | |
server.docIdPath | part of URL preceding encoded document ids. Defaults to /doc/ | |
server.heartbeatPath | part of URL preceding encoded heartbeat URIs for document ids. Defaults to /heartbeat/ | |
server.fullAccessHosts | hosts allowed access without authentication (certificates still needed when in secure mode). Defaults to empty but implicitly contains gsa.hostname | |
server.hostname | hostname of adaptor machine for URL generation. The GSA will use this hostname to crawl the adaptor. Defaults to lowercase of automatically detected hostname | |
server.keyAlias | keystore alias where encryption (public and private) keys are stored. Defaults to adaptor | |
server.maxWorkerThreads | number of maximum simultenous retrievals allowed. Defaults to 16 | |
server.port | retriever port. Defaults to 5678 | |
server.queueCapacity | max retriever queue size. Defaults to 160 | |
server.reverseProxyPort | port used in retriever URLs (in case requests are routed through a reverse proxy). Defaults to server.port | |
server.reverseProxyProtocol | either http or https, depending on proxy traffic. Defaults to https in secure mode and http otherwise | |
server.samlEntityId | The SAML Entity ID that the Adaptor will use to identity itself. Defaults to http://google.com/enterprise/gsa/adaptor | |
server.secure | enables https and certificate checking. Defaults to false | |
server.httpBasic.username | enables http basic authentication on all content requests. When enabled, requests receive HTTP 401 if correct username and password are not provided. Once http basic authentication is satified requestor receives content and ACLs and metadata. Defaults to empty string "" and means that http basic is not used. | |
server.httpBasic.password | if http basic is enabled then this is the password that the requester must provide. Defaults to empty string "". | |
server.useCompression | compress retrieval responses. Defaults to false | |
transform.acl.X | where X is an integer, match and modify principals as described. Defaults no modifications | |
metadata.transform.pipeline | sequence of metadata transformation steps. Defaults to no-pipeline | |
content.transform.pipeline | content transform pipeline. Defaults to no-pipeline | |
saml.idpExpirationMillis | Expiration time sent in SAML Authentication response. Defaults to 30,000 milliseconds. |
Constructor and Description |
---|
Config() |
Modifier and Type | Method and Description |
---|---|
void |
addKey(String key,
String defaultValue)
Add configuration key.
|
Set<String> |
getAllKeys() |
List<Map<String,String>> |
getListOfConfigs(String key)
Returns a list of maps corresponding to each item of the comma-separated
value of
key . |
String |
getRawValue(String key)
Get a configuration value exactly as provided in configuration.
|
String |
getValue(String key)
Get a configuration value as computed based on the configuration.
|
Map<String,String> |
getValuesWithPrefix(String prefix)
Gets all configuration values that begin with
prefix , returning
them as a map with the keys having prefix removed. |
void |
load(File configFile)
Load user-provided configuration file.
|
void |
load(String configFile)
Load user-provided configuration file.
|
void |
overrideKey(String key,
String defaultValue)
Change the default value of a preexisting configuration key.
|
void |
validate() |
public List<Map<String,String>> getListOfConfigs(String key)
key
. Each map is the configuration entries for that item
in the list. The 'name' configuration entry is added in each map based on
the name provided by the user.
As an example, provided the following config:
adaptor.servers=server1,fluttershy , rainbowDash
adaptor.servers.fluttershy.hostname=fluttershy
adaptor.servers.fluttershy.port=42
adaptor.servers.server1.hostname=applejack
adaptor.servers.server1.port=314
adaptor.servers.rainbowDash.hostname=rainbowdash
adaptor.servers.rainbowDash.port=159
adaptor.servers.rainbowDash.name=20% cooler
adaptor.servers.derpy.hostname=hooves
And calling:
config.getConfigList("adaptor.servers");
Returns:
[{
"hostname": "applejack",
"port": "42",
"name": "server1",
}, {
"hostname": "fluttershy",
"port": "314",
"name": "fluttershy",
}, {
"hostname": "rainbowdash",
"port": "159",
"name": "raindowDash",
}]
key
- whoese value specifies other keyspublic void load(String configFile) throws IOException
configFile
- to be loadedIOException
- if fails reading configpublic void load(File configFile) throws IOException
configFile
- to be loadedIOException
- if fails reading configpublic void validate()
public String getRawValue(String key)
getValue(java.lang.String)
should be used instead of this method.key
- to lookupnull
value of key
IllegalStateException
- if key
has no valuepublic String getValue(String key)
getRawValue(java.lang.String)
.key
- to lookupnull
value of key
IllegalStateException
- if key
has no valuepublic Map<String,String> getValuesWithPrefix(String prefix)
prefix
, returning
them as a map with the keys having prefix
removed.prefix
- that is to begin each keypublic void addKey(String key, String defaultValue)
defaultValue
is null
, then no
default value is used and the user must provide one.key
- keydefaultValue
- value