001package org.eclipse.aether.impl; 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.Collection; 023 024import org.eclipse.aether.artifact.Artifact; 025import org.eclipse.aether.metadata.Metadata; 026 027/** 028 * A metadata generator that participates in the installation/deployment of artifacts. 029 * 030 * @provisional This type is provisional and can be changed, moved or removed without prior notice. 031 */ 032public interface MetadataGenerator 033{ 034 035 /** 036 * Prepares the generator to transform artifacts. 037 * 038 * @param artifacts The artifacts to install/deploy, must not be {@code null}. 039 * @return The metadata to process (e.g. merge with existing metadata) before artifact transformations, never 040 * {@code null}. 041 */ 042 Collection<? extends Metadata> prepare( Collection<? extends Artifact> artifacts ); 043 044 /** 045 * Enables the metadata generator to transform the specified artifact. 046 * 047 * @param artifact The artifact to transform, must not be {@code null}. 048 * @return The transformed artifact (or just the input artifact), never {@code null}. 049 */ 050 Artifact transformArtifact( Artifact artifact ); 051 052 /** 053 * Allows for metadata generation based on the transformed artifacts. 054 * 055 * @param artifacts The (transformed) artifacts to install/deploy, must not be {@code null}. 056 * @return The additional metadata to process after artifact transformations, never {@code null}. 057 */ 058 Collection<? extends Metadata> finish( Collection<? extends Artifact> artifacts ); 059 060}