/** * Indicates whether the requested metadata is not present in the remote repository. * * @return {@code true} if the metadata is not present in the remote repository, {@code false} otherwise. */ public boolean isMissing() { return getException() instanceof MetadataNotFoundException; }
@Override public String toString() { return getMetadata() + ( isUpdated() ? " (updated)" : " (cached)" ); }
public ResolveTask( RepositorySystemSession session, RequestTrace trace, MetadataResult result, File metadataFile, List<UpdateCheck<Metadata, MetadataTransferException>> checks, String policy ) { this.session = session; this.trace = trace; this.result = result; this.request = result.getRequest(); this.metadataFile = metadataFile; this.policy = policy; this.checks = checks; }
result.addException(metadataResult.getException()); ArtifactRepository repository = metadataResult.getRequest().getRepository(); if (repository == null) { repository = session.getLocalRepository(); Versioning versioning = readVersions(session, trace, metadataResult.getMetadata(), repository, result); merge(versioning, repository, infos);
MetadataResult result = new MetadataResult( request ); results.add( result ); result.setMetadata( metadata ); result.setException( new MetadataNotFoundException( metadata, localRepo ) ); metadataResolved( session, trace, metadata, localRepo, result.getException() ); continue; result.setMetadata( metadata ); "The repository system is offline but the metadata " + metadata + " from " + repository + " is not available in the local repository."; result.setException( new MetadataNotFoundException( metadata, repository, msg ) ); metadataResolved( session, trace, metadata, repository, result.getException() ); continue; result.setException( exception ); if ( metadataFile != null ) result.setMetadata( metadata ); metadataResolved( session, trace, metadata, repository, result.getException() ); task.result.setException( task.exception ); task.result.setMetadata( metadata );
/** * Indicates whether the requested metadata was resolved. Note that the metadata might have been successfully * resolved (from the local cache) despite {@link #getException()} indicating a transfer error while trying to * refetch the metadata from the remote repository. * * @return {@code true} if the metadata was resolved, {@code false} otherwise. * @see Metadata#getFile() */ public boolean isResolved() { return getMetadata() != null && getMetadata().getFile() != null; }
MetadataResult result = new MetadataResult( request ); results.add( result ); result.setMetadata( metadata ); result.setException( new MetadataNotFoundException( metadata, localRepo ) ); metadataResolved( session, trace, metadata, localRepo, result.getException() ); continue; result.setMetadata( metadata ); "The repository system is offline but the metadata " + metadata + " from " + repository + " is not available in the local repository."; result.setException( new MetadataNotFoundException( metadata, repository, msg ) ); metadataResolved( session, trace, metadata, repository, result.getException() ); continue; result.setException( exception ); if ( metadataFile != null ) result.setMetadata( metadata ); metadataResolved( session, trace, metadata, repository, result.getException() ); task.result.setException( task.exception ); task.result.setMetadata( metadata );
/** * Indicates whether the requested metadata was resolved. Note that the metadata might have been successfully * resolved (from the local cache) despite {@link #getException()} indicating a transfer error while trying to * refetch the metadata from the remote repository. * * @return {@code true} if the metadata was resolved, {@code false} otherwise. * @see Metadata#getFile() */ public boolean isResolved() { return getMetadata() != null && getMetadata().getFile() != null; }
@Override public String toString() { return getMetadata() + ( isUpdated() ? " (updated)" : " (cached)" ); }
/** * Indicates whether the requested metadata is not present in the remote repository. * * @return {@code true} if the metadata is not present in the remote repository, {@code false} otherwise. */ public boolean isMissing() { return getException() instanceof MetadataNotFoundException; }
/** * Indicates whether the requested metadata was resolved. Note that the metadata might have been successfully * resolved (from the local cache) despite {@link #getException()} indicating a transfer error while trying to * refetch the metadata from the remote repository. * * @return {@code true} if the metadata was resolved, {@code false} otherwise. * @see Metadata#getFile() */ public boolean isResolved() { return getMetadata() != null && getMetadata().getFile() != null; }
public ResolveTask( RepositorySystemSession session, RequestTrace trace, MetadataResult result, File metadataFile, List<UpdateCheck<Metadata, MetadataTransferException>> checks, String policy ) { this.session = session; this.trace = trace; this.result = result; this.request = result.getRequest(); this.metadataFile = metadataFile; this.policy = policy; this.checks = checks; }
@Override public String toString() { return getMetadata() + ( isUpdated() ? " (updated)" : " (cached)" ); }
/** * Indicates whether the requested metadata is not present in the remote repository. * * @return {@code true} if the metadata is not present in the remote repository, {@code false} otherwise. */ public boolean isMissing() { return getException() instanceof MetadataNotFoundException; }