public abstract class AbstractRemoteRepository extends AbstractRepository implements EditableRemoteRepository
CRON_DEFINITION, location
Constructor and Description |
---|
AbstractRemoteRepository(Locale primaryLocale,
RepositoryType type,
String id,
String name,
RepositoryStorage storage) |
AbstractRemoteRepository(RepositoryType type,
String id,
String name,
RepositoryStorage storage) |
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.
|
StorageAsset |
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 |
setLocation(URI location)
Sets the location of the repository.
|
void |
setTimeout(Duration duration)
Sets the timeout for requests to the remote repository.
|
String |
toString() |
addAsset, addFailoverLocation, addFeature, clearFailoverLocations, close, consumeData, consumeDataFromChannel, copyAsset, copyAsset, getAsset, getCapabilities, getDescription, getDescription, getFailoverLocations, getFeature, getId, getIndexingContext, getLayout, getLocation, getName, getName, getPrimaryLocale, getSchedulingDefinition, getStorage, getType, handle, hasIndex, isOpen, isScanned, moveAsset, moveAsset, registerEventHandler, removeAsset, removeFailoverLocation, setBaseUri, setDescription, setIndexingContext, setLayout, setName, setPrimaryLocale, setScanned, setSchedulingDefinition, setStorage, supportsFeature, unregisterEventHandler, updateLocation, writeData, writeDataToChannel
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
addFailoverLocation, clearFailoverLocations, getPrimaryLocale, removeFailoverLocation, setBaseUri, setDescription, setIndexingContext, setLayout, setName, setScanned, setSchedulingDefinition
close, getCapabilities, getDescription, getDescription, getFailoverLocations, getFeature, getId, getIndexingContext, getLayout, getLocation, getName, getName, getSchedulingDefinition, getType, hasIndex, isOpen, isScanned, supportsFeature
registerEventHandler, unregisterEventHandler
addAsset, consumeData, consumeDataFromChannel, copyAsset, copyAsset, getAsset, moveAsset, moveAsset, removeAsset, updateLocation, writeData, writeDataToChannel
public AbstractRemoteRepository(RepositoryType type, String id, String name, RepositoryStorage storage)
public AbstractRemoteRepository(Locale primaryLocale, RepositoryType type, String id, String name, RepositoryStorage storage)
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 StorageAsset getLocalPath()
getLocalPath
in interface Repository
getLocalPath
in class AbstractRepository
public void setLocation(URI location)
EditableRepository
setLocation
in interface EditableRepository
setLocation
in class AbstractRepository
location
- the location URICopyright © 2006–2019 The Apache Software Foundation. All rights reserved.