public class LocalRepoRegistryImpl extends Object implements LocalRepoRegistry
LocalRepoRegistry.Property, LocalRepoRegistry.PropertyEnum
CONFIG_KEY_EVICT_DEAD_ENTRIES_PERIOD, DEFAULT_EVICT_DEAD_ENTRIES_PERIOD, LOCAL_REPO_REGISTRY_FILE
public static LocalRepoRegistry getInstance()
public Collection<UUID> getRepositoryIds()
getRepositoryIds
in interface LocalRepoRegistry
public UUID getRepositoryId(String repositoryName)
getRepositoryId
in interface LocalRepoRegistry
public UUID getRepositoryIdOrFail(String repositoryName)
getRepositoryIdOrFail
in interface LocalRepoRegistry
public URL getLocalRootURLForRepositoryNameOrFail(String repositoryName)
getLocalRootURLForRepositoryNameOrFail
in interface LocalRepoRegistry
public URL getLocalRootURLForRepositoryName(String repositoryName)
getLocalRootURLForRepositoryName
in interface LocalRepoRegistry
public File getLocalRootForRepositoryNameOrFail(String repositoryName)
getLocalRootForRepositoryNameOrFail
in interface LocalRepoRegistry
public File getLocalRootForRepositoryName(String repositoryName)
LocalRepoRegistry
repositoryName
.getLocalRootForRepositoryName
in interface LocalRepoRegistry
repositoryName
- the String-representation of the repositoryId or
a repositoryAlias. Must not be null
.null
, if the given repositoryName
is neither
a repositoryId nor a repositoryAlias known to this registry.public File getLocalRoot(UUID repositoryId)
getLocalRoot
in interface LocalRepoRegistry
public File getLocalRootOrFail(UUID repositoryId)
getLocalRootOrFail
in interface LocalRepoRegistry
public void putRepositoryAlias(String repositoryAlias, UUID repositoryId)
LocalRepoRegistry
Important: Do not call this method directly. Most likely, you should use
LocalRepoManager.putRepositoryAlias(String)
instead!
putRepositoryAlias
in interface LocalRepoRegistry
public Collection<String> getRepositoryAliases()
getRepositoryAliases
in interface LocalRepoRegistry
public void removeRepositoryAlias(String repositoryAlias)
removeRepositoryAlias
in interface LocalRepoRegistry
public void putRepository(UUID repositoryId, File localRoot)
putRepository
in interface LocalRepoRegistry
protected Date getPropertyAsDate(String key)
public Collection<String> getRepositoryAliasesOrFail(String repositoryName) throws IllegalArgumentException
LocalRepoRegistry
getRepositoryAliasesOrFail
in interface LocalRepoRegistry
repositoryName
- the repository-ID or -alias. Must not be null
.null
, but maybe empty (if there are no aliases for this repository).IllegalArgumentException
- if the repository with the given repositoryName
does not exist,
i.e. it's neither a repository-ID nor a repository-alias of a known repository.public Collection<String> getRepositoryAliases(String repositoryName)
LocalRepoRegistry
getRepositoryAliases
in interface LocalRepoRegistry
repositoryName
- the repository-ID or -alias. Must not be null
.null
, if there is no repository with
the given repositoryName
. Empty, if the repository is known, but there
are no aliases for it.public void addPropertyChangeListener(PropertyChangeListener listener)
addPropertyChangeListener
in interface LocalRepoRegistry
public void addPropertyChangeListener(LocalRepoRegistry.Property property, PropertyChangeListener listener)
addPropertyChangeListener
in interface LocalRepoRegistry
public void removePropertyChangeListener(PropertyChangeListener listener)
removePropertyChangeListener
in interface LocalRepoRegistry
public void removePropertyChangeListener(LocalRepoRegistry.Property property, PropertyChangeListener listener)
removePropertyChangeListener
in interface LocalRepoRegistry
protected void firePropertyChange(LocalRepoRegistry.Property property, Object oldValue, Object newValue)
Copyright © 2013–2019. All rights reserved.