Package com.artipie.rpm
Enum Class StandardNamingPolicy
- All Implemented Interfaces:
NamingPolicy
,Serializable
,Comparable<StandardNamingPolicy>
,Constable
Standard naming policies.
- Since:
- 0.6
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
Nested classes/interfaces inherited from interface com.artipie.rpm.NamingPolicy
NamingPolicy.HashPrefixed
-
Enum Constant Summary
-
Method Summary
Modifier and TypeMethodDescriptionfullName
(XmlPackage source, String prefix) Full relative path for the metadata source file, with extension.Name for source with its content, without file extension.static StandardNamingPolicy
Returns the enum constant of this class with the specified name.static StandardNamingPolicy[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
PLAIN
Plain simple names. -
SHA1
Add SHA1 prefixes to names. -
SHA256
Add SHA256 prefixes to names.
-
-
Method Details
-
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
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 nameNullPointerException
- if the argument is null
-
name
Description copied from interface:NamingPolicy
Name for source with its content, without file extension.- Specified by:
name
in interfaceNamingPolicy
- Parameters:
source
- Metadata file namecontent
- Metadata file content- Returns:
- File name
- Throws:
IOException
- On error
-
fullName
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 interfaceNamingPolicy
- Parameters:
source
- Source metadataprefix
- Source prefix- Returns:
- File name
-