Fix header info of be enum datatypes
[sdc.git] / common-be / src / main / java / org / openecomp / sdc / be / datatypes / enums / NodeTypeEnum.java
1 /*-
2  * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
3  * Licensed under the Apache License, Version 2.0 (the "License");
4  * you may not use this file except in compliance with the License.
5  * You may obtain a copy of the License at
6  * 
7  *      http://www.apache.org/licenses/LICENSE-2.0
8  * 
9  * Unless required by applicable law or agreed to in writing, software
10  * distributed under the License is distributed on an "AS IS" BASIS,
11  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12  * See the License for the specific language governing permissions and
13  * limitations under the License.
14  */
15
16 package org.openecomp.sdc.be.datatypes.enums;
17
18 public enum NodeTypeEnum {
19     User("user"), 
20     Service("service"), 
21     Resource("resource"), 
22     Product("product"), 
23     ResourceCategory("resourceCategory"), 
24     ServiceCategory("serviceCategory"), 
25     ServiceNewCategory("serviceNewCategory"), 
26     ResourceNewCategory("resourceNewCategory"), 
27     ProductCategory("productCategory"), 
28     ResourceSubcategory("resourceSubcategory"), 
29     ProductSubcategory("productSubcategory"), 
30     ProductGrouping("productGrouping"), 
31     Tag("tag"), 
32     Property("property"), 
33     Attribute("attribute"), 
34     CapabilityType("capabilityType"), 
35     Requirement("requirement"), 
36     RelationshipType("relationshipType"), 
37     Capability("capability"), 
38     RequirementImpl("requirementImpl"), 
39     CapabilityInst("capabilityInst"), 
40     AttributeValue("attributeValue"), 
41     InputValue("inputValue"), 
42     PropertyValue("propertyValue"), 
43     LockNode("lockNode"), 
44     ArtifactRef("artifactRef"), 
45     Interface("interface"), 
46     InterfaceOperation("interfaceOperation"), 
47     ResourceInstance("resourceInstance"), 
48     RelationshipInst("relationshipInst"), 
49     AdditionalInfoParameters("additionalInfoParameters"), 
50     ConsumerCredentials("consumerCredentials"), 
51     HeatParameter("heatParameter"), 
52     HeatParameterValue("heatParameterValue"), 
53     DataType("dataType"), 
54     GroupType("groupType"), 
55     PolicyType("policyType"), 
56     Group("group"), 
57     UserFunctionalMenu("userFunctionalMenu"), 
58     Input("input"),
59     GroupInstance("groupInstance"),
60     AnnotationType("annotationType"),
61     Component("component");
62
63     private String name;
64
65     NodeTypeEnum(String name) {
66         this.name = name;
67     }
68
69     public String getName() {
70         return name;
71     }
72
73     public static NodeTypeEnum getByName(String name) {
74         for (NodeTypeEnum inst : NodeTypeEnum.values()) {
75             if (inst.getName().equals(name)) {
76                 return inst;
77             }
78         }
79         return null;
80     }
81
82     public static NodeTypeEnum getByNameIgnoreCase(String name) {
83         for (NodeTypeEnum inst : NodeTypeEnum.values()) {
84             if (inst.getName().equalsIgnoreCase(name)) {
85                 return inst;
86             }
87         }
88         return null;
89     }
90 }