1 package org.eclipse.aether.artifact;
2
3 /*
4 * Licensed to the Apache Software Foundation (ASF) under one
5 * or more contributor license agreements. See the NOTICE file
6 * distributed with this work for additional information
7 * regarding copyright ownership. The ASF licenses this file
8 * to you under the Apache License, Version 2.0 (the
9 * "License"); you may not use this file except in compliance
10 * with the License. You may obtain a copy of the License at
11 *
12 * http://www.apache.org/licenses/LICENSE-2.0
13 *
14 * Unless required by applicable law or agreed to in writing,
15 * software distributed under the License is distributed on an
16 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
17 * KIND, either express or implied. See the License for the
18 * specific language governing permissions and limitations
19 * under the License.
20 */
21
22 import java.util.Map;
23
24 /**
25 * An artifact type describing artifact characteristics/properties that are common for certain artifacts. Artifact types
26 * are a means to simplify the description of an artifact by referring to an artifact type instead of specifying the
27 * various properties individually.
28 *
29 * @noimplement This interface is not intended to be implemented by clients.
30 * @noextend This interface is not intended to be extended by clients.
31 * @see ArtifactTypeRegistry
32 * @see DefaultArtifact#DefaultArtifact(String, String, String, String, String, ArtifactType)
33 */
34 public interface ArtifactType
35 {
36
37 /**
38 * Gets the identifier of this type, e.g. "maven-plugin" or "test-jar".
39 *
40 * @return The identifier of this type, never {@code null}.
41 * @see ArtifactProperties#TYPE
42 */
43 String getId();
44
45 /**
46 * Gets the file extension to use for artifacts of this type (unless explicitly overridden by the artifact).
47 *
48 * @return The usual file extension, never {@code null}.
49 */
50 String getExtension();
51
52 /**
53 * Gets the classifier to use for artifacts of this type (unless explicitly overridden by the artifact).
54 *
55 * @return The usual classifier or an empty string if none, never {@code null}.
56 */
57 String getClassifier();
58
59 /**
60 * Gets the properties to use for artifacts of this type (unless explicitly overridden by the artifact).
61 *
62 * @return The (read-only) properties, never {@code null}.
63 * @see ArtifactProperties
64 */
65 Map<String, String> getProperties();
66
67 }