KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > maven > artifact > transform > ArtifactTransformationManager


1 package org.apache.maven.artifact.transform;
2
3 /*
4  * Copyright 2001-2005 The Apache Software Foundation.
5  *
6  * Licensed under the Apache License, Version 2.0 (the "License");
7  * you may not use this file except in compliance with the License.
8  * 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, software
13  * distributed under the License is distributed on an "AS IS" BASIS,
14  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15  * See the License for the specific language governing permissions and
16  * limitations under the License.
17  */

18
19 import org.apache.maven.artifact.Artifact;
20 import org.apache.maven.artifact.deployer.ArtifactDeploymentException;
21 import org.apache.maven.artifact.installer.ArtifactInstallationException;
22 import org.apache.maven.artifact.repository.ArtifactRepository;
23 import org.apache.maven.artifact.resolver.ArtifactNotFoundException;
24 import org.apache.maven.artifact.resolver.ArtifactResolutionException;
25
26 import java.util.List JavaDoc;
27
28 /**
29  * Manages multiple ArtifactTransformation instances and applies them in succession.
30  */

31 public interface ArtifactTransformationManager
32 {
33     String JavaDoc ROLE = ArtifactTransformationManager.class.getName();
34
35     /**
36      * Take in a artifact and return the transformed artifact for locating in the remote repository. If no
37      * transformation has occured the original artifact is returned.
38      *
39      * @param artifact Artifact to be transformed.
40      * @param remoteRepositories the repositories to check
41      * @param localRepository the local repository
42      */

43     void transformForResolve( Artifact artifact, List JavaDoc remoteRepositories, ArtifactRepository localRepository )
44         throws ArtifactResolutionException, ArtifactNotFoundException;
45
46     /**
47      * Take in a artifact and return the transformed artifact for locating in the local repository. If no
48      * transformation has occured the original artifact is returned.
49      *
50      * @param artifact Artifact to be transformed.
51      * @param localRepository the local repository it will be stored in
52      */

53     void transformForInstall( Artifact artifact, ArtifactRepository localRepository )
54         throws ArtifactInstallationException;
55
56     /**
57      * Take in a artifact and return the transformed artifact for distributing toa remote repository. If no
58      * transformation has occured the original artifact is returned.
59      *
60      * @param artifact Artifact to be transformed.
61      * @param remoteRepository the repository to deploy to
62      * @param localRepository the local repository the metadata is stored in
63      */

64     void transformForDeployment( Artifact artifact, ArtifactRepository remoteRepository,
65                                  ArtifactRepository localRepository )
66         throws ArtifactDeploymentException;
67
68 }
69
Popular Tags