blob: 487a676156e457569bb42ff9f88944656b12f28e [file] [log] [blame]
Pengfei Lue0c02e22015-07-07 15:41:31 +08001/*
2 * Copyright 2015 Open Networking Laboratory
3 * Originally created by Pengfei Lu, Network and Cloud Computing Laboratory, Dalian University of Technology, China
Pengfei Lue53419b2015-08-29 10:11:02 +08004 * Advisers: Keqiu Li, Heng Qi and Haisheng Yu
Pengfei Lue0c02e22015-07-07 15:41:31 +08005 * This work is supported by the State Key Program of National Natural Science of China(Grant No. 61432002)
6 * and Prospective Research Project on Future Networks in Jiangsu Future Networks Innovation Institute.
7 *
8 * Licensed under the Apache License, Version 2.0 (the "License");
9 * you may not use this file except in compliance with the License.
10 * You may obtain a copy of the License at
11 *
12 * http://www.apache.org/licenses/LICENSE-2.0
13 *
14 * Unless required by applicable law or agreed to in writing, software
15 * distributed under the License is distributed on an "AS IS" BASIS,
16 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17 * See the License for the specific language governing permissions and
18 * limitations under the License.
19 */
Thomas Vachuska9bb32352015-09-25 11:31:22 -070020package org.onosproject.acl;
Pengfei Lue0c02e22015-07-07 15:41:31 +080021
22import java.util.List;
23
24/**
25 * Service interface exported by ACL application.
26 */
27public interface AclService {
28
29 /**
30 * Gets a list containing all ACL rules.
Thomas Vachuska9bb32352015-09-25 11:31:22 -070031 *
Pengfei Lue0c02e22015-07-07 15:41:31 +080032 * @return a list containing all ACL rules
33 */
34 List<AclRule> getAclRules();
35
36 /**
37 * Adds a new ACL rule.
Thomas Vachuska9bb32352015-09-25 11:31:22 -070038 *
Pengfei Lue0c02e22015-07-07 15:41:31 +080039 * @param rule ACL rule
40 * @return true if successfully added, otherwise false
41 */
42 boolean addAclRule(AclRule rule);
43
44 /**
45 * Removes an exsiting ACL rule by rule id.
Thomas Vachuska9bb32352015-09-25 11:31:22 -070046 *
Pengfei Lue0c02e22015-07-07 15:41:31 +080047 * @param ruleId ACL rule identifier
48 */
49 void removeAclRule(RuleId ruleId);
50
51 /**
52 * Clears ACL and resets all.
53 */
54 void clearAcl();
55
56}