View Javadoc
1   /*
2    * Copyright (C) 2014, Arthur Daussy <arthur.daussy@obeo.fr> and others
3    *
4    * This program and the accompanying materials are made available under the
5    * terms of the Eclipse Distribution License v. 1.0 which is available at
6    * https://www.eclipse.org/org/documents/edl-v10.php.
7    *
8    * SPDX-License-Identifier: BSD-3-Clause
9    */
10  package org.eclipse.jgit.attributes;
11  
12  import java.io.IOException;
13  
14  import org.eclipse.jgit.lib.CoreConfig;
15  
16  /**
17   * An interface used to retrieve the global and info
18   * {@link org.eclipse.jgit.attributes.AttributesNode}s.
19   *
20   * @since 4.2
21   */
22  public interface AttributesNodeProvider {
23  
24  	/**
25  	 * Retrieve the {@link org.eclipse.jgit.attributes.AttributesNode} that
26  	 * holds the information located in $GIT_DIR/info/attributes file.
27  	 *
28  	 * @return the {@link org.eclipse.jgit.attributes.AttributesNode} that holds
29  	 *         the information located in $GIT_DIR/info/attributes file.
30  	 * @throws java.io.IOException
31  	 *             if an error is raised while parsing the attributes file
32  	 */
33  	AttributesNode getInfoAttributesNode() throws IOException;
34  
35  	/**
36  	 * Retrieve the {@link org.eclipse.jgit.attributes.AttributesNode} that
37  	 * holds the information located in the global gitattributes file.
38  	 *
39  	 * @return the {@link org.eclipse.jgit.attributes.AttributesNode} that holds
40  	 *         the information located in the global gitattributes file.
41  	 * @throws java.io.IOException
42  	 *             java.io.IOException if an error is raised while parsing the
43  	 *             attributes file
44  	 * @see CoreConfig#getAttributesFile()
45  	 */
46  	AttributesNode getGlobalAttributesNode() throws IOException;
47  
48  }