Fix the sonar issue of esr-server.
[aai/esr-server.git] / esr-mgr / src / main / java / org / onap / aai / esr / wrapper / VimManagerWrapper.java
1 /**
2  * Copyright 2017 ZTE Corporation.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  *     http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 package org.onap.aai.esr.wrapper;
17
18 import java.util.ArrayList;
19
20 import javax.ws.rs.core.Response;
21
22 import org.onap.aai.esr.entity.rest.RegisterResponse;
23 import org.onap.aai.esr.entity.rest.VimRestData;
24 //import org.slf4j.Logger;
25 //import org.slf4j.LoggerFactory;
26
27 public class VimManagerWrapper {
28
29   private static VimManagerWrapper vimManagerWrapper;
30 //  private static final Logger LOG = LoggerFactory.getLogger(VimManagerWrapper.class);
31
32   /**
33    * get VimManagerWrapper instance.
34    * @return vim manager wrapper instance
35    */
36   public static VimManagerWrapper getInstance() {
37     if (vimManagerWrapper == null) {
38       vimManagerWrapper = new VimManagerWrapper();
39     }
40     return vimManagerWrapper;
41   }
42   
43   public Response registerVim(VimRestData vim) {
44     //TODO
45     RegisterResponse result = null;
46     return Response.ok(result).build();
47   }
48
49   public Response updateVim(VimRestData vim) {
50     //TODO
51     return Response.ok().build();
52   }
53   
54   public Response queryVimList() {
55     //TODO
56     ArrayList<VimRestData> vimList = new ArrayList<VimRestData>();
57     return Response.ok(vimList).build();
58   }
59   
60   public Response queryVimById(String vimId) {
61     VimRestData vim = new VimRestData();
62     //TODO
63     return Response.ok(vim).build();
64   }
65   
66   public Response delVim(String vimId) {
67     //TODO
68     return Response.noContent().build();
69   }
70 }