Re-format source code
[policy/engine.git] / PolicyEngineUtils / src / main / java / org / onap / policy / api / NotificationType.java
1 /*-
2  * ============LICENSE_START=======================================================
3  * PolicyEngineUtils
4  * ================================================================================
5  * Copyright (C) 2017, 2019 AT&T Intellectual Property. All rights reserved.
6  * ================================================================================
7  * Licensed under the Apache License, Version 2.0 (the "License");
8  * you may not use this file except in compliance with the License.
9  * You may obtain a copy of the License at
10  *
11  *      http://www.apache.org/licenses/LICENSE-2.0
12  *
13  * Unless required by applicable law or agreed to in writing, software
14  * distributed under the License is distributed on an "AS IS" BASIS,
15  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16  * See the License for the specific language governing permissions and
17  * limitations under the License.
18  * ============LICENSE_END=========================================================
19  */
20
21 package org.onap.policy.api;
22
23 /**
24  * Enumeration of the Update Type that has occurred in the <code>PDPNotification</code> of
25  * {@link org.onap.policy.api.PDPNotification}.
26  *
27  * @version 0.1
28  */
29 public enum NotificationType {
30     /**
31      * Indicates that a policy has been updated.
32      */
33     UPDATE("update"),
34     /**
35      * Indicates that a policy has been removed.
36      */
37     REMOVE("remove"),
38     /**
39      * Indicates that both update and removal of policy events has occurred.
40      */
41     BOTH("both");
42
43     private String name;
44
45     NotificationType(String name) {
46         this.name = name;
47     }
48
49     /**
50      * Returns the <code>String</code> format of the Type for this <code>UpdateType</code>.
51      *
52      * @return the <code>String</code> Type of <code>UpdateType</code>
53      */
54     @Override
55     public String toString() {
56         return this.name;
57     }
58 }