Use DataObjectIdentifier for action references
[yangtools.git] / plugin / plugin-generator-api / src / main / java / org / opendaylight / yangtools / plugin / generator / api / FileGeneratorFactory.java
1 /*
2  * Copyright (c) 2020 PANTHEON.tech, s.r.o. and others.  All rights reserved.
3  *
4  * This program and the accompanying materials are made available under the
5  * terms of the Eclipse Public License v1.0 which accompanies this distribution,
6  * and is available at http://www.eclipse.org/legal/epl-v10.html
7  */
8 package org.opendaylight.yangtools.plugin.generator.api;
9
10 import java.util.Map;
11 import org.eclipse.jdt.annotation.NonNullByDefault;
12 import org.opendaylight.yangtools.concepts.Identifiable;
13
14 /**
15  * A {@link java.util.ServiceLoader} factory for instantiating {@link FileGenerator} instances.
16  */
17 @NonNullByDefault
18 public interface FileGeneratorFactory extends Identifiable<String> {
19     /**
20      * {@inheritDoc}
21      *
22      * <p>
23      * This identifier must be a simple string without any whitespace, such as produced by
24      * {@link Class#getSimpleName()}.
25      */
26     @Override
27     String getIdentifier();
28
29     /**
30      * Create a new {@link FileGenerator}.
31      *
32      * @param configuration Configuration properties
33      * @return a new FileGenerator
34      * @throws FileGeneratorException if the configuration is not acceptable, or any other issue occurs.
35      */
36     FileGenerator newFileGenerator(Map<String, String> configuration) throws FileGeneratorException;
37 }