Rename restconf-nb-rfc8040 to restconf-nb
[netconf.git] / restconf / restconf-nb / src / main / java / org / opendaylight / restconf / nb / rfc8040 / jersey / providers / patch / AbstractPatchStatusBodyWriter.java
1 /*
2  * Copyright (c) 2021 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.restconf.nb.rfc8040.jersey.providers.patch;
9
10 import java.lang.annotation.Annotation;
11 import java.lang.reflect.Type;
12 import javax.ws.rs.core.MediaType;
13 import javax.ws.rs.ext.MessageBodyWriter;
14 import org.opendaylight.restconf.common.patch.PatchStatusContext;
15
16 abstract class AbstractPatchStatusBodyWriter implements MessageBodyWriter<PatchStatusContext> {
17     @Override
18     public final boolean isWriteable(final Class<?> type, final Type genericType, final Annotation[] annotations,
19             final MediaType mediaType) {
20         return type.equals(PatchStatusContext.class);
21     }
22 }