8d11a394f55e4a92150c650b21b78b97c55970eb
[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.SitesEntity;
24
25 /**
26  * DC info interface.<br/>
27  * <p>
28  * </p>
29  *
30  * @author
31  * @version NFVO 0.5 Aug 24, 2016
32  */
33 public interface SitesBusiness {
34
35     /**
36      * It is used to get Site info.<br/>
37      *
38      * @param id
39      * @return The get result
40      * @throws ServiceException When get failed.
41      * @since NFVO 0.5
42      */
43     SitesEntity getSite(String id) throws ServiceException;
44
45     /**
46      * It is used to get Sites info.<br/>
47      *
48      * @param condition
49      * @return The get result
50      * @since NFVO 0.5
51      */
52     List<SitesEntity> getSites(Map<String, Object> condition);
53
54     /**
55      * It is used to delete Site info.<br/>
56      *
57      * @param id
58      * @return The delete result
59      * @throws ServiceException When delete failed.
60      * @since NFVO 0.5
61      */
62     int deleteSite(String id) throws ServiceException;
63
64     /**
65      * It is used to add Site info.<br/>
66      *
67      * @param sitesEntity
68      * @return The add result
69      * @throws ServiceException When add failed.
70      * @since NFVO 0.5
71      */
72     int addSite(SitesEntity sitesEntity) throws ServiceException;
73
74     /**
75      * It is used to add Site info.<br/>
76      *
77      * @param sitesEntity
78      * @return The add result
79      * @throws ServiceException When add failed.
80      * @since NFVO 0.5
81      */
82     int addSiteSelective(SitesEntity sitesEntity) throws ServiceException;
83
84     /**
85      * It is used to update Site info.<br/>
86      *
87      * @param sitesEntity
88      * @return The update result
89      * @throws ServiceException When update failed.
90      * @since NFVO 0.5
91      */
92     int updateSiteSelective(SitesEntity sitesEntity) throws ServiceException;
93
94     /**
95      * It is used to create update Site info.<br/>
96      *
97      * @param sitesEntity
98      * @return The update result
99      * @throws ServiceException When update failed.
100      * @since NFVO 0.5
101      */
102     int updateSite(SitesEntity sitesEntity) throws ServiceException;
103
104     /**
105      * It is used to update Site info.<br/>
106      *
107      * @param sitesEntity
108      * @return The update result
109      * @throws ServiceException When update failed.
110      * @since NFVO 0.5
111      */
112     int updateSiteByVimId(SitesEntity sitesEntity) throws ServiceException;
113
114     /**
115      * It is used to update Site info.<br/>
116      *
117      * @param sitesEntity
118      * @return The update result
119      * @throws ServiceException When update failed.
120      * @since NFVO 0.5
121      */
122     int updateSiteResource(SitesEntity sitesEntity) throws ServiceException;
123
124 }