Setting deprecations on interfaces / classes not to use.

git-svn-id: https://svn.apache.org/repos/asf/maven/archiva/trunk@585564 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Joakim Erdfelt 2007-10-17 16:39:06 +00:00
parent 544c45f048
commit f3d43d4d4d
6 changed files with 56 additions and 0 deletions

View File

@ -22,6 +22,10 @@ package org.apache.maven.archiva.repository.layout;
import org.apache.maven.archiva.model.ArchivaArtifact; import org.apache.maven.archiva.model.ArchivaArtifact;
import org.apache.maven.archiva.model.ArtifactReference; import org.apache.maven.archiva.model.ArtifactReference;
import org.apache.maven.archiva.model.VersionedReference; import org.apache.maven.archiva.model.VersionedReference;
import org.apache.maven.archiva.repository.ManagedRepositoryContent;
import org.apache.maven.archiva.repository.RemoteRepositoryContent;
import org.apache.maven.archiva.repository.RepositoryContentFactory;
import org.apache.maven.archiva.repository.content.RepositoryRequest;
/** /**
* BidirectionalRepositoryLayout - Similar in scope to ArtifactRepositoryLayout, but does * BidirectionalRepositoryLayout - Similar in scope to ArtifactRepositoryLayout, but does
@ -29,6 +33,8 @@ import org.apache.maven.archiva.model.VersionedReference;
* *
* @author <a href="mailto:joakime@apache.org">Joakim Erdfelt</a> * @author <a href="mailto:joakime@apache.org">Joakim Erdfelt</a>
* @version $Id$ * @version $Id$
*
* @deprecated use {@link RepositoryContentFactory} instead.
*/ */
public interface BidirectionalRepositoryLayout public interface BidirectionalRepositoryLayout
{ {
@ -36,12 +42,16 @@ public interface BidirectionalRepositoryLayout
* Get the identifier for this layout. * Get the identifier for this layout.
* *
* @return the identifier for this layout. * @return the identifier for this layout.
*
* @deprecated use {@link ManagedRepositoryContent#getId()} or {@link RemoteRepositoryContent#getId()} instead.
*/ */
public String getId(); public String getId();
/** /**
* Given a repository relative path, return <code>true</code> if the path is valid * Given a repository relative path, return <code>true</code> if the path is valid
* according to the repository layout. * according to the repository layout.
*
* @deprecated use {@link RepositoryRequest#toArtifactReference(String)} instead.
*/ */
public boolean isValidPath( String path ); public boolean isValidPath( String path );
@ -50,6 +60,8 @@ public interface BidirectionalRepositoryLayout
* *
* @param artifact the artifact to use. * @param artifact the artifact to use.
* @return the relative path to the artifact. * @return the relative path to the artifact.
*
* @deprecated use {@link ManagedRepositoryContent#toPath(ArchivaArtifact)} instead.
*/ */
public String toPath( ArchivaArtifact artifact ); public String toPath( ArchivaArtifact artifact );
@ -58,6 +70,9 @@ public interface BidirectionalRepositoryLayout
* *
* @param reference the artifact reference to use. * @param reference the artifact reference to use.
* @return the relative path to the artifact. * @return the relative path to the artifact.
*
* @deprecated use {@link ManagedRepositoryContent#toPath(ArtifactReference))} or
* {@link RemoteRepositoryContent#toPath(ArtifactReference)} instead.
*/ */
public String toPath( ArtifactReference reference ); public String toPath( ArtifactReference reference );
@ -68,6 +83,9 @@ public interface BidirectionalRepositoryLayout
* @return the {@link ArchivaArtifact} representing the path. (or null if path cannot be converted to * @return the {@link ArchivaArtifact} representing the path. (or null if path cannot be converted to
* an {@link ArchivaArtifact}) * an {@link ArchivaArtifact})
* @throws LayoutException if there was a problem converting the path to an artifact. * @throws LayoutException if there was a problem converting the path to an artifact.
*
* @deprecated use {@link ManagedRepositoryContent#toArtifactReference(String))} or
* {@link RemoteRepositoryContent#toArtifactReference(String)} instead.
*/ */
public ArchivaArtifact toArtifact( String path ) public ArchivaArtifact toArtifact( String path )
throws LayoutException; throws LayoutException;
@ -79,6 +97,9 @@ public interface BidirectionalRepositoryLayout
* @return the {@link ArtifactReference} representing the path. (or null if path cannot be converted to * @return the {@link ArtifactReference} representing the path. (or null if path cannot be converted to
* a {@link ArtifactReference}) * a {@link ArtifactReference})
* @throws LayoutException if there was a problem converting the path to an artifact. * @throws LayoutException if there was a problem converting the path to an artifact.
*
* @deprecated use {@link ManagedRepositoryContent#toArtifactReference(String))} or
* {@link RemoteRepositoryContent#toArtifactReference(String)} instead.
*/ */
public ArtifactReference toArtifactReference( String path ) public ArtifactReference toArtifactReference( String path )
throws LayoutException; throws LayoutException;

View File

@ -24,6 +24,8 @@ import org.apache.maven.archiva.configuration.AbstractRepositoryConfiguration;
import org.apache.maven.archiva.configuration.ArchivaConfiguration; import org.apache.maven.archiva.configuration.ArchivaConfiguration;
import org.apache.maven.archiva.configuration.ConfigurationNames; import org.apache.maven.archiva.configuration.ConfigurationNames;
import org.apache.maven.archiva.model.ArchivaArtifact; import org.apache.maven.archiva.model.ArchivaArtifact;
import org.apache.maven.archiva.repository.RepositoryContentFactory;
import org.apache.maven.archiva.repository.content.RepositoryRequest;
import org.codehaus.plexus.logging.AbstractLogEnabled; import org.codehaus.plexus.logging.AbstractLogEnabled;
import org.codehaus.plexus.personality.plexus.lifecycle.phase.Initializable; import org.codehaus.plexus.personality.plexus.lifecycle.phase.Initializable;
import org.codehaus.plexus.personality.plexus.lifecycle.phase.InitializationException; import org.codehaus.plexus.personality.plexus.lifecycle.phase.InitializationException;
@ -39,6 +41,9 @@ import java.util.Map;
* *
* @author <a href="mailto:joakime@apache.org">Joakim Erdfelt</a> * @author <a href="mailto:joakime@apache.org">Joakim Erdfelt</a>
* @version $Id$ * @version $Id$
*
* @deprecated use {@link RepositoryContentFactory} instead.
*
* @plexus.component role="org.apache.maven.archiva.repository.layout.BidirectionalRepositoryLayoutFactory" * @plexus.component role="org.apache.maven.archiva.repository.layout.BidirectionalRepositoryLayoutFactory"
*/ */
public class BidirectionalRepositoryLayoutFactory public class BidirectionalRepositoryLayoutFactory
@ -57,6 +62,10 @@ public class BidirectionalRepositoryLayoutFactory
private Map repositoryMap = new HashMap(); private Map repositoryMap = new HashMap();
/**
* @deprecated use {@link RepositoryContentFactory#getManagedRepositoryContent(String)} or
* {@link RepositoryContentFactory#getRemoteRepositoryContent(String)} instead.
*/
public BidirectionalRepositoryLayout getLayout( String type ) public BidirectionalRepositoryLayout getLayout( String type )
throws LayoutException throws LayoutException
{ {
@ -69,6 +78,9 @@ public class BidirectionalRepositoryLayoutFactory
return (BidirectionalRepositoryLayout) layouts.get( type ); return (BidirectionalRepositoryLayout) layouts.get( type );
} }
/**
* @deprecated use {@link RepositoryRequest#toArtifactReference(String)} instead.
*/
public BidirectionalRepositoryLayout getLayoutForPath( String path ) public BidirectionalRepositoryLayout getLayoutForPath( String path )
throws LayoutException throws LayoutException
{ {
@ -84,6 +96,10 @@ public class BidirectionalRepositoryLayoutFactory
} }
/**
* @deprecated use {@link RepositoryContentFactory#getManagedRepositoryContent(String)} or
* {@link RepositoryContentFactory#getRemoteRepositoryContent(String)} instead.
*/
public BidirectionalRepositoryLayout getLayout( ArchivaArtifact artifact ) public BidirectionalRepositoryLayout getLayout( ArchivaArtifact artifact )
throws LayoutException throws LayoutException
{ {

View File

@ -23,6 +23,8 @@ import org.apache.commons.lang.StringUtils;
import org.apache.maven.archiva.common.utils.VersionUtil; import org.apache.maven.archiva.common.utils.VersionUtil;
import org.apache.maven.archiva.model.ArchivaArtifact; import org.apache.maven.archiva.model.ArchivaArtifact;
import org.apache.maven.archiva.model.ArtifactReference; import org.apache.maven.archiva.model.ArtifactReference;
import org.apache.maven.archiva.repository.ManagedRepositoryContent;
import org.apache.maven.archiva.repository.RemoteRepositoryContent;
import org.apache.maven.archiva.repository.content.ArtifactExtensionMapping; import org.apache.maven.archiva.repository.content.ArtifactExtensionMapping;
/** /**
@ -31,6 +33,7 @@ import org.apache.maven.archiva.repository.content.ArtifactExtensionMapping;
* @author <a href="mailto:joakime@apache.org">Joakim Erdfelt</a> * @author <a href="mailto:joakime@apache.org">Joakim Erdfelt</a>
* @version $Id$ * @version $Id$
* @plexus.component role-hint="default" * @plexus.component role-hint="default"
* @deprecated to not use directly. Use {@link ManagedRepositoryContent} or {@link RemoteRepositoryContent} instead.
*/ */
public class DefaultBidirectionalRepositoryLayout public class DefaultBidirectionalRepositoryLayout
implements BidirectionalRepositoryLayout implements BidirectionalRepositoryLayout

View File

@ -1,5 +1,8 @@
package org.apache.maven.archiva.repository.layout; package org.apache.maven.archiva.repository.layout;
import org.apache.maven.archiva.repository.ManagedRepositoryContent;
import org.apache.maven.archiva.repository.RemoteRepositoryContent;
/* /*
* Licensed to the Apache Software Foundation (ASF) under one * Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file * or more contributor license agreements. See the NOTICE file
@ -24,6 +27,7 @@ package org.apache.maven.archiva.repository.layout;
* *
* @author <a href="mailto:joakime@apache.org">Joakim Erdfelt</a> * @author <a href="mailto:joakime@apache.org">Joakim Erdfelt</a>
* @version $Id$ * @version $Id$
* @deprecated to not use directly. Use {@link ManagedRepositoryContent} or {@link RemoteRepositoryContent} instead.
*/ */
public class FilenameParts public class FilenameParts
{ {

View File

@ -22,6 +22,8 @@ package org.apache.maven.archiva.repository.layout;
import org.apache.commons.lang.StringUtils; import org.apache.commons.lang.StringUtils;
import org.apache.maven.archiva.model.ArchivaArtifact; import org.apache.maven.archiva.model.ArchivaArtifact;
import org.apache.maven.archiva.model.ArtifactReference; import org.apache.maven.archiva.model.ArtifactReference;
import org.apache.maven.archiva.repository.ManagedRepositoryContent;
import org.apache.maven.archiva.repository.RemoteRepositoryContent;
import org.apache.maven.archiva.repository.content.ArtifactExtensionMapping; import org.apache.maven.archiva.repository.content.ArtifactExtensionMapping;
import java.util.HashMap; import java.util.HashMap;
@ -33,6 +35,8 @@ import java.util.Map;
* @author <a href="mailto:joakime@apache.org">Joakim Erdfelt</a> * @author <a href="mailto:joakime@apache.org">Joakim Erdfelt</a>
* @version $Id$ * @version $Id$
* @plexus.component role-hint="legacy" * @plexus.component role-hint="legacy"
*
* @deprecated to not use directly. Use {@link ManagedRepositoryContent} or {@link RemoteRepositoryContent} instead.
*/ */
public class LegacyBidirectionalRepositoryLayout public class LegacyBidirectionalRepositoryLayout
implements BidirectionalRepositoryLayout implements BidirectionalRepositoryLayout

View File

@ -21,12 +21,18 @@ package org.apache.maven.archiva.repository.layout;
import org.apache.commons.lang.StringUtils; import org.apache.commons.lang.StringUtils;
import org.apache.maven.archiva.common.utils.VersionUtil; import org.apache.maven.archiva.common.utils.VersionUtil;
import org.apache.maven.archiva.repository.ManagedRepositoryContent;
import org.apache.maven.archiva.repository.RemoteRepositoryContent;
import org.apache.maven.archiva.repository.RepositoryContentFactory;
/** /**
* RepositoryLayoutUtils - utility methods common for most BidirectionalRepositoryLayout implementation. * RepositoryLayoutUtils - utility methods common for most BidirectionalRepositoryLayout implementation.
* *
* @author <a href="mailto:joakime@apache.org">Joakim Erdfelt</a> * @author <a href="mailto:joakime@apache.org">Joakim Erdfelt</a>
* @version $Id$ * @version $Id$
*
* @deprecated use {@link RepositoryContentFactory} and {@link ManagedRepositoryContent}
* or {@link RemoteRepositoryContent} instead.
*/ */
public class RepositoryLayoutUtils public class RepositoryLayoutUtils
{ {
@ -61,6 +67,7 @@ public class RepositoryLayoutUtils
* (null to allow algorithm to calculate one) * (null to allow algorithm to calculate one)
* @return the parts of the filename. * @return the parts of the filename.
* @throws LayoutException * @throws LayoutException
* @deprecated to not use directly. Use {@link ManagedRepositoryContent} or {@link RemoteRepositoryContent} instead.
*/ */
public static FilenameParts splitFilename( String filename, String possibleArtifactId ) throws LayoutException public static FilenameParts splitFilename( String filename, String possibleArtifactId ) throws LayoutException
{ {
@ -85,6 +92,7 @@ public class RepositoryLayoutUtils
* (null to allow algorithm to calculate one) * (null to allow algorithm to calculate one)
* @return the parts of the filename. * @return the parts of the filename.
* @throws LayoutException * @throws LayoutException
* @deprecated to not use directly. Use {@link ManagedRepositoryContent} or {@link RemoteRepositoryContent} instead.
*/ */
public static FilenameParts splitFilename( String filename, String possibleArtifactId, public static FilenameParts splitFilename( String filename, String possibleArtifactId,
String possibleVersion ) throws LayoutException String possibleVersion ) throws LayoutException