b81a3e1b5c2d01572898515a74910819bc25c512
[vfc/nfvo/resmanagement.git] /
1 /*
2  * Copyright 2016 Huawei Technologies Co., Ltd.
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
17 package org.openo.nfvo.resmanagement.service.business.inf;
18
19 import java.util.List;
20 import java.util.Map;
21
22 import org.openo.baseservice.remoteservice.exception.ServiceException;
23 import org.openo.nfvo.resmanagement.service.entity.PortEntity;
24
25 /**
26  * Port Buisiness Class.<br/>
27  * <p>
28  * </p>
29  *
30  * @author
31  * @version NFVO 0.5 Aug 31, 2016
32  */
33 public interface PortBusiness {
34
35     /**
36      *
37      * Get Port.<br>
38      *
39      * @param id
40      * @return
41      * @since  NFVO 0.5
42      */
43     PortEntity getPort(String id);
44
45     /**
46      *
47      * Get details of ports.<br>
48      *
49      * @param condition
50      * @return
51      * @since  NFVO 0.5
52      */
53     List<PortEntity> getPorts(Map<String, Object> condition);
54
55     /**
56      *
57      * Delete Port.<br>
58      *
59      * @param id
60      * @return
61      * @throws ServiceException
62      * @since  NFVO 0.5
63      */
64     int deletePort(String id) throws ServiceException;
65
66     /**
67      *
68      * Delete port by VIM ID.<br>
69      *
70      * @param vimId
71      * @return
72      * @throws ServiceException
73      * @since  NFVO 0.5
74      */
75     int deletePortByVimId(String vimId) throws ServiceException;
76
77     /**
78      *
79      * Add port.<br>
80      *
81      * @param portEntity
82      * @return
83      * @throws ServiceException
84      * @since  NFVO 0.5
85      */
86     int addPort(PortEntity portEntity) throws ServiceException;
87
88     /**
89      *
90      * Add selective port.<br>
91      *
92      * @param portEntity
93      * @return
94      * @throws ServiceException
95      * @since  NFVO 0.5
96      */
97     int addPortSelective(PortEntity portEntity) throws ServiceException;
98
99     /**
100      *
101      * Update selective port.<br>
102      *
103      * @param portEntity
104      * @return
105      * @throws ServiceException
106      * @since  NFVO 0.5
107      */
108     int updatePortSelective(PortEntity portEntity) throws ServiceException;
109
110     /**
111      *
112      * Update port.<br>
113      *
114      * @param portEntity
115      * @return
116      * @throws ServiceException
117      * @since  NFVO 0.5
118      */
119     int updatePort(PortEntity portEntity) throws ServiceException;
120
121     /**
122      *
123      * Update port by VIM Id.<br>
124      *
125      * @param portEntity
126      * @return
127      * @throws ServiceException
128      * @since  NFVO 0.5
129      */
130     int updatePortByVimId(PortEntity portEntity) throws ServiceException;
131 }