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.impl; 020 021import org.eclipse.aether.RepositorySystemSession; 022import org.eclipse.aether.deployment.DeployRequest; 023import org.eclipse.aether.installation.InstallRequest; 024 025/** 026 * A factory to create metadata generators. Metadata generators can contribute additional metadata during the 027 * installation/deployment of artifacts. 028 * 029 * @provisional This type is provisional and can be changed, moved or removed without prior notice. 030 */ 031public interface MetadataGeneratorFactory { 032 033 /** 034 * Creates a new metadata generator for the specified install request. 035 * 036 * @param session The repository system session from which to configure the generator, must not be {@code null}. 037 * @param request The install request the metadata generator is used for, must not be {@code null}. 038 * @return The metadata generator for the request or {@code null} if none. 039 */ 040 MetadataGenerator newInstance(RepositorySystemSession session, InstallRequest request); 041 042 /** 043 * Creates a new metadata generator for the specified deploy request. 044 * 045 * @param session The repository system session from which to configure the generator, must not be {@code null}. 046 * @param request The deploy request the metadata generator is used for, must not be {@code null}. 047 * @return The metadata generator for the request or {@code null} if none. 048 */ 049 MetadataGenerator newInstance(RepositorySystemSession session, DeployRequest request); 050 051 /** 052 * The priority of this factory. Factories with higher priority are invoked before those with lower priority. 053 * 054 * @return The priority of this factory. 055 */ 056 float getPriority(); 057}