Class AbstractArtifactFeatureFilter

    • Constructor Summary

      Constructors 
      Constructor Description
      AbstractArtifactFeatureFilter​(java.lang.String include, java.lang.String exclude)  
    • 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 customized
      java.util.Set<Artifact> filter​(java.util.Set<Artifact> artifacts)
      This function determines if filtering needs to be performed.
      protected abstract java.lang.String getArtifactFeature​(Artifact artifact)
      Should return the type or classifier of the given artifact, so that we can filter it
      java.util.List<java.lang.String> getExcludes()  
      java.util.List<java.lang.String> getIncludes()  
      void setExcludes​(java.lang.String excludeString)  
      void setIncludes​(java.lang.String includeString)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • AbstractArtifactFeatureFilter

        public AbstractArtifactFeatureFilter​(java.lang.String include,
                                             java.lang.String exclude)
        Parameters:
        include - comma separated list with includes.
        exclude - comma separated list with excludes.
    • Method Detail

      • filter

        public java.util.Set<Artifact> filter​(java.util.Set<Artifact> artifacts)
        This function determines if filtering needs to be performed. Includes are processed before Excludes.
        Parameters:
        artifacts - the set of dependencies to filter.
        Returns:
        a Set of filtered dependencies.
      • getArtifactFeature

        protected abstract java.lang.String getArtifactFeature​(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)
        Parameters:
        excludeString - comma separated list with excludes.
      • setIncludes

        public void setIncludes​(java.lang.String includeString)
        Parameters:
        includeString - comma separated list with includes.
      • getExcludes

        public java.util.List<java.lang.String> getExcludes()
        Returns:
        Returns the excludes.
      • getIncludes

        public java.util.List<java.lang.String> getIncludes()
        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 feature
        rhs - String feature from exclude or include list
        Returns:
        boolean true if features match