public abstract class AbstractRemoteRepository extends AbstractRepository implements EditableRemoteRepository
Modifier and Type | Field and Description |
---|---|
private String |
checkPath |
private RemoteRepositoryContent |
content |
private RepositoryCredentials |
credentials |
private Map<String,String> |
extraHeaders |
private Map<String,String> |
extraParameters |
private String |
proxyId |
private Duration |
timeout |
private Map<String,String> |
uExtraHeaders |
private Map<String,String> |
uExtraParameters |
CRON_DEFINITION, featureMap, log, repositoryBase, schedulingDefinition
Constructor and Description |
---|
AbstractRemoteRepository(Locale primaryLocale,
RepositoryType type,
String id,
String name,
Path repositoryBase) |
AbstractRemoteRepository(RepositoryType type,
String id,
String name,
Path repositoryBase) |
Modifier and Type | Method and Description |
---|---|
void |
addExtraHeader(String header,
String value)
Adds an extra header.
|
void |
addExtraParameter(String key,
String value)
Adds an additional parameter.
|
String |
getCheckPath()
Returns the path relative to the root url of the repository that should be used
to check the availability of the repository.
|
RemoteRepositoryContent |
getContent()
Returns the interface to access the content of the repository.
|
Map<String,String> |
getExtraHeaders()
Returns extra headers that are added to the request to the remote repository.
|
Map<String,String> |
getExtraParameters()
Returns additional parameters, that are used for accessing the remote repository.
|
Path |
getLocalPath()
Remote repositories resolve always relative to the base directory.
|
RepositoryCredentials |
getLoginCredentials()
Returns the credentials used to login to the remote repository.
|
Duration |
getTimeout()
Returns the time duration, after that the request is aborted and a error is returned, if the remote repository
does not respond.
|
void |
setCheckPath(String path)
Sets the path relative to the root url of the repository that should be used to check
the availability of the repository.
|
void |
setContent(RemoteRepositoryContent content)
Sets the content.
|
void |
setCredentials(RepositoryCredentials credentials)
Sets the login credentials for login to the remote repository.
|
void |
setExtraHeaders(Map<String,String> headers)
Sets the extra headers, that are added to the requests to the remote repository.
|
void |
setExtraParameters(Map<String,String> params)
Sets additional parameters to be used to access the remote repository.
|
void |
setTimeout(Duration duration)
Sets the timeout for requests to the remote repository.
|
String |
toString() |
addFailoverLocation, addFeature, addListener, clearFailoverLocations, clearListeners, close, getCapabilities, getDescription, getDescription, getFailoverLocations, getFeature, getId, getIndexingContext, getLayout, getLocation, getName, getName, getPrimaryLocale, getSchedulingDefinition, getType, hasIndex, isScanned, raise, removeFailoverLocation, removeListener, setBaseUri, setDescription, setIndexingContext, setLayout, setLocation, setName, setPrimaryLocale, setScanned, setSchedulingDefinition, supportsFeature
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
addFailoverLocation, clearFailoverLocations, getPrimaryLocale, removeFailoverLocation, setBaseUri, setDescription, setIndexingContext, setLayout, setLocation, setName, setScanned, setSchedulingDefinition
close, getCapabilities, getDescription, getDescription, getFailoverLocations, getFeature, getId, getIndexingContext, getLayout, getLocation, getName, getName, getSchedulingDefinition, getType, hasIndex, isScanned, supportsFeature
addListener, clearListeners, removeListener
private RepositoryCredentials credentials
private Map<String,String> extraParameters
private Map<String,String> uExtraParameters
private Map<String,String> extraHeaders
private Map<String,String> uExtraHeaders
private RemoteRepositoryContent content
public AbstractRemoteRepository(RepositoryType type, String id, String name, Path repositoryBase)
public AbstractRemoteRepository(Locale primaryLocale, RepositoryType type, String id, String name, Path repositoryBase)
public void setCredentials(RepositoryCredentials credentials)
EditableRemoteRepository
setCredentials
in interface EditableRemoteRepository
public void setCheckPath(String path)
EditableRemoteRepository
setCheckPath
in interface EditableRemoteRepository
path
- The path string.public void setExtraParameters(Map<String,String> params)
EditableRemoteRepository
setExtraParameters
in interface EditableRemoteRepository
params
- A map of parameters, may not be null.public void addExtraParameter(String key, String value)
EditableRemoteRepository
addExtraParameter
in interface EditableRemoteRepository
key
- The key of the parametervalue
- The value of the parameterpublic void setExtraHeaders(Map<String,String> headers)
EditableRemoteRepository
setExtraHeaders
in interface EditableRemoteRepository
public void addExtraHeader(String header, String value)
EditableRemoteRepository
addExtraHeader
in interface EditableRemoteRepository
header
- The header namevalue
- The header valuepublic void setTimeout(Duration duration)
EditableRemoteRepository
setTimeout
in interface EditableRemoteRepository
duration
- The amount of time, after that the request is aborted.public RemoteRepositoryContent getContent()
RemoteRepository
getContent
in interface RemoteRepository
public void setContent(RemoteRepositoryContent content)
EditableRemoteRepository
setContent
in interface EditableRemoteRepository
public RepositoryCredentials getLoginCredentials()
RemoteRepository
getLoginCredentials
in interface RemoteRepository
public String getCheckPath()
RemoteRepository
getCheckPath
in interface RemoteRepository
public Map<String,String> getExtraParameters()
RemoteRepository
getExtraParameters
in interface RemoteRepository
public Map<String,String> getExtraHeaders()
RemoteRepository
getExtraHeaders
in interface RemoteRepository
public Duration getTimeout()
RemoteRepository
getTimeout
in interface RemoteRepository
public Path getLocalPath()
getLocalPath
in interface Repository
getLocalPath
in class AbstractRepository
Copyright © 2006–2018 The Apache Software Foundation. All rights reserved.