X-Git-Url: http://git.argeo.org/?a=blobdiff_plain;f=org.argeo.slc.repo%2Fsrc%2Forg%2Feclipse%2Faether%2Fresolution%2FArtifactDescriptorPolicy.java;fp=org.argeo.slc.repo%2Fsrc%2Forg%2Feclipse%2Faether%2Fresolution%2FArtifactDescriptorPolicy.java;h=ec519fee959f7347b388dba2f5a4bc455db8c6ca;hb=825d60c5348dbe3f5be25b0bccf7bdebfe694219;hp=0000000000000000000000000000000000000000;hpb=5e991fff5cba01858dcc5747a27e637325bc5c8e;p=gpl%2Fargeo-jcr.git diff --git a/org.argeo.slc.repo/src/org/eclipse/aether/resolution/ArtifactDescriptorPolicy.java b/org.argeo.slc.repo/src/org/eclipse/aether/resolution/ArtifactDescriptorPolicy.java new file mode 100644 index 0000000..ec519fe --- /dev/null +++ b/org.argeo.slc.repo/src/org/eclipse/aether/resolution/ArtifactDescriptorPolicy.java @@ -0,0 +1,52 @@ +/******************************************************************************* + * Copyright (c) 2012, 2013 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.resolution; + +import org.eclipse.aether.RepositorySystemSession; + +/** + * Controls the handling of errors related to reading an artifact descriptor. + * + * @see RepositorySystemSession#getArtifactDescriptorPolicy() + */ +public interface ArtifactDescriptorPolicy +{ + + /** + * Bit mask indicating that errors while reading the artifact descriptor should not be tolerated. + */ + int STRICT = 0x00; + + /** + * Bit flag indicating that missing artifact descriptors should be silently ignored. + */ + int IGNORE_MISSING = 0x01; + + /** + * Bit flag indicating that existent but invalid artifact descriptors should be silently ignored. + */ + int IGNORE_INVALID = 0x02; + + /** + * Bit mask indicating that all errors should be silently ignored. + */ + int IGNORE_ERRORS = IGNORE_MISSING | IGNORE_INVALID; + + /** + * Gets the error policy for an artifact's descriptor. + * + * @param session The repository session during which the policy is determined, must not be {@code null}. + * @param request The policy request holding further details, must not be {@code null}. + * @return The bit mask describing the desired error policy. + */ + int getPolicy( RepositorySystemSession session, ArtifactDescriptorPolicyRequest request ); + +}