X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=opendaylight%2Fmd-sal%2Fsal-rest-connector%2Fsrc%2Ftest%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fsal%2Frestconf%2Fimpl%2Ftest%2FRestOperationUtils.java;h=7bf4782790506631de6652a2ef67126071d9ba74;hb=8cf40f4741c70a760dadb4300946c1dc88f95611;hp=1f0daace70b484690497cbbdee69485053c092e7;hpb=e4b42231fac4bf9749d91f65a526cced1be7d6a3;p=controller.git diff --git a/opendaylight/md-sal/sal-rest-connector/src/test/java/org/opendaylight/controller/sal/restconf/impl/test/RestOperationUtils.java b/opendaylight/md-sal/sal-rest-connector/src/test/java/org/opendaylight/controller/sal/restconf/impl/test/RestOperationUtils.java index 1f0daace70..7bf4782790 100644 --- a/opendaylight/md-sal/sal-rest-connector/src/test/java/org/opendaylight/controller/sal/restconf/impl/test/RestOperationUtils.java +++ b/opendaylight/md-sal/sal-rest-connector/src/test/java/org/opendaylight/controller/sal/restconf/impl/test/RestOperationUtils.java @@ -1,31 +1,17 @@ +/* + * Copyright (c) 2014 Cisco Systems, Inc. and others. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v1.0 which accompanies this distribution, + * and is available at http://www.eclipse.org/legal/epl-v10.html + */ package org.opendaylight.controller.sal.restconf.impl.test; -import java.io.UnsupportedEncodingException; -import java.net.URI; -import java.net.URLEncoder; - -import javax.ws.rs.client.Entity; -import javax.ws.rs.core.MediaType; - -import com.google.common.base.Charsets; - public class RestOperationUtils { - static final String JSON = "+json"; - static final String XML = "+xml"; + public static final String JSON = "+json"; + public static final String XML = "+xml"; private RestOperationUtils() { } - - static Entity entity(String data, MediaType mediaType) { - return Entity.entity(data, mediaType); - } - - static Entity entity(String data, String mediaType) { - return Entity.entity(data, mediaType); - } - - static String createUri(String prefix, String encodedPart) throws UnsupportedEncodingException { - return URI.create(prefix + URLEncoder.encode(encodedPart, Charsets.US_ASCII.name()).toString()).toASCIIString(); - } }