Enum Class StandardNamingPolicy

java.lang.Object
java.lang.Enum<StandardNamingPolicy>
com.artipie.rpm.StandardNamingPolicy
All Implemented Interfaces:
NamingPolicy, Serializable, Comparable<StandardNamingPolicy>, Constable

public enum StandardNamingPolicy extends Enum<StandardNamingPolicy> implements NamingPolicy
Standard naming policies.
Since:
0.6
  • Enum Constant Details

  • Method Details

    • values

      public static StandardNamingPolicy[] 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 StandardNamingPolicy 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
    • name

      public String name(String source, Path content) throws IOException
      Description copied from interface: NamingPolicy
      Name for source with its content, without file extension.
      Specified by:
      name in interface NamingPolicy
      Parameters:
      source - Metadata file name
      content - Metadata file content
      Returns:
      File name
      Throws:
      IOException - On error
    • fullName

      public String fullName(XmlPackage source, String prefix)
      Description copied from interface: NamingPolicy
      Full relative path for the metadata source file, with extension. This path is build as `metadata/[prefix]-[sourse-name].xml.gz`. Can be used as a storage key.
      Specified by:
      fullName in interface NamingPolicy
      Parameters:
      source - Source metadata
      prefix - Source prefix
      Returns:
      File name