public interface Repository extends EventSource, RepositoryStorage
Modifier and Type | Method and Description |
---|---|
void |
close()
Closes all resources that are opened by this repository.
|
RepositoryCapabilities |
getCapabilities()
Returns the capabilities of the repository implementation.
|
String |
getDescription()
Returns a description of this repository.
|
String |
getDescription(Locale locale)
Returns the description for the given locale.
|
Set<URI> |
getFailoverLocations()
A repository may allow additional locations that can be used, if the primary location is not available.
|
<T extends RepositoryFeature<T>> |
getFeature(Class<T> clazz)
Extension method that allows to provide different features that are not supported by all
repository types.
|
String |
getId()
Return the identifier of the repository.
|
ArchivaIndexingContext |
getIndexingContext()
Returns a indexing context.
|
String |
getLayout()
Returns a layout definition.
|
StorageAsset |
getLocalPath()
Returns a storage representation to the local data stored for this repository.
|
URI |
getLocation()
Returns the location of this repository.
|
String |
getName()
This is the display name of the repository.
|
String |
getName(Locale locale)
Returns the name in the given locale.
|
String |
getSchedulingDefinition()
Returns the definition, when the repository jobs are executed.
|
RepositoryType |
getType()
This identifies the type of repository.
|
boolean |
hasIndex()
Returns true, if this repository has a index available
|
boolean |
isOpen()
Returns the current status of this repository.
|
boolean |
isScanned()
True, if this repository is scanned regularly.
|
<T extends RepositoryFeature<T>> |
supportsFeature(Class<T> clazz)
Returns true, if the requested feature is supported by this repository.
|
registerEventHandler, unregisterEventHandler
addAsset, consumeData, consumeDataFromChannel, copyAsset, copyAsset, getAsset, moveAsset, moveAsset, removeAsset, updateLocation, writeData, writeDataToChannel
String getId()
String getName()
String getName(Locale locale)
locale
- String getDescription()
String getDescription(Locale locale)
locale
- RepositoryType getType()
URI getLocation()
getLocation
in interface RepositoryStorage
StorageAsset getLocalPath()
Set<URI> getFailoverLocations()
boolean isScanned()
String getSchedulingDefinition()
boolean hasIndex()
String getLayout()
RepositoryCapabilities getCapabilities()
<T extends RepositoryFeature<T>> RepositoryFeature<T> getFeature(Class<T> clazz) throws UnsupportedFeatureException
T
- This is the class of the featureclazz
- The feature class that is requestedUnsupportedFeatureException
- if the feature is not supported by this repository type<T extends RepositoryFeature<T>> boolean supportsFeature(Class<T> clazz)
T
- The requested feature classclazz
- The requested feature classArchivaIndexingContext getIndexingContext()
UnsupportedOperationException
void close()
boolean isOpen()
true
, if repository has not been closed, otherwise false
Copyright © 2006–2019 The Apache Software Foundation. All rights reserved.