X-Git-Url: http://git.argeo.org/?a=blobdiff_plain;f=org.argeo.slc.repo%2Fsrc%2Forg%2Feclipse%2Faether%2Frepository%2FLocalMetadataResult.java;fp=org.argeo.slc.repo%2Fsrc%2Forg%2Feclipse%2Faether%2Frepository%2FLocalMetadataResult.java;h=0000000000000000000000000000000000000000;hb=c5df8cb6e6d56113a2707fd4a75c0b912b97e4c0;hp=6f3687a5ecebab3dba44ad55f68d4473e08fc8d4;hpb=e6113a28ca93a1c6bb4aa23242c9d05b63d51cae;p=gpl%2Fargeo-slc.git diff --git a/org.argeo.slc.repo/src/org/eclipse/aether/repository/LocalMetadataResult.java b/org.argeo.slc.repo/src/org/eclipse/aether/repository/LocalMetadataResult.java deleted file mode 100644 index 6f3687a5e..000000000 --- a/org.argeo.slc.repo/src/org/eclipse/aether/repository/LocalMetadataResult.java +++ /dev/null @@ -1,105 +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 java.io.File; - -import org.eclipse.aether.RepositorySystemSession; - -/** - * A result from the local repository about the existence of metadata. - * - * @see LocalRepositoryManager#find(RepositorySystemSession, LocalMetadataRequest) - */ -public final class LocalMetadataResult -{ - - private final LocalMetadataRequest request; - - private File file; - - private boolean stale; - - /** - * Creates a new result for the specified request. - * - * @param request The local metadata request, must not be {@code null}. - */ - public LocalMetadataResult( LocalMetadataRequest request ) - { - if ( request == null ) - { - throw new IllegalArgumentException( "local metadata request has not been specified" ); - } - this.request = request; - } - - /** - * Gets the request corresponding to this result. - * - * @return The corresponding request, never {@code null}. - */ - public LocalMetadataRequest getRequest() - { - return request; - } - - /** - * Gets the file to the requested metadata if the metadata is available in the local repository. - * - * @return The file to the requested metadata or {@code null}. - */ - public File getFile() - { - return file; - } - - /** - * Sets the file to requested metadata. - * - * @param file The metadata file, may be {@code null}. - * @return This result for chaining, never {@code null}. - */ - public LocalMetadataResult setFile( File file ) - { - this.file = file; - return this; - } - - /** - * This value indicates whether the metadata is stale and should be updated. - * - * @return {@code true} if the metadata is stale and should be updated, {@code false} otherwise. - */ - public boolean isStale() - { - return stale; - } - - /** - * Sets whether the metadata is stale. - * - * @param stale {@code true} if the metadata is stale and should be updated, {@code false} otherwise. - * @return This result for chaining, never {@code null}. - */ - public LocalMetadataResult setStale( boolean stale ) - { - this.stale = stale; - return this; - } - - @Override - public String toString() - { - return request.toString() + "(" + getFile() + ")"; - } - -}