X-Git-Url: http://git.argeo.org/?a=blobdiff_plain;f=org.argeo.slc.repo%2Fsrc%2Forg%2Feclipse%2Faether%2Frepository%2FLocalMetadataRequest.java;fp=org.argeo.slc.repo%2Fsrc%2Forg%2Feclipse%2Faether%2Frepository%2FLocalMetadataRequest.java;h=0000000000000000000000000000000000000000;hb=c5df8cb6e6d56113a2707fd4a75c0b912b97e4c0;hp=0ee4dc5e7ba50b2be7072643ef01ffa7e5b66e9c;hpb=e6113a28ca93a1c6bb4aa23242c9d05b63d51cae;p=gpl%2Fargeo-slc.git diff --git a/org.argeo.slc.repo/src/org/eclipse/aether/repository/LocalMetadataRequest.java b/org.argeo.slc.repo/src/org/eclipse/aether/repository/LocalMetadataRequest.java deleted file mode 100644 index 0ee4dc5e7..000000000 --- a/org.argeo.slc.repo/src/org/eclipse/aether/repository/LocalMetadataRequest.java +++ /dev/null @@ -1,124 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2010, 2011 Sonatype, Inc. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * Sonatype, Inc. - initial API and implementation - *******************************************************************************/ -package org.eclipse.aether.repository; - -import org.eclipse.aether.RepositorySystemSession; -import org.eclipse.aether.metadata.Metadata; - -/** - * A query to the local repository for the existence of metadata. - * - * @see LocalRepositoryManager#find(RepositorySystemSession, LocalMetadataRequest) - */ -public final class LocalMetadataRequest -{ - - private Metadata metadata; - - private String context = ""; - - private RemoteRepository repository = null; - - /** - * Creates an uninitialized query. - */ - public LocalMetadataRequest() - { - // enables default constructor - } - - /** - * Creates a query with the specified properties. - * - * @param metadata The metadata to query for, may be {@code null}. - * @param repository The source remote repository for the metadata, may be {@code null} for local metadata. - * @param context The resolution context for the metadata, may be {@code null}. - */ - public LocalMetadataRequest( Metadata metadata, RemoteRepository repository, String context ) - { - setMetadata( metadata ); - setRepository( repository ); - setContext( context ); - } - - /** - * Gets the metadata to query for. - * - * @return The metadata or {@code null} if not set. - */ - public Metadata getMetadata() - { - return metadata; - } - - /** - * Sets the metadata to query for. - * - * @param metadata The metadata, may be {@code null}. - * @return This query for chaining, never {@code null}. - */ - public LocalMetadataRequest setMetadata( Metadata metadata ) - { - this.metadata = metadata; - return this; - } - - /** - * Gets the resolution context. - * - * @return The resolution context, never {@code null}. - */ - public String getContext() - { - return context; - } - - /** - * Sets the resolution context. - * - * @param context The resolution context, may be {@code null}. - * @return This query for chaining, never {@code null}. - */ - public LocalMetadataRequest setContext( String context ) - { - this.context = ( context != null ) ? context : ""; - return this; - } - - /** - * Gets the remote repository to use as source of the metadata. - * - * @return The remote repositories, may be {@code null} for local metadata. - */ - public RemoteRepository getRepository() - { - return repository; - } - - /** - * Sets the remote repository to use as sources of the metadata. - * - * @param repository The remote repository, may be {@code null}. - * @return This query for chaining, may be {@code null} for local metadata. - */ - public LocalMetadataRequest setRepository( RemoteRepository repository ) - { - this.repository = repository; - return this; - } - - @Override - public String toString() - { - return getMetadata() + " @ " + getRepository(); - } - -}