1 /*******************************************************************************
2 * Copyright (c) 2012, 2013 Sonatype, Inc.
3 * All rights reserved. This program and the accompanying materials
4 * are made available under the terms of the Eclipse Public License v1.0
5 * which accompanies this distribution, and is available at
6 * http://www.eclipse.org/legal/epl-v10.html
9 * Sonatype, Inc. - initial API and implementation
10 *******************************************************************************/
11 package org
.eclipse
.aether
.resolution
;
13 import org
.eclipse
.aether
.RepositorySystemSession
;
16 * Controls the handling of errors related to reading an artifact descriptor.
18 * @see RepositorySystemSession#getArtifactDescriptorPolicy()
20 public interface ArtifactDescriptorPolicy
24 * Bit mask indicating that errors while reading the artifact descriptor should not be tolerated.
29 * Bit flag indicating that missing artifact descriptors should be silently ignored.
31 int IGNORE_MISSING
= 0x01;
34 * Bit flag indicating that existent but invalid artifact descriptors should be silently ignored.
36 int IGNORE_INVALID
= 0x02;
39 * Bit mask indicating that all errors should be silently ignored.
41 int IGNORE_ERRORS
= IGNORE_MISSING
| IGNORE_INVALID
;
44 * Gets the error policy for an artifact's descriptor.
46 * @param session The repository session during which the policy is determined, must not be {@code null}.
47 * @param request The policy request holding further details, must not be {@code null}.
48 * @return The bit mask describing the desired error policy.
50 int getPolicy( RepositorySystemSession session
, ArtifactDescriptorPolicyRequest request
);