1 /* 2 * Licensed to the Apache Software Foundation (ASF) under one 3 * or more contributor license agreements. See the NOTICE file 4 * distributed with this work for additional information 5 * regarding copyright ownership. The ASF licenses this file 6 * to you under the Apache License, Version 2.0 (the 7 * "License"); you may not use this file except in compliance 8 * with the License. You may obtain a copy of the License at 9 * 10 * http://www.apache.org/licenses/LICENSE-2.0 11 * 12 * Unless required by applicable law or agreed to in writing, 13 * software distributed under the License is distributed on an 14 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 * KIND, either express or implied. See the License for the 16 * specific language governing permissions and limitations 17 * under the License. 18 */ 19 package org.eclipse.aether.impl; 20 21 import org.eclipse.aether.RepositorySystemSession; 22 import org.eclipse.aether.deployment.DeployRequest; 23 import org.eclipse.aether.installation.InstallRequest; 24 25 /** 26 * A factory to create metadata generators. Metadata generators can contribute additional metadata during the 27 * installation/deployment of artifacts. 28 * 29 * @provisional This type is provisional and can be changed, moved or removed without prior notice. 30 */ 31 public interface MetadataGeneratorFactory { 32 33 /** 34 * Creates a new metadata generator for the specified install request. 35 * 36 * @param session The repository system session from which to configure the generator, must not be {@code null}. 37 * @param request The install request the metadata generator is used for, must not be {@code null}. 38 * @return The metadata generator for the request or {@code null} if none. 39 */ 40 MetadataGenerator newInstance(RepositorySystemSession session, InstallRequest request); 41 42 /** 43 * Creates a new metadata generator for the specified deploy request. 44 * 45 * @param session The repository system session from which to configure the generator, must not be {@code null}. 46 * @param request The deploy request the metadata generator is used for, must not be {@code null}. 47 * @return The metadata generator for the request or {@code null} if none. 48 */ 49 MetadataGenerator newInstance(RepositorySystemSession session, DeployRequest request); 50 51 /** 52 * The priority of this factory. Factories with higher priority are invoked before those with lower priority. 53 * 54 * @return The priority of this factory. 55 */ 56 float getPriority(); 57 }