aboutsummaryrefslogtreecommitdiffstats
path: root/catalog-core/catalog-mgr/src/main/java/org/openo/commontosca/catalog/cometd/CometdUtil.java
diff options
context:
space:
mode:
Diffstat (limited to 'catalog-core/catalog-mgr/src/main/java/org/openo/commontosca/catalog/cometd/CometdUtil.java')
-rw-r--r--catalog-core/catalog-mgr/src/main/java/org/openo/commontosca/catalog/cometd/CometdUtil.java61
1 files changed, 22 insertions, 39 deletions
diff --git a/catalog-core/catalog-mgr/src/main/java/org/openo/commontosca/catalog/cometd/CometdUtil.java b/catalog-core/catalog-mgr/src/main/java/org/openo/commontosca/catalog/cometd/CometdUtil.java
index 6955451c..400fcc31 100644
--- a/catalog-core/catalog-mgr/src/main/java/org/openo/commontosca/catalog/cometd/CometdUtil.java
+++ b/catalog-core/catalog-mgr/src/main/java/org/openo/commontosca/catalog/cometd/CometdUtil.java
@@ -13,53 +13,36 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-/**
-* Copyright (C) 2016 ZTE, Inc. and others. All rights reserved. (ZTE)
-*
-* 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.openo.commontosca.catalog.cometd;
+import com.fasterxml.jackson.databind.ObjectMapper;
+import org.cometd.bayeux.server.BayeuxServer;
+
import java.io.IOException;
import java.util.Map;
-import org.cometd.bayeux.server.BayeuxServer;
-import com.fasterxml.jackson.databind.ObjectMapper;
-/**
- * @author 10189609
- *
- */
public class CometdUtil {
- private static BayeuxServer bayeuxServer;
+ private static BayeuxServer bayeuxServer;
+
+ public static BayeuxServer getBayeuxServer() {
+ return bayeuxServer;
+ }
+
+ public static void setBayeuxServer(BayeuxServer bayeuxServer) {
+ CometdUtil.bayeuxServer = bayeuxServer;
+ }
- public static BayeuxServer getBayeuxServer() {
- return bayeuxServer;
- }
+ public static String convertBean2Json(Object object) throws IOException {
+ ObjectMapper mapper = new ObjectMapper();
+ return mapper.writeValueAsString(object);
+ }
- public static void setBayeuxServer(BayeuxServer bayeuxServer) {
- CometdUtil.bayeuxServer = bayeuxServer;
- }
-
- public static String convertBean2Json(Object object) throws IOException {
- ObjectMapper mapper = new ObjectMapper();
- return mapper.writeValueAsString(object);
- }
-
- @SuppressWarnings("rawtypes")
- public static Map convertJson2Map(String json) throws IOException {
- ObjectMapper mapper = new ObjectMapper();
- return mapper.readValue(json, Map.class);
- }
+ @SuppressWarnings("rawtypes")
+ public static Map convertJson2Map(String json) throws IOException {
+ ObjectMapper mapper = new ObjectMapper();
+ return mapper.readValue(json, Map.class);
+ }
}