Interface NamingPolicy

All Known Implementing Classes:
NamingPolicy.HashPrefixed, StandardNamingPolicy

public interface NamingPolicy
RPM repository metadata files naming policy.
Since:
0.3
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Interface
    Description
    static final class 
    Add hash prefix to names.
  • Method Summary

    Modifier and Type
    Method
    Description
    fullName(XmlPackage source, String prefix)
    Full relative path for the metadata source file, with extension.
    name(String source, Path content)
    Name for source with its content, without file extension.
  • Method Details

    • name

      String name(String source, Path content) throws IOException
      Name for source with its content, without file extension.
      Parameters:
      source - Metadata file name
      content - Metadata file content
      Returns:
      File name
      Throws:
      IOException - On error
    • fullName

      String fullName(XmlPackage source, String prefix)
      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.
      Parameters:
      source - Source metadata
      prefix - Source prefix
      Returns:
      File name