Enum Class ProductFilter

java.lang.Object
java.lang.Enum<ProductFilter>
com.atlassian.plugin.spring.scanner.ProductFilter
All Implemented Interfaces:
Serializable, Comparable<ProductFilter>, Constable

public enum ProductFilter extends Enum<ProductFilter>
An enum representing the products that we can filter beans by. This enum is used not only within this library, but may also be used by any other library/plugin that needs a list of products to filter by. Example: Atlassian Connect uses this enum to filter out product-specific connect modules. Moral of the story: Don't remove this.
  • Enum Constant Details

  • Method Details

    • values

      public static ProductFilter[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static ProductFilter valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null
    • hasProduct

      public static boolean hasProduct(String productName)
      Indicates whether this enum contains the given product. Equivalent to calling valueOf(String) and seeing whether an IllegalArgumentException is thrown.
      Parameters:
      productName - the uppercase product name, or the literal String ALL
      Returns:
      see description
    • getPerProductFile

      public String getPerProductFile(String fileStem)
      Returns a qualified version of the given filename stem, generated by appending a product-specific suffix to it.
      Parameters:
      fileStem - the file stem to which to append the suffix
      Returns:
      the complete file name