Class AbstractArtifactFeatureFilter
- java.lang.Object
-
- org.apache.maven.shared.artifact.filter.collection.AbstractArtifactsFilter
-
- org.apache.maven.shared.artifact.filter.collection.AbstractArtifactFeatureFilter
-
- All Implemented Interfaces:
ArtifactsFilter
- Direct Known Subclasses:
ArtifactIdFilter
,ClassifierFilter
,GroupIdFilter
,TypeFilter
public abstract class AbstractArtifactFeatureFilter extends AbstractArtifactsFilter
This is the common base class of ClassifierFilter and TypeFilter- Author:
- Richard van der Hoff
-
-
Constructor Summary
Constructors Constructor Description AbstractArtifactFeatureFilter(java.lang.String include, java.lang.String exclude)
Constructor for AbstractArtifactFeatureFilter.
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected boolean
compareFeatures(java.lang.String lhs, java.lang.String rhs)
Allows Feature comparison to be customizedjava.util.Set<org.apache.maven.artifact.Artifact>
filter(java.util.Set<org.apache.maven.artifact.Artifact> artifacts)
filter.protected abstract java.lang.String
getArtifactFeature(org.apache.maven.artifact.Artifact artifact)
Should return the type or classifier of the given artifact, so that we can filter itjava.util.List<java.lang.String>
getExcludes()
Getter for the fieldexcludes
.java.util.List<java.lang.String>
getIncludes()
Getter for the fieldincludes
.void
setExcludes(java.lang.String excludeString)
Setter for the fieldexcludes
.void
setIncludes(java.lang.String includeString)
Setter for the fieldincludes
.-
Methods inherited from class org.apache.maven.shared.artifact.filter.collection.AbstractArtifactsFilter
isArtifactIncluded
-
-
-
-
Method Detail
-
filter
public java.util.Set<org.apache.maven.artifact.Artifact> filter(java.util.Set<org.apache.maven.artifact.Artifact> artifacts)
filter.
This function determines if filtering needs to be performed. Includes are processed before Excludes.- Parameters:
artifacts
-Artifact
- Returns:
- Set of artifacts.
-
getArtifactFeature
protected abstract java.lang.String getArtifactFeature(org.apache.maven.artifact.Artifact artifact)
Should return the type or classifier of the given artifact, so that we can filter it- Parameters:
artifact
- artifact to return type or classifier of- Returns:
- type or classifier
-
setExcludes
public void setExcludes(java.lang.String excludeString)
Setter for the field
excludes
.- Parameters:
excludeString
- comma separated list with excludes.
-
setIncludes
public void setIncludes(java.lang.String includeString)
Setter for the field
includes
.- Parameters:
includeString
- comma separated list with includes.
-
getExcludes
public java.util.List<java.lang.String> getExcludes()
Getter for the field
excludes
.- Returns:
- Returns the excludes.
-
getIncludes
public java.util.List<java.lang.String> getIncludes()
Getter for the field
includes
.- Returns:
- Returns the includes.
-
compareFeatures
protected boolean compareFeatures(java.lang.String lhs, java.lang.String rhs)
Allows Feature comparison to be customized- Parameters:
lhs
- String artifact's featurerhs
- String feature from exclude or include list- Returns:
- boolean true if features match
-
-