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