import org.apache.maven.archiva.model.ArchivaArtifact;
import org.apache.maven.archiva.model.ArtifactReference;
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
*
* @author <a href="mailto:joakime@apache.org">Joakim Erdfelt</a>
* @version $Id$
+ *
+ * @deprecated use {@link RepositoryContentFactory} instead.
*/
public interface BidirectionalRepositoryLayout
{
* Get the identifier for this layout.
*
* @return the identifier for this layout.
+ *
+ * @deprecated use {@link ManagedRepositoryContent#getId()} or {@link RemoteRepositoryContent#getId()} instead.
*/
public String getId();
/**
* Given a repository relative path, return <code>true</code> if the path is valid
* according to the repository layout.
+ *
+ * @deprecated use {@link RepositoryRequest#toArtifactReference(String)} instead.
*/
public boolean isValidPath( String path );
*
* @param artifact the artifact to use.
* @return the relative path to the artifact.
+ *
+ * @deprecated use {@link ManagedRepositoryContent#toPath(ArchivaArtifact)} instead.
*/
public String toPath( ArchivaArtifact artifact );
*
* @param reference the artifact reference to use.
* @return the relative path to the artifact.
+ *
+ * @deprecated use {@link ManagedRepositoryContent#toPath(ArtifactReference))} or
+ * {@link RemoteRepositoryContent#toPath(ArtifactReference)} instead.
*/
public String toPath( ArtifactReference reference );
* @return the {@link ArchivaArtifact} representing the path. (or null if path cannot be converted to
* an {@link ArchivaArtifact})
* @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 )
throws LayoutException;
* @return the {@link ArtifactReference} representing the path. (or null if path cannot be converted to
* a {@link ArtifactReference})
* @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 )
throws LayoutException;
import org.apache.maven.archiva.configuration.ArchivaConfiguration;
import org.apache.maven.archiva.configuration.ConfigurationNames;
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.personality.plexus.lifecycle.phase.Initializable;
import org.codehaus.plexus.personality.plexus.lifecycle.phase.InitializationException;
*
* @author <a href="mailto:joakime@apache.org">Joakim Erdfelt</a>
* @version $Id$
+ *
+ * @deprecated use {@link RepositoryContentFactory} instead.
+ *
* @plexus.component role="org.apache.maven.archiva.repository.layout.BidirectionalRepositoryLayoutFactory"
*/
public class BidirectionalRepositoryLayoutFactory
private Map repositoryMap = new HashMap();
+ /**
+ * @deprecated use {@link RepositoryContentFactory#getManagedRepositoryContent(String)} or
+ * {@link RepositoryContentFactory#getRemoteRepositoryContent(String)} instead.
+ */
public BidirectionalRepositoryLayout getLayout( String type )
throws LayoutException
{
return (BidirectionalRepositoryLayout) layouts.get( type );
}
+ /**
+ * @deprecated use {@link RepositoryRequest#toArtifactReference(String)} instead.
+ */
public BidirectionalRepositoryLayout getLayoutForPath( String path )
throws LayoutException
{
}
+ /**
+ * @deprecated use {@link RepositoryContentFactory#getManagedRepositoryContent(String)} or
+ * {@link RepositoryContentFactory#getRemoteRepositoryContent(String)} instead.
+ */
public BidirectionalRepositoryLayout getLayout( ArchivaArtifact artifact )
throws LayoutException
{
import org.apache.maven.archiva.common.utils.VersionUtil;
import org.apache.maven.archiva.model.ArchivaArtifact;
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;
/**
* @author <a href="mailto:joakime@apache.org">Joakim Erdfelt</a>
* @version $Id$
* @plexus.component role-hint="default"
+ * @deprecated to not use directly. Use {@link ManagedRepositoryContent} or {@link RemoteRepositoryContent} instead.
*/
public class DefaultBidirectionalRepositoryLayout
implements BidirectionalRepositoryLayout
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
* or more contributor license agreements. See the NOTICE file
*
* @author <a href="mailto:joakime@apache.org">Joakim Erdfelt</a>
* @version $Id$
+ * @deprecated to not use directly. Use {@link ManagedRepositoryContent} or {@link RemoteRepositoryContent} instead.
*/
public class FilenameParts
{
import org.apache.commons.lang.StringUtils;
import org.apache.maven.archiva.model.ArchivaArtifact;
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 java.util.HashMap;
* @author <a href="mailto:joakime@apache.org">Joakim Erdfelt</a>
* @version $Id$
* @plexus.component role-hint="legacy"
+ *
+ * @deprecated to not use directly. Use {@link ManagedRepositoryContent} or {@link RemoteRepositoryContent} instead.
*/
public class LegacyBidirectionalRepositoryLayout
implements BidirectionalRepositoryLayout
import org.apache.commons.lang.StringUtils;
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.
*
* @author <a href="mailto:joakime@apache.org">Joakim Erdfelt</a>
* @version $Id$
+ *
+ * @deprecated use {@link RepositoryContentFactory} and {@link ManagedRepositoryContent}
+ * or {@link RemoteRepositoryContent} instead.
*/
public class RepositoryLayoutUtils
{
* (null to allow algorithm to calculate one)
* @return the parts of the filename.
* @throws LayoutException
+ * @deprecated to not use directly. Use {@link ManagedRepositoryContent} or {@link RemoteRepositoryContent} instead.
*/
public static FilenameParts splitFilename( String filename, String possibleArtifactId ) throws LayoutException
{
* (null to allow algorithm to calculate one)
* @return the parts of the filename.
* @throws LayoutException
+ * @deprecated to not use directly. Use {@link ManagedRepositoryContent} or {@link RemoteRepositoryContent} instead.
*/
public static FilenameParts splitFilename( String filename, String possibleArtifactId,
String possibleVersion ) throws LayoutException