Clean up some SonarQube warnings (trailing whitespace, etc).
[platform/upstream/iotivity.git] / android / android_api / base / src / main / java / org / iotivity / base / OcResourceResponse.java
index 263de42..0356b85 100644 (file)
-/*\r
- * //******************************************************************\r
- * //\r
- * // Copyright 2015 Intel Corporation.\r
- * //\r
- * //-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=\r
- * //\r
- * // Licensed under the Apache License, Version 2.0 (the "License");\r
- * // you may not use this file except in compliance with the License.\r
- * // You may obtain a copy of the License at\r
- * //\r
- * //      http://www.apache.org/licenses/LICENSE-2.0\r
- * //\r
- * // Unless required by applicable law or agreed to in writing, software\r
- * // distributed under the License is distributed on an "AS IS" BASIS,\r
- * // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * // See the License for the specific language governing permissions and\r
- * // limitations under the License.\r
- * //\r
- * //-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=\r
- */\r
-\r
-package org.iotivity.base;\r
-\r
-import java.util.List;\r
-\r
-/**\r
- * OcResourceResponse provides APIs to set the response details\r
- */\r
-public class OcResourceResponse {\r
-\r
-    static {\r
-        System.loadLibrary("oc");\r
-        System.loadLibrary("ocstack-jni");\r
-    }\r
-\r
-    public OcResourceResponse() {\r
-        super();\r
-\r
-        create();\r
-    }\r
-\r
-    private OcResourceResponse(long nativeHandle) {\r
-        this.mNativeHandle = nativeHandle;\r
-    }\r
-\r
-    /**\r
-     * This API sets the error code for this response\r
-     *\r
-     * @param eCode error code to set\r
-     */\r
-    public native void setErrorCode(int eCode);\r
-\r
-    /**\r
-     * Gets new resource uri\r
-     *\r
-     * @return new resource uri\r
-     */\r
-    public native String getNewResourceUri();\r
-\r
-    /**\r
-     * Sets new resource uri\r
-     *\r
-     * @param newResourceUri new resource uri\r
-     */\r
-    public native void setNewResourceUri(String newResourceUri);\r
-\r
-    /**\r
-     * This API allows to set headerOptions in the response\r
-     *\r
-     * @param headerOptionList List of HeaderOption entries\r
-     */\r
-    public void setHeaderOptions(List<OcHeaderOption> headerOptionList) {\r
-        this.setHeaderOptions(headerOptionList.toArray(\r
-                        new OcHeaderOption[headerOptionList.size()])\r
-        );\r
-    }\r
-\r
-    private native void setHeaderOptions(OcHeaderOption[] headerOptionList);\r
-\r
-    /**\r
-     * This API allows to set request handle\r
-     *\r
-     * @param ocRequestHandle request handle\r
-     */\r
-    public native void setRequestHandle(OcRequestHandle ocRequestHandle);\r
-\r
-    /**\r
-     * This API allows to set the resource handle\r
-     *\r
-     * @param ocResourceHandle resource handle\r
-     */\r
-    public native void setResourceHandle(OcResourceHandle ocResourceHandle);\r
-\r
-    /**\r
-     * This API allows to set the EntityHandler response result\r
-     *\r
-     * @param responseResult OcEntityHandlerResult type to set the result value\r
-     */\r
-    public void setResponseResult(EntityHandlerResult responseResult) {\r
-        this.setResponseResult(responseResult.getValue());\r
-    }\r
-\r
-    private native void setResponseResult(int responseResult);\r
-\r
-    /**\r
-     * API to set the entire resource attribute representation\r
-     *\r
-     * @param ocRepresentation the name value pairs representing the resource's attributes\r
-     * @param interfaceStr     specifies the interface\r
-     */\r
-    public native void setResourceRepresentation(OcRepresentation ocRepresentation,\r
-                                                 String interfaceStr);\r
-\r
-    /**\r
-     * API to set the entire resource attribute representation\r
-     *\r
-     * @param representation object containing the name value pairs representing the\r
-     *                       resource's attributes\r
-     */\r
-    public void setResourceRepresentation(OcRepresentation representation) {\r
-        this.setResourceRepresentation1(representation);\r
-    }\r
-\r
-    private native void setResourceRepresentation1(OcRepresentation representation);\r
-\r
-    @Override\r
-    protected void finalize() throws Throwable {\r
-        super.finalize();\r
-\r
-        dispose();\r
-    }\r
-\r
-    private native void create();\r
-\r
-    private native void dispose();\r
-\r
-    private long mNativeHandle;\r
-}\r
+/*
+ * //******************************************************************
+ * //
+ * // Copyright 2015 Intel Corporation.
+ * //
+ * //-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
+ * //
+ * // Licensed under the Apache License, Version 2.0 (the "License");
+ * // you may not use this file except in compliance with the License.
+ * // You may obtain a copy of the License at
+ * //
+ * //      http://www.apache.org/licenses/LICENSE-2.0
+ * //
+ * // Unless required by applicable law or agreed to in writing, software
+ * // distributed under the License is distributed on an "AS IS" BASIS,
+ * // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * // See the License for the specific language governing permissions and
+ * // limitations under the License.
+ * //
+ * //-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
+ */
+
+package org.iotivity.base;
+
+import java.util.List;
+
+/**
+ * OcResourceResponse provides APIs to set the response details
+ */
+public class OcResourceResponse {
+
+    static {
+        System.loadLibrary("oc");
+        System.loadLibrary("ocstack-jni");
+    }
+
+    public OcResourceResponse() {
+        super();
+
+        create();
+    }
+
+    private OcResourceResponse(long nativeHandle) {
+        this.mNativeHandle = nativeHandle;
+    }
+
+    /**
+     * This API sets the error code for this response
+     *
+     * @param eCode error code to set
+     */
+    public native void setErrorCode(int eCode);
+
+    /**
+     * Gets new resource uri
+     *
+     * @return new resource uri
+     */
+    public native String getNewResourceUri();
+
+    /**
+     * Sets new resource uri
+     *
+     * @param newResourceUri new resource uri
+     */
+    public native void setNewResourceUri(String newResourceUri);
+
+    /**
+     * This API allows to set headerOptions in the response
+     *
+     * @param headerOptionList List of HeaderOption entries
+     */
+    public void setHeaderOptions(List<OcHeaderOption> headerOptionList) {
+        this.setHeaderOptions(headerOptionList.toArray(
+                        new OcHeaderOption[headerOptionList.size()])
+        );
+    }
+
+    private native void setHeaderOptions(OcHeaderOption[] headerOptionList);
+
+    /**
+     * This API allows to set request handle
+     *
+     * @param ocRequestHandle request handle
+     */
+    public native void setRequestHandle(OcRequestHandle ocRequestHandle);
+
+    /**
+     * This API allows to set the resource handle
+     *
+     * @param ocResourceHandle resource handle
+     */
+    public native void setResourceHandle(OcResourceHandle ocResourceHandle);
+
+    /**
+     * This API allows to set the EntityHandler response result
+     *
+     * @param responseResult OcEntityHandlerResult type to set the result value
+     */
+    public void setResponseResult(EntityHandlerResult responseResult) {
+        this.setResponseResult(responseResult.getValue());
+    }
+
+    private native void setResponseResult(int responseResult);
+
+    /**
+     * API to set the entire resource attribute representation
+     *
+     * @param ocRepresentation the name value pairs representing the resource's attributes
+     * @param interfaceStr     specifies the interface
+     */
+    public native void setResourceRepresentation(OcRepresentation ocRepresentation,
+                                                 String interfaceStr);
+
+    /**
+     * API to set the entire resource attribute representation
+     *
+     * @param representation object containing the name value pairs representing the
+     *                       resource's attributes
+     */
+    public void setResourceRepresentation(OcRepresentation representation) {
+        this.setResourceRepresentation1(representation);
+    }
+
+    private native void setResourceRepresentation1(OcRepresentation representation);
+
+    @Override
+    protected void finalize() throws Throwable {
+        super.finalize();
+
+        dispose();
+    }
+
+    private native void create();
+
+    private native void dispose();
+
+    private long mNativeHandle;
+}