aboutsummaryrefslogtreecommitdiffstats
path: root/org.eclipse.jgit/src/org/eclipse/jgit/attributes/AttributesNodeProvider.java
blob: 0cf3f3960211657c8f5298605a6eb9766ec99eba (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
/*
 * Copyright (C) 2014, Arthur Daussy <arthur.daussy@obeo.fr> and others
 *
 * This program and the accompanying materials are made available under the
 * terms of the Eclipse Distribution License v. 1.0 which is available at
 * https://www.eclipse.org/org/documents/edl-v10.php.
 *
 * SPDX-License-Identifier: BSD-3-Clause
 */
package org.eclipse.jgit.attributes;

import java.io.IOException;

import org.eclipse.jgit.lib.CoreConfig;

/**
 * An interface used to retrieve the global and info
 * {@link org.eclipse.jgit.attributes.AttributesNode}s.
 *
 * @since 4.2
 */
public interface AttributesNodeProvider {

	/**
	 * Retrieve the {@link org.eclipse.jgit.attributes.AttributesNode} that
	 * holds the information located in $GIT_DIR/info/attributes file.
	 *
	 * @return the {@link org.eclipse.jgit.attributes.AttributesNode} that holds
	 *         the information located in $GIT_DIR/info/attributes file.
	 * @throws java.io.IOException
	 *             if an error is raised while parsing the attributes file
	 */
	AttributesNode getInfoAttributesNode() throws IOException;

	/**
	 * Retrieve the {@link org.eclipse.jgit.attributes.AttributesNode} that
	 * holds the information located in the global gitattributes file.
	 *
	 * @return the {@link org.eclipse.jgit.attributes.AttributesNode} that holds
	 *         the information located in the global gitattributes file.
	 * @throws java.io.IOException
	 *             java.io.IOException if an error is raised while parsing the
	 *             attributes file
	 * @see CoreConfig#getAttributesFile()
	 */
	AttributesNode getGlobalAttributesNode() throws IOException;

}