001package org.eclipse.aether.artifact;
002
003/*
004 * Licensed to the Apache Software Foundation (ASF) under one
005 * or more contributor license agreements.  See the NOTICE file
006 * distributed with this work for additional information
007 * regarding copyright ownership.  The ASF licenses this file
008 * to you under the Apache License, Version 2.0 (the
009 * "License"); you may not use this file except in compliance
010 * with the License.  You may obtain a copy of the License at
011 * 
012 *  http://www.apache.org/licenses/LICENSE-2.0
013 * 
014 * Unless required by applicable law or agreed to in writing,
015 * software distributed under the License is distributed on an
016 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
017 * KIND, either express or implied.  See the License for the
018 * specific language governing permissions and limitations
019 * under the License.
020 */
021
022import java.util.Map;
023
024/**
025 * An artifact type describing artifact characteristics/properties that are common for certain artifacts. Artifact types
026 * are a means to simplify the description of an artifact by referring to an artifact type instead of specifying the
027 * various properties individually.
028 * 
029 * @noimplement This interface is not intended to be implemented by clients.
030 * @noextend This interface is not intended to be extended by clients.
031 * @see ArtifactTypeRegistry
032 * @see DefaultArtifact#DefaultArtifact(String, String, String, String, String, ArtifactType)
033 */
034public interface ArtifactType
035{
036
037    /**
038     * Gets the identifier of this type, e.g. "maven-plugin" or "test-jar".
039     * 
040     * @return The identifier of this type, never {@code null}.
041     * @see ArtifactProperties#TYPE
042     */
043    String getId();
044
045    /**
046     * Gets the file extension to use for artifacts of this type (unless explicitly overridden by the artifact).
047     * 
048     * @return The usual file extension, never {@code null}.
049     */
050    String getExtension();
051
052    /**
053     * Gets the classifier to use for artifacts of this type (unless explicitly overridden by the artifact).
054     * 
055     * @return The usual classifier or an empty string if none, never {@code null}.
056     */
057    String getClassifier();
058
059    /**
060     * Gets the properties to use for artifacts of this type (unless explicitly overridden by the artifact).
061     * 
062     * @return The (read-only) properties, never {@code null}.
063     * @see ArtifactProperties
064     */
065    Map<String, String> getProperties();
066
067}