56e8bcee1a99bbfbba6dff7ffa8d3fb46420137d
[onosfw.git] /
1 /*\r
2  * Copyright 2015 Open Networking Laboratory\r
3  *\r
4  * Licensed under the Apache License, Version 2.0 (the "License");\r
5  * you may not use this file except in compliance with the License.\r
6  * You may obtain a copy of the License at\r
7  *\r
8  *     http://www.apache.org/licenses/LICENSE-2.0\r
9  *\r
10  * Unless required by applicable law or agreed to in writing, software\r
11  * distributed under the License is distributed on an "AS IS" BASIS,\r
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
13  * See the License for the specific language governing permissions and\r
14  * limitations under the License.\r
15  */\r
16 package org.onosproject.vtnrsc.tenantnetwork;\r
17 \r
18 import org.onosproject.vtnrsc.TenantNetwork;\r
19 import org.onosproject.vtnrsc.TenantNetworkId;\r
20 \r
21 /**\r
22  * Service for interacting with the inventory of tenantNetwork.\r
23  */\r
24 public interface TenantNetworkService {\r
25 \r
26     /**\r
27      * Returns if the tenantNetwork is existed.\r
28      *\r
29      * @param networkId tenantNetwork identifier\r
30      * @return true or false if one with the given identifier exists.\r
31      */\r
32     boolean exists(TenantNetworkId networkId);\r
33 \r
34     /**\r
35      * Returns the number of tenantNetwork known to the system.\r
36      *\r
37      * @return number of tenantNetwork.\r
38      */\r
39     int getNetworkCount();\r
40 \r
41     /**\r
42      * Returns an iterable collection of the currently known tenantNetwork.\r
43      *\r
44      * @return collection of tenantNetwork.\r
45      */\r
46     Iterable<TenantNetwork> getNetworks();\r
47 \r
48     /**\r
49      * Returns the tenantNetwork with the identifier.\r
50      *\r
51      * @param networkId TenantNetwork identifier\r
52      * @return TenantNetwork or null if one with the given identifier is not\r
53      *         known.\r
54      */\r
55     TenantNetwork getNetwork(TenantNetworkId networkId);\r
56 \r
57     /**\r
58      * Creates tenantNetworks by networks.\r
59      *\r
60      * @param networks the collection of tenantNetworks\r
61      * @return true if all given identifiers created successfully.\r
62      */\r
63     boolean createNetworks(Iterable<TenantNetwork> networks);\r
64 \r
65     /**\r
66      * Updates tenantNetworks by tenantNetworks.\r
67      *\r
68      * @param networks the collection of tenantNetworks\r
69      * @return true if all given identifiers updated successfully.\r
70      */\r
71     boolean updateNetworks(Iterable<TenantNetwork> networks);\r
72 \r
73     /**\r
74      * Deletes tenantNetwork by tenantNetworkIds.\r
75      *\r
76      * @param networksIds the collection of tenantNetworkIds\r
77      * @return true if the specified tenantNetworks deleted successfully.\r
78      */\r
79     boolean removeNetworks(Iterable<TenantNetworkId> networksIds);\r
80 }\r