Re-format source code
[policy/engine.git] / PolicyEngineUtils / src / main / java / org / onap / policy / api / UpdateType.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>UpdatedPolicy</code> of
25  * {@link org.onap.policy.api.LoadedPolicy}.
26  *
27  * @version 0.1
28  */
29 public enum UpdateType {
30     /**
31      * Indicates that a policy has been updated.
32      */
33     UPDATE("update"),
34     /**
35      * Indicates that a policy is new.
36      */
37     NEW("new");
38
39     private String name;
40
41     UpdateType(String name) {
42         this.name = name;
43     }
44
45     /**
46      * Returns the <code>String</code> format of the Type for this <code>UpdateType</code>.
47      *
48      * @return the <code>String</code> Type of <code>UpdateType</code>
49      */
50     @Override
51     public String toString() {
52         return this.name;
53     }
54 }