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.transform; 020 021import java.io.File; 022import java.io.IOException; 023import java.io.InputStream; 024 025import org.eclipse.aether.artifact.Artifact; 026 027/** 028 * Can transform a file while installing/deploying 029 * 030 * @author Robert Scholte 031 * @since 1.3.0 032 * @deprecated Without any direct replacement for now. This API is OOM-prone, and also lacks a lot of context about 033 * transforming. 034 */ 035@Deprecated 036public interface FileTransformer { 037 /** 038 * Transform the target location 039 * 040 * @param artifact the original artifact 041 * @return the transformed artifact 042 */ 043 Artifact transformArtifact(Artifact artifact); 044 045 /** 046 * Transform the data 047 * 048 * @param file the file with the original data 049 * @return the transformed data 050 * @throws IOException If an I/O error occurred 051 * @throws TransformException If the file could not be transformed 052 */ 053 InputStream transformData(File file) throws IOException, TransformException; 054}