Class RemoteRepositoryFilterSourceSupport
java.lang.Object
org.eclipse.aether.internal.impl.filter.RemoteRepositoryFilterSourceSupport
- All Implemented Interfaces:
RemoteRepositoryFilterSource
- Direct Known Subclasses:
GroupIdRemoteRepositoryFilterSource,PrefixesRemoteRepositoryFilterSource
public abstract class RemoteRepositoryFilterSourceSupport
extends Object
implements 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
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected static classSimpleRemoteRepositoryFilter.Resultimmutable implementation. -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected StringconfigPropKey(String name) Utility method to create scoped configuration property key of given name.protected PathgetBasedir(RepositorySystemSession session, boolean mayCreate) Uses commonDirectoryUtils.resolveDirectory(RepositorySystemSession, String, String, boolean)to calculate (and maybe create) basedir for this implementation, never returnsnull.protected booleanisEnabled(RepositorySystemSession session) Returnstrueif session configuration contains this name set totrue.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_PROP_PREFIX
- See Also:
-
CONF_NAME_BASEDIR
- See Also:
-
LOCAL_REPO_PREFIX_DIR
- See Also:
-
name
-
-
Constructor Details
-
RemoteRepositoryFilterSourceSupport
-
-
Method Details
-
configPropKey
Utility method to create scoped configuration property key of given name. -
isEnabled
Returnstrueif session configuration contains this name set totrue.Default is
false. -
getBasedir
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.
-