Merge from ECOMP's repository
[vid.git] / vid-app-common / src / main / java / org / onap / vid / model / NewVNF.java
1 package org.onap.vid.model;
2
3 import java.util.HashMap;
4 import java.util.Map;
5 import java.util.regex.Pattern;
6
7 public class NewVNF extends NewNode {
8
9         /** The pattern used to normalize VNF names */
10         static final Pattern COMPONENT_INSTANCE_NAME_DELIMETER_PATTERN = Pattern.compile("[\\.\\-]+");
11         
12         /** The model customization name. */
13         private String modelCustomizationName;
14         
15         /** The vf modules. */
16         private Map<String, VfModule> vfModules = new HashMap<>();
17         
18         /** The volume groups. */
19         private Map<String, VolumeGroup> volumeGroups = new HashMap<>();
20         
21         /**
22          * Instantiates a newvnf.
23          */
24         public NewVNF() {
25                 super();
26         }
27
28         /**
29          * Gets the model customization name.
30          *
31          * @return the model customization name
32          */
33         public String getModelCustomizationName() {
34                 return modelCustomizationName;
35         }
36
37         /**
38          * Gets the vf modules.
39          *
40          * @return the vf modules
41          */
42         public Map<String, VfModule> getVfModules() {
43                 return vfModules;
44         }
45
46         /**
47          * Sets the vf modules.
48          *
49          * @param vfModules the vf modules
50          */
51         public void setVfModules(Map<String, VfModule> vfModules) {
52                 this.vfModules = vfModules;
53         }
54
55         /**
56          * Gets the volume groups.
57          *
58          * @return the volume groups
59          */
60         public Map<String, VolumeGroup> getVolumeGroups() {
61                 return volumeGroups;
62         }
63
64         /**
65          * Sets the volume groups.
66          *
67          * @param volumeGroups the volume groups
68          */
69         public void setVolumeGroups(Map<String, VolumeGroup> volumeGroups) {
70                 this.volumeGroups = volumeGroups;
71         }
72
73
74         /**
75          * Sets the model customization name.
76          *
77          * @param modelCustomizationName the new model customization name
78          */
79         public void setModelCustomizationName(String modelCustomizationName) {
80                 this.modelCustomizationName = modelCustomizationName;
81         }
82         /**
83          * Normalize the VNF name
84          * @param originalName
85          * @return the normalized name
86          */
87         public static String normalizeName (String originalName) {
88                         return VNF.normalizeName(originalName);
89         }
90 }