Remove deprecated YingExportUtils methods 77/102877/1
authorRobert Varga <robert.varga@pantheon.tech>
Wed, 26 Oct 2022 09:50:40 +0000 (11:50 +0200)
committerRobert Varga <robert.varga@pantheon.tech>
Wed, 26 Oct 2022 09:51:09 +0000 (11:51 +0200)
The callers can make the switch themselves, remove migration methods.

Change-Id: Iad94c417d78debedc3571e44f10f2956e37fb892
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
model/yang-model-export/src/main/java/org/opendaylight/yangtools/yang/model/export/YinExportUtils.java

index 3d60db7181511b2562a121d1dac3ec032752bd9f..5c88626adfb39792d260376d56e64c0231bc3f30 100644 (file)
@@ -22,8 +22,6 @@ import javax.xml.transform.stax.StAXSource;
 import javax.xml.transform.stream.StreamResult;
 import org.opendaylight.yangtools.yang.common.Revision;
 import org.opendaylight.yangtools.yang.common.YangConstants;
-import org.opendaylight.yangtools.yang.model.api.Module;
-import org.opendaylight.yangtools.yang.model.api.Submodule;
 import org.opendaylight.yangtools.yang.model.api.stmt.ModuleEffectiveStatement;
 import org.opendaylight.yangtools.yang.model.api.stmt.SubmoduleEffectiveStatement;
 
@@ -59,23 +57,6 @@ public final class YinExportUtils {
         return requireNonNull(name) + '@' + revision +  YangConstants.RFC6020_YIN_FILE_EXTENSION;
     }
 
-    /**
-     * Write a module as a YIN text into specified {@link OutputStream}. Supplied module must have the
-     * {@link ModuleEffectiveStatement} trait.
-     *
-     * @param module Module to be exported
-     * @throws IllegalArgumentException if the module is not an ModuleEffectiveStatement or if it declared
-     *                                  representation is not available.
-     * @throws NullPointerException if any of of the parameters is null
-     * @throws XMLStreamException if an input-output error occurs
-     * @deprecated Prefer {@link #writeModuleAsYinText(ModuleEffectiveStatement, OutputStream)}.
-     */
-    @Beta
-    @Deprecated(forRemoval = true)
-    public static void writeModuleAsYinText(final Module module, final OutputStream output) throws XMLStreamException {
-        writeModuleAsYinText(module.asEffectiveStatement(), output);
-    }
-
     /**
      * Write a module as a YIN text into specified {@link OutputStream}. Supplied module must have the
      * {@link ModuleEffectiveStatement} trait.
@@ -91,26 +72,6 @@ public final class YinExportUtils {
         writeReaderToOutput(YinXMLEventReaderFactory.defaultInstance().createXMLEventReader(module), output);
     }
 
-    /**
-     * Write a submodule as a YIN text into specified {@link OutputStream}. Supplied submodule must have the
-     * {@link SubmoduleEffectiveStatement} trait.
-     *
-     * @param parentModule Parent module
-     * @param submodule Submodule to be exported
-     * @throws IllegalArgumentException if the parent module is not a ModuleEffectiveStatement, if the submodule is not
-     *                                  a SubmoduleEffectiveStatement or if its declared representation is not available
-     * @throws NullPointerException if any of of the parameters is null
-     * @throws XMLStreamException if an input-output error occurs
-     * @deprecated Prefer {@link #writeSubmoduleAsYinText(ModuleEffectiveStatement, SubmoduleEffectiveStatement,
-     *             OutputStream)}.
-     */
-    @Beta
-    @Deprecated(forRemoval = true)
-    public static void writeSubmoduleAsYinText(final Module parentModule, final Submodule submodule,
-            final OutputStream output) throws XMLStreamException {
-        writeSubmoduleAsYinText(parentModule.asEffectiveStatement(), submodule.asEffectiveStatement(), output);
-    }
-
     /**
      * Write a submodule as a YIN text into specified {@link OutputStream}. Supplied submodule must have the
      * {@link SubmoduleEffectiveStatement} trait.