1 /******************************************************************************* 2 * Copyright (c) 2010, 2014 Sonatype, Inc. 3 * All rights reserved. This program and the accompanying materials 4 * are made available under the terms of the Eclipse Public License v1.0 5 * which accompanies this distribution, and is available at 6 * http://www.eclipse.org/legal/epl-v10.html 7 * 8 * Contributors: 9 * Sonatype, Inc. - initial API and implementation 10 *******************************************************************************/ 11 package org.eclipse.aether.artifact; 12 13 import java.util.Map; 14 15 /** 16 * An artifact type describing artifact characteristics/properties that are common for certain artifacts. Artifact types 17 * are a means to simplify the description of an artifact by referring to an artifact type instead of specifying the 18 * various properties individually. 19 * 20 * @noimplement This interface is not intended to be implemented by clients. 21 * @noextend This interface is not intended to be extended by clients. 22 * @see ArtifactTypeRegistry 23 * @see DefaultArtifact#DefaultArtifact(String, String, String, String, String, ArtifactType) 24 */ 25 public interface ArtifactType 26 { 27 28 /** 29 * Gets the identifier of this type, e.g. "maven-plugin" or "test-jar". 30 * 31 * @return The identifier of this type, never {@code null}. 32 * @see ArtifactProperties#TYPE 33 */ 34 String getId(); 35 36 /** 37 * Gets the file extension to use for artifacts of this type (unless explicitly overridden by the artifact). 38 * 39 * @return The usual file extension, never {@code null}. 40 */ 41 String getExtension(); 42 43 /** 44 * Gets the classifier to use for artifacts of this type (unless explicitly overridden by the artifact). 45 * 46 * @return The usual classifier or an empty string if none, never {@code null}. 47 */ 48 String getClassifier(); 49 50 /** 51 * Gets the properties to use for artifacts of this type (unless explicitly overridden by the artifact). 52 * 53 * @return The (read-only) properties, never {@code null}. 54 * @see ArtifactProperties 55 */ 56 Map<String, String> getProperties(); 57 58 }