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 java.lang.Object implements org.eclipse.aether.spi.connector.filter.RemoteRepositoryFilterSource
Support class forRemoteRepositoryFilterSourceimplementations.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
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected static classRemoteRepositoryFilterSourceSupport.SimpleResultSimpleRemoteRepositoryFilter.Resultimmutable implementation.
-
Constructor Summary
Constructors Modifier Constructor Description protectedRemoteRepositoryFilterSourceSupport(java.lang.String name)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected java.lang.StringconfigPropKey(java.lang.String name)Utility method to create scoped configuration property key of given name.protected java.nio.file.PathgetBasedir(org.eclipse.aether.RepositorySystemSession session, boolean mayCreate)Uses commonDirectoryUtils.resolveDirectory(RepositorySystemSession, String, String, boolean)to calculate (and maybe create) basedir for this implementation, never returnsnull.protected booleanisEnabled(org.eclipse.aether.RepositorySystemSession session)Returnstrueif session configuration contains this name set totrue.
-
-
-
Constructor Detail
-
RemoteRepositoryFilterSourceSupport
protected RemoteRepositoryFilterSourceSupport(java.lang.String name)
-
-
Method Detail
-
configPropKey
protected java.lang.String configPropKey(java.lang.String name)
Utility method to create scoped configuration property key of given name.
-
isEnabled
protected boolean isEnabled(org.eclipse.aether.RepositorySystemSession session)
Returnstrueif session configuration contains this name set totrue.Default is
false.
-
getBasedir
protected java.nio.file.Path getBasedir(org.eclipse.aether.RepositorySystemSession session, 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.
-
-