Class ArtifactTypeUtil


  • public final class ArtifactTypeUtil
    extends Object
    Author:
    eric.wittmann@gmail.com
    • Method Detail

      • determineArtifactType

        public static ArtifactType determineArtifactType​(ContentHandle content,
                                                         ArtifactType xArtifactType,
                                                         String contentType)
        Figures out the artifact type in the following order of precedent:

        1) The provided X-Registry-ArtifactType header 2) A hint provided in the Content-Type header 3) Determined from the content itself

        Parameters:
        content - the content
        xArtifactType - the artifact type
        ct - content type from request API