Class RemoteRepositoryFilterSourceSupport
java.lang.Object
org.eclipse.aether.internal.impl.filter.RemoteRepositoryFilterSourceSupport
- All Implemented Interfaces:
org.eclipse.aether.spi.connector.filter.RemoteRepositoryFilterSource
- Direct Known Subclasses:
GroupIdRemoteRepositoryFilterSource,PrefixesRemoteRepositoryFilterSource
public abstract class RemoteRepositoryFilterSourceSupport
extends Object
implements org.eclipse.aether.spi.connector.filter.RemoteRepositoryFilterSource
Support class for
RemoteRepositoryFilterSource implementations.
Support class for implementing RemoteRepositoryFilterSource. It implements basic support
like optional "basedir" calculation, handling of "enabled" flag.
The configuration keys supported:
aether.remoteRepositoryFilter.${id}.enabled(boolean) must be explicitly set to "true" to become enabledaether.remoteRepositoryFilter.${id}.basedir(string, path) directory from where implementation can use files. If unset, default value is ".remoteRepositoryFilters/${id}" and is resolved from local repository basedir.
- Since:
- 1.9.0
-
Field Summary
Fields -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedRemoteRepositoryFilterSourceSupport(org.eclipse.aether.spi.remoterepo.RepositoryKeyFunctionFactory repositoryKeyFunctionFactory) -
Method Summary
Modifier and TypeMethodDescriptionprotected PathgetBasedir(org.eclipse.aether.RepositorySystemSession session, String defaultValue, String configPropKey, boolean mayCreate) Uses commonDirectoryUtils.resolveDirectory(RepositorySystemSession, String, String, boolean)to calculate (and maybe create) basedir for this implementation, never returnsnull.protected abstract booleanisEnabled(org.eclipse.aether.RepositorySystemSession session) Returnstrueif session configuration contains this name set totrue.protected org.eclipse.aether.repository.RemoteRepositorynormalizeRemoteRepository(org.eclipse.aether.RepositorySystemSession session, org.eclipse.aether.repository.RemoteRepository remoteRepository) We use remote repositories as keys, so normalize them.repositoryKeys(org.eclipse.aether.RepositorySystemSession session, org.eclipse.aether.repository.RemoteRepository repository) Returns repository keys to be used on file system layout for user provided files.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.eclipse.aether.spi.connector.filter.RemoteRepositoryFilterSource
getRemoteRepositoryFilter
-
Field Details
-
CONFIG_PROPS_PREFIX
- See Also:
-
logger
-
-
Constructor Details
-
RemoteRepositoryFilterSourceSupport
protected RemoteRepositoryFilterSourceSupport(org.eclipse.aether.spi.remoterepo.RepositoryKeyFunctionFactory repositoryKeyFunctionFactory)
-
-
Method Details
-
isEnabled
Returnstrueif session configuration contains this name set totrue.Default is
true. -
getBasedir
protected Path getBasedir(org.eclipse.aether.RepositorySystemSession session, String defaultValue, String configPropKey, boolean mayCreate) Uses commonDirectoryUtils.resolveDirectory(RepositorySystemSession, String, String, boolean)to calculate (and maybe create) basedir for this implementation, never returnsnull. The returnedPathmay not exists, if invoked withmayCreatebeingfalse.Default value is
${LOCAL_REPOSITORY}/.checksums.- Returns:
- The
Pathof basedir, nevernull.
-
normalizeRemoteRepository
protected org.eclipse.aether.repository.RemoteRepository normalizeRemoteRepository(org.eclipse.aether.RepositorySystemSession session, org.eclipse.aether.repository.RemoteRepository remoteRepository) We use remote repositories as keys, so normalize them.- Since:
- 2.0.14
- See Also:
-
repositoryKeys
protected List<String> repositoryKeys(org.eclipse.aether.RepositorySystemSession session, org.eclipse.aether.repository.RemoteRepository repository) Returns repository keys to be used on file system layout for user provided files. They are ordered as "most specific" (usingRepositoryKeyFunctionFactory.trackingRepositoryKeyFunction(RepositorySystemSession)) to simple "id based" one. This allows user to keep using plain ID, but also to provide very narrowly targeted input files, when needed.- Since:
- 2.0.14
-