final MultivaluedMap<String, String> httpHeaders, final InputStream entityStream) throws IOException,
WebApplicationException {
try {
- if(getUriInfo().getAbsolutePath().getPath().contains("restconf/16")){
+ if (getUriInfo().getAbsolutePath().getPath().contains(RestconfConstants.DRAFT_PATTERN)) {
final org.opendaylight.restconf.jersey.providers.JsonNormalizedNodeBodyReader jsonReaderNewRest =
new org.opendaylight.restconf.jersey.providers.JsonNormalizedNodeBodyReader();
jsonReaderNewRest.injectParams(getUriInfo(), getRequest());
import org.opendaylight.netconf.sal.restconf.impl.RestconfDocumentedException;
import org.opendaylight.netconf.sal.restconf.impl.RestconfError.ErrorTag;
import org.opendaylight.netconf.sal.restconf.impl.RestconfError.ErrorType;
+import org.opendaylight.restconf.utils.RestconfConstants;
import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier;
import org.opendaylight.yangtools.yang.data.api.schema.NormalizedNode;
import org.opendaylight.yangtools.yang.data.impl.codec.xml.XmlUtils;
final MultivaluedMap<String, String> httpHeaders, final InputStream entityStream) throws IOException,
WebApplicationException {
try {
- if (getUriInfo().getAbsolutePath().getPath().contains("restconf/16")) {
+ if (getUriInfo().getAbsolutePath().getPath().contains(RestconfConstants.DRAFT_PATTERN)) {
final org.opendaylight.restconf.jersey.providers.XmlNormalizedNodeBodyReader xmlReaderNewRest =
new org.opendaylight.restconf.jersey.providers.XmlNormalizedNodeBodyReader();
xmlReaderNewRest.injectParams(getUriInfo(), getRequest());
public static final SimpleDateFormat REVISION_FORMAT = new SimpleDateFormat("yyyy-MM-dd");
public static final char SLASH = '/';
public static final Splitter SLASH_SPLITTER = Splitter.on(SLASH);
+ public static final String DRAFT_PATTERN = "restconf/17";
private RestconfConstants() {
throw new UnsupportedOperationException("Util class");