c4e9d8ea329e1fdc13b59010151fe0a081724e33
[neutron.git] / neutron-spi / src / main / java / org / opendaylight / neutron / spi / INeutronSecurityRuleAware.java
1 /*
2  * Copyright (C) 2014 Red Hat, Inc.  All rights reserved.
3  *
4  * This program and the accompanying materials are made available under the
5  * terms of the Eclipse Public License v1.0 which accompanies this distribution,
6  * and is available at http://www.eclipse.org/legal/epl-v10.html
7  */
8
9 package org.opendaylight.neutron.spi;
10
11 /**
12  * This interface defines the methods required to be aware of Neutron Security Rules
13  */
14 @Deprecated
15 public interface INeutronSecurityRuleAware {
16
17     /**
18      * Services provide this interface method to indicate if the specified security rule can be created
19      *
20      * @param securityRule instance of proposed new Neutron Security Rule object
21      * @return integer
22      * the return value is understood to be a HTTP status code.  A return value outside of 200 through 299
23      * results in the create operation being interrupted and the returned status value reflected in the
24      * HTTP response.
25      */
26     int canCreateNeutronSecurityRule(NeutronSecurityRule securityRule);
27
28     /**
29      * Services provide this interface method for taking action after a security rule has been created
30      *
31      * @param securityRule instance of new Neutron Security Rule object
32      */
33     void neutronSecurityRuleCreated(NeutronSecurityRule securityRule);
34
35     /**
36      * Services provide this interface method to indicate if the specified security rule can be changed using the specified
37      * delta
38      *
39      * @param delta    updates to the security rule object using patch semantics
40      * @param original instance of the Neutron Security Rule object to be updated
41      * @return integer
42      * the return value is understood to be a HTTP status code.  A return value outside of 200 through 299
43      * results in the update operation being interrupted and the returned status value reflected in the
44      * HTTP response.
45      */
46     int canUpdateNeutronSecurityRule(NeutronSecurityRule delta, NeutronSecurityRule original);
47
48     /**
49      * Services provide this interface method for taking action after a security rule has been updated
50      *
51      * @param securityRule instance of modified Neutron Security Rule object
52      */
53     void neutronSecurityRuleUpdated(NeutronSecurityRule securityRule);
54
55     /**
56      * Services provide this interface method to indicate if the specified security rule can be deleted
57      *
58      * @param securityRule instance of the Neutron Security Rule object to be deleted
59      * @return integer
60      * the return value is understood to be a HTTP status code.  A return value outside of 200 through 299
61      * results in the delete operation being interrupted and the returned status value reflected in the
62      * HTTP response.
63      */
64     int canDeleteNeutronSecurityRule(NeutronSecurityRule securityRule);
65
66     /**
67      * Services provide this interface method for taking action after a security rule has been deleted
68      *
69      * @param securityRule instance of deleted Neutron Security Rule object
70      */
71     void neutronSecurityRuleDeleted(NeutronSecurityRule securityRule);
72 }