47fd5a28f74d6b1a032ef688787471922a3d329b
[sdc.git] / common-app-api / src / main / java / org / openecomp / sdc / be / config / Configuration.java
1 /*-
2  * ============LICENSE_START=======================================================
3  * SDC
4  * ================================================================================
5  * Copyright (C) 2017 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.openecomp.sdc.be.config;
22
23 import java.util.Date;
24 import java.util.LinkedList;
25 import java.util.List;
26 import java.util.Map;
27 import java.util.Set;
28
29 import org.openecomp.sdc.common.api.BasicConfiguration;
30
31 import static java.lang.String.format;
32
33 public class Configuration extends BasicConfiguration {
34
35         private List<String> identificationHeaderFields;
36         /**
37          * Requests from these Urls will not be logged by
38          * org.openecomp.sdc.be.filters.BeServletFilter.<br>
39          **/
40         private List<String> unLoggedUrls;
41
42         /**
43          * backend host
44          */
45         private String beFqdn;
46         /**
47          * backend http port
48          */
49         private Integer beHttpPort;
50         /**
51          * backend http secured port
52          */
53         private Integer beSslPort;
54         /**
55          * be http context
56          */
57         private String beContext;
58         /**
59          * backend protocol. http | https
60          */
61         private String beProtocol = "http";
62
63         private Date released;
64         private String version = "1111";
65         private String toscaConformanceLevel = "3.0";
66         private String minToscaConformanceLevel = "3.0";
67         private List<String> protocols;
68         private Map<String, String> users;
69         private Map<String, Object> neo4j;
70         private ElasticSearchConfig elasticSearch;
71         private String titanCfgFile;
72         private String titanMigrationKeySpaceCfgFile;
73         private Boolean titanInMemoryGraph;
74         private Long titanLockTimeout;
75         private Long titanReconnectIntervalInSeconds;
76         private Long titanHealthCheckReadTimeout;
77         private Long esReconnectIntervalInSeconds;
78         private Long uebHealthCheckReconnectIntervalInSeconds;
79         private Long uebHealthCheckReadTimeout;
80         private LinkedList<Map<String, Map<String, String>>> defaultImports;
81         
82         private List<String> resourceTypes;
83         private List<String> excludeResourceCategory;
84         private Map<String, Object> deploymentResourceArtifacts;
85         private Map<String, Object> deploymentResourceInstanceArtifacts;
86         private Map<String, Object> toscaArtifacts;
87         private Map<String, Object> informationalResourceArtifacts;
88         private Map<String, Object> informationalServiceArtifacts;
89         private Map<String, ArtifactTypeConfig> resourceDeploymentArtifacts;
90         private Map<String, ArtifactTypeConfig> serviceDeploymentArtifacts;
91         private Map<String, ArtifactTypeConfig> resourceInstanceDeploymentArtifacts;
92         private Map<String, ArtifactTypeConfig> resourceInformationalArtifacts;
93         private Map<String, ArtifactTypeConfig> resourceInformationalDeployedArtifacts;
94         private Map<String, Object> serviceApiArtifacts;
95         private List<String> excludeServiceCategory;
96         private Map<String, Set<String>> requirementsToFulfillBeforeCert;
97         private Map<String, Set<String>> capabilitiesToConsumeBeforeCert;
98
99         private List<String> artifactTypes;
100         private List<String> licenseTypes;
101
102         private Integer additionalInformationMaxNumberOfKeys;
103         private Integer defaultHeatArtifactTimeoutMinutes;
104
105         private BeMonitoringConfig systemMonitoring;
106         private CleanComponentsConfiguration cleanComponentsConfiguration;
107
108         private String artifactsIndex;
109
110         private String heatEnvArtifactHeader;
111         private String heatEnvArtifactFooter;
112
113         private String toscaFilesDir;
114         private String heatTranslatorPath;
115
116         private OnboardingConfig onboarding;
117
118         private CassandrConfig cassandraConfig;
119
120         private SwitchoverDetectorConfig switchoverDetector;
121
122         private ApplicationL1CacheConfig applicationL1Cache;
123
124         private ApplicationL2CacheConfig applicationL2Cache;
125
126         private ToscaValidatorsConfig toscaValidators;
127
128         private boolean disableAudit;
129         
130         private Map<String, VfModuleProperty> vfModuleProperties;
131         
132         private Map<String, String> genericAssetNodeTypes;
133
134         public Map<String, String> getGenericAssetNodeTypes() {
135                 return genericAssetNodeTypes;
136         }
137
138         public void setGenericAssetNodeTypes(Map<String, String> genericAssetNodeTypes) {
139                 this.genericAssetNodeTypes = genericAssetNodeTypes;
140         }
141
142         public SwitchoverDetectorConfig getSwitchoverDetector() {
143                 return switchoverDetector;
144         }
145
146         public void setSwitchoverDetector(SwitchoverDetectorConfig switchoverDetector) {
147                 this.switchoverDetector = switchoverDetector;
148         }
149
150         public ApplicationL1CacheConfig getApplicationL1Cache() {
151                 return applicationL1Cache;
152         }
153
154         public void setApplicationL1Cache(ApplicationL1CacheConfig applicationL1Cache) {
155                 this.applicationL1Cache = applicationL1Cache;
156         }
157
158         public ApplicationL2CacheConfig getApplicationL2Cache() {
159                 return applicationL2Cache;
160         }
161
162         public void setApplicationL2Cache(ApplicationL2CacheConfig applicationL2Cache) {
163                 this.applicationL2Cache = applicationL2Cache;
164         }
165
166         private EcompPortalConfig ecompPortal;
167
168         public CassandrConfig getCassandraConfig() {
169                 return cassandraConfig;
170         }
171
172         public void setCassandraConfig(CassandrConfig cassandraKeySpace) {
173                 this.cassandraConfig = cassandraKeySpace;
174         }
175
176         public List<String> getIdentificationHeaderFields() {
177                 return identificationHeaderFields;
178         }
179
180         public void setIdentificationHeaderFields(List<String> identificationHeaderFields) {
181                 this.identificationHeaderFields = identificationHeaderFields;
182         }
183
184         public Date getReleased() {
185                 return released;
186         }
187
188         public String getVersion() {
189                 return version;
190         }
191
192         public void setReleased(Date released) {
193                 this.released = released;
194         }
195
196         public void setVersion(String version) {
197                 this.version = version;
198         }
199
200         public List<String> getProtocols() {
201                 return protocols;
202         }
203
204         public void setProtocols(List<String> protocols) {
205                 this.protocols = protocols;
206         }
207
208         public Map<String, String> getUsers() {
209                 return users;
210         }
211
212         public void setUsers(Map<String, String> users) {
213                 this.users = users;
214         }
215
216         public String getBeFqdn() {
217                 return beFqdn;
218         }
219
220         public void setBeFqdn(String beHost) {
221                 this.beFqdn = beHost;
222         }
223
224         public Integer getBeHttpPort() {
225                 return beHttpPort;
226         }
227
228         public void setBeHttpPort(Integer beHttpPort) {
229                 this.beHttpPort = beHttpPort;
230         }
231
232         public Integer getBeSslPort() {
233                 return beSslPort;
234         }
235
236         public void setBeSslPort(Integer beSslPort) {
237                 this.beSslPort = beSslPort;
238         }
239
240         public String getBeContext() {
241                 return beContext;
242         }
243
244         public void setBeContext(String beContext) {
245                 this.beContext = beContext;
246         }
247
248         public String getBeProtocol() {
249                 return beProtocol;
250         }
251
252         public void setBeProtocol(String beProtocol) {
253                 this.beProtocol = beProtocol;
254         }
255
256         public Map<String, Object> getNeo4j() {
257                 return neo4j;
258         }
259
260         public void setNeo4j(Map<String, Object> neo4j) {
261                 this.neo4j = neo4j;
262         }
263
264         public ElasticSearchConfig getElasticSearch() {
265                 return elasticSearch;
266         }
267
268         public void setElasticSearch(ElasticSearchConfig elasticSearch) {
269                 this.elasticSearch = elasticSearch;
270         }
271
272         public String getTitanCfgFile() {
273                 return titanCfgFile;
274         }
275
276         public void setTitanCfgFile(String titanCfgFile) {
277                 this.titanCfgFile = titanCfgFile;
278         }
279
280         public String getTitanMigrationKeySpaceCfgFile() {
281                 return titanMigrationKeySpaceCfgFile;
282         }
283
284         public void setTitanMigrationKeySpaceCfgFile(String titanMigrationKeySpaceCfgFile) {
285                 this.titanMigrationKeySpaceCfgFile = titanMigrationKeySpaceCfgFile;
286         }
287
288         public Boolean getTitanInMemoryGraph() {
289                 return titanInMemoryGraph;
290         }
291
292         public void setTitanInMemoryGraph(Boolean titanInMemoryGraph) {
293                 this.titanInMemoryGraph = titanInMemoryGraph;
294         }
295
296         public Long getTitanLockTimeout() {
297                 return titanLockTimeout;
298         }
299
300         public void setTitanLockTimeout(Long titanLockTimeout) {
301                 this.titanLockTimeout = titanLockTimeout;
302         }
303
304         public Long getTitanHealthCheckReadTimeout() {
305                 return titanHealthCheckReadTimeout;
306         }
307
308         public Long getTitanHealthCheckReadTimeout(long defaultVal) {
309                 return titanHealthCheckReadTimeout == null ? defaultVal : titanHealthCheckReadTimeout;
310         }
311
312         public void setTitanHealthCheckReadTimeout(Long titanHealthCheckReadTimeout) {
313                 this.titanHealthCheckReadTimeout = titanHealthCheckReadTimeout;
314         }
315
316         public Long getTitanReconnectIntervalInSeconds() {
317                 return titanReconnectIntervalInSeconds;
318         }
319
320         public Long getTitanReconnectIntervalInSeconds(long defaultVal) {
321                 return titanReconnectIntervalInSeconds == null ? defaultVal : titanReconnectIntervalInSeconds;
322         }
323
324         public void setTitanReconnectIntervalInSeconds(Long titanReconnectIntervalInSeconds) {
325                 this.titanReconnectIntervalInSeconds = titanReconnectIntervalInSeconds;
326         }
327
328         public Long getEsReconnectIntervalInSeconds() {
329                 return esReconnectIntervalInSeconds;
330         }
331
332         public Long getEsReconnectIntervalInSeconds(long defaultVal) {
333                 return esReconnectIntervalInSeconds == null ? defaultVal : esReconnectIntervalInSeconds;
334         }
335
336         public void setEsReconnectIntervalInSeconds(Long esReconnectIntervalInSeconds) {
337                 this.esReconnectIntervalInSeconds = esReconnectIntervalInSeconds;
338         }
339
340         public List<String> getArtifactTypes() {
341                 return artifactTypes;
342         }
343
344         public void setArtifactTypes(List<String> artifactTypes) {
345                 this.artifactTypes = artifactTypes;
346         }
347
348         public List<String> getExcludeResourceCategory() {
349                 return excludeResourceCategory;
350         }
351
352         public void setExcludeResourceCategory(List<String> excludeResourceCategory) {
353                 this.excludeResourceCategory = excludeResourceCategory;
354         }
355
356         public Map<String, Object> getToscaArtifacts() {
357                 return toscaArtifacts;
358         }
359
360         public void setToscaArtifacts(Map<String, Object> toscaArtifacts) {
361                 this.toscaArtifacts = toscaArtifacts;
362         }
363
364         public Map<String, Object> getInformationalResourceArtifacts() {
365                 return informationalResourceArtifacts;
366         }
367
368         public void setInformationalResourceArtifacts(Map<String, Object> informationalResourceArtifacts) {
369                 this.informationalResourceArtifacts = informationalResourceArtifacts;
370         }
371
372         public Map<String, Object> getInformationalServiceArtifacts() {
373                 return informationalServiceArtifacts;
374         }
375
376         public void setInformationalServiceArtifacts(Map<String, Object> informationalServiceArtifacts) {
377                 this.informationalServiceArtifacts = informationalServiceArtifacts;
378         }
379
380         public Map<String, Object> getServiceApiArtifacts() {
381                 return serviceApiArtifacts;
382         }
383
384         public void setServiceApiArtifacts(Map<String, Object> serviceApiArtifacts) {
385                 this.serviceApiArtifacts = serviceApiArtifacts;
386         }
387
388         public Map<String, ArtifactTypeConfig> getServiceDeploymentArtifacts() {
389                 return serviceDeploymentArtifacts;
390         }
391
392         public void setServiceDeploymentArtifacts(Map<String, ArtifactTypeConfig> serviceDeploymentArtifacts) {
393                 this.serviceDeploymentArtifacts = serviceDeploymentArtifacts;
394         }
395
396         public Map<String, ArtifactTypeConfig> getResourceDeploymentArtifacts() {
397                 return resourceDeploymentArtifacts;
398         }
399
400         public void setResourceDeploymentArtifacts(Map<String, ArtifactTypeConfig> resourceDeploymentArtifacts) {
401                 this.resourceDeploymentArtifacts = resourceDeploymentArtifacts;
402         }
403
404         public void setResourceInstanceDeploymentArtifacts(
405                         Map<String, ArtifactTypeConfig> resourceInstanceDeploymentArtifacts) {
406                 this.resourceInstanceDeploymentArtifacts = resourceInstanceDeploymentArtifacts;
407         }
408
409         public Map<String, ArtifactTypeConfig> getResourceInstanceDeploymentArtifacts() {
410                 return resourceInstanceDeploymentArtifacts;
411         }
412
413         public List<String> getExcludeServiceCategory() {
414                 return excludeServiceCategory;
415         }
416
417         public void setExcludeServiceCategory(List<String> excludeServiceCategory) {
418                 this.excludeServiceCategory = excludeServiceCategory;
419         }
420
421         public List<String> getLicenseTypes() {
422                 return licenseTypes;
423         }
424
425         public void setLicenseTypes(List<String> licenseTypes) {
426                 this.licenseTypes = licenseTypes;
427         }
428
429         public Integer getAdditionalInformationMaxNumberOfKeys() {
430                 return additionalInformationMaxNumberOfKeys;
431         }
432
433         public void setAdditionalInformationMaxNumberOfKeys(Integer additionalInformationMaxNumberOfKeys) {
434                 this.additionalInformationMaxNumberOfKeys = additionalInformationMaxNumberOfKeys;
435         }
436
437         public BeMonitoringConfig getSystemMonitoring() {
438                 return systemMonitoring;
439         }
440
441         public void setSystemMonitoring(BeMonitoringConfig systemMonitoring) {
442                 this.systemMonitoring = systemMonitoring;
443         }
444
445         public Integer getDefaultHeatArtifactTimeoutMinutes() {
446                 return defaultHeatArtifactTimeoutMinutes;
447         }
448
449         public void setDefaultHeatArtifactTimeoutMinutes(Integer defaultHeatArtifactTimeoutMinutes) {
450                 this.defaultHeatArtifactTimeoutMinutes = defaultHeatArtifactTimeoutMinutes;
451         }
452
453         public Long getUebHealthCheckReconnectIntervalInSeconds() {
454                 return uebHealthCheckReconnectIntervalInSeconds;
455         }
456
457         public void setUebHealthCheckReconnectIntervalInSeconds(Long uebHealthCheckReconnectIntervalInSeconds) {
458                 this.uebHealthCheckReconnectIntervalInSeconds = uebHealthCheckReconnectIntervalInSeconds;
459         }
460
461         public Long getUebHealthCheckReadTimeout() {
462                 return uebHealthCheckReadTimeout;
463         }
464
465         public void setUebHealthCheckReadTimeout(Long uebHealthCheckReadTimeout) {
466                 this.uebHealthCheckReadTimeout = uebHealthCheckReadTimeout;
467         }
468
469         public static class ElasticSearchConfig {
470
471                 List<IndicesTimeFrequencyEntry> indicesTimeFrequency;
472
473                 public List<IndicesTimeFrequencyEntry> getIndicesTimeFrequency() {
474                         return indicesTimeFrequency;
475                 }
476
477                 public void setIndicesTimeFrequency(List<IndicesTimeFrequencyEntry> indicesTimeFrequency) {
478                         this.indicesTimeFrequency = indicesTimeFrequency;
479                 }
480
481                 public static class IndicesTimeFrequencyEntry {
482
483                         String indexPrefix;
484                         String creationPeriod;
485
486                         public String getIndexPrefix() {
487                                 return indexPrefix;
488                         }
489
490                         public void setIndexPrefix(String indexPrefix) {
491                                 this.indexPrefix = indexPrefix;
492                         }
493
494                         public String getCreationPeriod() {
495                                 return creationPeriod;
496                         }
497
498                         public void setCreationPeriod(String creationPeriod) {
499                                 this.creationPeriod = creationPeriod;
500                         }
501                 }
502         }
503
504         public static class CassandrConfig {
505
506                 List<String> cassandraHosts;
507                 String localDataCenter;
508                 Long reconnectTimeout;
509                 List<KeyspaceConfig> keySpaces;
510                 boolean authenticate;
511                 String username;
512                 String password;
513                 boolean ssl;
514                 String truststorePath;
515                 String truststorePassword;
516
517                 public String getLocalDataCenter() {
518                         return localDataCenter;
519                 }
520
521                 public void setLocalDataCenter(String localDataCenter) {
522                         this.localDataCenter = localDataCenter;
523                 }
524
525                 public boolean isAuthenticate() {
526                         return authenticate;
527                 }
528
529                 public void setAuthenticate(boolean authenticate) {
530                         this.authenticate = authenticate;
531                 }
532
533                 public String getUsername() {
534                         return username;
535                 }
536
537                 public void setUsername(String username) {
538                         this.username = username;
539                 }
540
541                 public String getPassword() {
542                         return password;
543                 }
544
545                 public void setPassword(String password) {
546                         this.password = password;
547                 }
548
549                 public boolean isSsl() {
550                         return ssl;
551                 }
552
553                 public void setSsl(boolean ssl) {
554                         this.ssl = ssl;
555                 }
556
557                 public String getTruststorePath() {
558                         return truststorePath;
559                 }
560
561                 public void setTruststorePath(String truststorePath) {
562                         this.truststorePath = truststorePath;
563                 }
564
565                 public String getTruststorePassword() {
566                         return truststorePassword;
567                 }
568
569                 public void setTruststorePassword(String truststorePassword) {
570                         this.truststorePassword = truststorePassword;
571                 }
572
573                 public Long getReconnectTimeout() {
574                         return reconnectTimeout;
575                 }
576
577                 public void setReconnectTimeout(Long reconnectTimeout) {
578                         this.reconnectTimeout = reconnectTimeout;
579                 }
580
581                 public List<String> getCassandraHosts() {
582                         return cassandraHosts;
583                 }
584
585                 public void setCassandraHosts(List<String> cassandraHosts) {
586                         this.cassandraHosts = cassandraHosts;
587                 }
588
589                 public List<KeyspaceConfig> getKeySpaces() {
590                         return keySpaces;
591                 }
592
593                 public void setKeySpaces(List<KeyspaceConfig> cassandraConfig) {
594                         this.keySpaces = cassandraConfig;
595                 }
596
597                 public static class KeyspaceConfig {
598
599                         String name;
600                         String replicationStrategy;
601                         List<String> replicationInfo;
602
603                         public String getName() {
604                                 return name;
605                         }
606
607                         public void setName(String name) {
608                                 this.name = name;
609                         }
610
611                         public String getReplicationStrategy() {
612                                 return replicationStrategy;
613                         }
614
615                         public void setReplicationStrategy(String replicationStrategy) {
616                                 this.replicationStrategy = replicationStrategy;
617                         }
618
619                         public List<String> getReplicationInfo() {
620                                 return replicationInfo;
621                         }
622
623                         public void setReplicationInfo(List<String> replicationInfo) {
624                                 this.replicationInfo = replicationInfo;
625                         }
626                 }
627         }
628
629         public static class SwitchoverDetectorConfig {
630
631                 String gBeFqdn;
632                 String gFeFqdn;
633                 String beVip;
634                 String feVip;
635                 int beResolveAttempts;
636                 int feResolveAttempts;
637                 Boolean enabled;
638                 long interval;
639                 String changePriorityUser;
640                 String changePriorityPassword;
641                 String publishNetworkUrl;
642                 String publishNetworkBody;
643                 Map<String, GroupInfo> groups;
644
645                 public String getgBeFqdn() {
646                         return gBeFqdn;
647                 }
648
649                 public void setgBeFqdn(String gBeFqdn) {
650                         this.gBeFqdn = gBeFqdn;
651                 }
652
653                 public String getgFeFqdn() {
654                         return gFeFqdn;
655                 }
656
657                 public void setgFeFqdn(String gFeFqdn) {
658                         this.gFeFqdn = gFeFqdn;
659                 }
660
661                 public String getBeVip() {
662                         return beVip;
663                 }
664
665                 public void setBeVip(String beVip) {
666                         this.beVip = beVip;
667                 }
668
669                 public String getFeVip() {
670                         return feVip;
671                 }
672
673                 public void setFeVip(String feVip) {
674                         this.feVip = feVip;
675                 }
676
677                 public int getBeResolveAttempts() {
678                         return beResolveAttempts;
679                 }
680
681                 public void setBeResolveAttempts(int beResolveAttempts) {
682                         this.beResolveAttempts = beResolveAttempts;
683                 }
684
685                 public int getFeResolveAttempts() {
686                         return feResolveAttempts;
687                 }
688
689                 public void setFeResolveAttempts(int feResolveAttempts) {
690                         this.feResolveAttempts = feResolveAttempts;
691                 }
692
693                 public Boolean getEnabled() {
694                         return enabled;
695                 }
696
697                 public void setEnabled(Boolean enabled) {
698                         this.enabled = enabled;
699                 }
700
701                 public long getInterval() {
702                         return interval;
703                 }
704
705                 public void setInterval(long interval) {
706                         this.interval = interval;
707                 }
708
709                 public String getChangePriorityUser() {
710                         return changePriorityUser;
711                 }
712
713                 public void setChangePriorityUser(String changePriorityUser) {
714                         this.changePriorityUser = changePriorityUser;
715                 }
716
717                 public String getChangePriorityPassword() {
718                         return changePriorityPassword;
719                 }
720
721                 public void setChangePriorityPassword(String changePriorityPassword) {
722                         this.changePriorityPassword = changePriorityPassword;
723                 }
724
725                 public String getPublishNetworkUrl() {
726                         return publishNetworkUrl;
727                 }
728
729                 public void setPublishNetworkUrl(String publishNetworkUrl) {
730                         this.publishNetworkUrl = publishNetworkUrl;
731                 }
732
733                 public String getPublishNetworkBody() {
734                         return publishNetworkBody;
735                 }
736
737                 public void setPublishNetworkBody(String publishNetworkBody) {
738                         this.publishNetworkBody = publishNetworkBody;
739                 }
740
741                 public Map<String, GroupInfo> getGroups() {
742                         return groups;
743                 }
744
745                 public void setGroups(Map<String, GroupInfo> groups) {
746                         this.groups = groups;
747                 }
748
749                 public static class GroupInfo {
750
751                         String changePriorityUrl;
752                         String changePriorityBody;
753
754                         public String getChangePriorityUrl() {
755                                 return changePriorityUrl;
756                         }
757
758                         public void setChangePriorityUrl(String changePriorityUrl) {
759                                 this.changePriorityUrl = changePriorityUrl;
760                         }
761
762                         public String getChangePriorityBody() {
763                                 return changePriorityBody;
764                         }
765
766                         public void setChangePriorityBody(String changePriorityBody) {
767                                 this.changePriorityBody = changePriorityBody;
768                         }
769                 }
770
771         }
772
773         public static class BeMonitoringConfig {
774
775                 Boolean enabled;
776                 Boolean isProxy;
777                 Integer probeIntervalInSeconds;
778
779                 public Boolean getEnabled() {
780                         return enabled;
781                 }
782
783                 public void setEnabled(Boolean enabled) {
784                         this.enabled = enabled;
785                 }
786
787                 public Boolean getIsProxy() {
788                         return isProxy;
789                 }
790
791                 public void setIsProxy(Boolean isProxy) {
792                         this.isProxy = isProxy;
793                 }
794
795                 public Integer getProbeIntervalInSeconds() {
796                         return probeIntervalInSeconds;
797                 }
798
799                 public Integer getProbeIntervalInSeconds(int defaultVal) {
800                         return probeIntervalInSeconds == null ? defaultVal : probeIntervalInSeconds;
801                 }
802
803                 public void setProbeIntervalInSeconds(Integer probeIntervalInSeconds) {
804                         this.probeIntervalInSeconds = probeIntervalInSeconds;
805                 }
806         }
807
808         public static class ArtifactTypeConfig {
809
810                 List<String> acceptedTypes;
811                 List<String> validForResourceTypes;
812
813                 public List<String> getValidForResourceTypes() {
814                         return validForResourceTypes;
815                 }
816
817                 public void setValidForResourceTypes(List<String> validForResourceTypes) {
818                         this.validForResourceTypes = validForResourceTypes;
819                 }
820
821                 public List<String> getAcceptedTypes() {
822                         return acceptedTypes;
823                 }
824
825                 public void setAcceptedTypes(List<String> acceptedTypes) {
826                         this.acceptedTypes = acceptedTypes;
827                 }
828         }
829
830         public static class OnboardingConfig {
831
832                 String protocol = "http";
833                 String host;
834                 Integer port;
835                 String downloadCsarUri;
836
837                 public String getProtocol() {
838                         return protocol;
839                 }
840
841                 public void setProtocol(String protocol) {
842                         this.protocol = protocol;
843                 }
844
845                 public String getHost() {
846                         return host;
847                 }
848
849                 public void setHost(String host) {
850                         this.host = host;
851                 }
852
853                 public Integer getPort() {
854                         return port;
855                 }
856
857                 public void setPort(Integer port) {
858                         this.port = port;
859                 }
860
861                 public String getDownloadCsarUri() {
862                         return downloadCsarUri;
863                 }
864
865                 public void setDownloadCsarUri(String downloadCsarUri) {
866                         this.downloadCsarUri = downloadCsarUri;
867                 }
868
869                 @Override
870                 public String toString() {
871                         return "OnboardingConfig [protocol=" + protocol + ", host=" + host + ", port=" + port + ", downloadCsarUri="
872                                         + downloadCsarUri + "]";
873                 }
874
875         }
876
877         public static class EcompPortalConfig {
878
879                 private String defaultFunctionalMenu;
880
881                 public String getDefaultFunctionalMenu() {
882                         return defaultFunctionalMenu;
883                 }
884
885                 public void setDefaultFunctionalMenu(String defaultFunctionalMenu) {
886                         this.defaultFunctionalMenu = defaultFunctionalMenu;
887                 }
888
889                 @Override
890                 public String toString() {
891                         return "EcompPortalConfig [defaultFunctionalMenu=" + defaultFunctionalMenu + "]";
892                 }
893
894         }
895
896         public static class ApplicationL1CacheConfig {
897
898                 ApplicationL1CacheInfo datatypes;
899
900                 public ApplicationL1CacheInfo getDatatypes() {
901                         return datatypes;
902                 }
903
904                 public void setDatatypes(ApplicationL1CacheInfo datatypes) {
905                         this.datatypes = datatypes;
906                 }
907
908                 @Override
909                 public String toString() {
910                         return "ApplicationL1CacheConfig [datatypes=" + datatypes + "]";
911                 }
912
913         }
914
915         public static class ApplicationL2CacheConfig {
916
917                 boolean enabled;
918                 ApplicationL1CacheCatalogInfo catalogL1Cache;
919
920                 QueueInfo queue;
921
922                 public boolean isEnabled() {
923                         return enabled;
924                 }
925
926                 public void setEnabled(boolean enabled) {
927                         this.enabled = enabled;
928                 }
929
930                 public ApplicationL1CacheCatalogInfo getCatalogL1Cache() {
931                         return catalogL1Cache;
932                 }
933
934                 public void setCatalogL1Cache(ApplicationL1CacheCatalogInfo catalogL1Cache) {
935                         this.catalogL1Cache = catalogL1Cache;
936                 }
937
938                 public QueueInfo getQueue() {
939                         return queue;
940                 }
941
942                 public void setQueue(QueueInfo queue) {
943                         this.queue = queue;
944                 }
945
946                 @Override
947                 public String toString() {
948                         return "ApplicationL2CacheConfig [enabled=" + enabled + ", catalogL1Cache=" + catalogL1Cache + "]";
949                 }
950
951         }
952
953         public static class ToscaValidatorsConfig {
954
955                 private Integer stringMaxLength;
956
957                 public Integer getStringMaxLength() {
958                         return stringMaxLength;
959                 }
960
961                 public void setStringMaxLength(Integer stringMaxLength) {
962                         this.stringMaxLength = stringMaxLength;
963                 }
964
965                 @Override
966                 public String toString() {
967                         return "ToscaValidatorsConfig [stringMaxLength=" + stringMaxLength + "]";
968                 }
969
970         }
971
972         public static class ApplicationL1CacheInfo {
973
974                 Boolean enabled;
975                 Integer firstRunDelay;
976                 Integer pollIntervalInSec;
977
978                 public Boolean getEnabled() {
979                         return enabled;
980                 }
981
982                 public void setEnabled(Boolean enabled) {
983                         this.enabled = enabled;
984                 }
985
986                 public Integer getFirstRunDelay() {
987                         return firstRunDelay;
988                 }
989
990                 public void setFirstRunDelay(Integer firstRunDelay) {
991                         this.firstRunDelay = firstRunDelay;
992                 }
993
994                 public Integer getPollIntervalInSec() {
995                         return pollIntervalInSec;
996                 }
997
998                 public void setPollIntervalInSec(Integer pollIntervalInSec) {
999                         this.pollIntervalInSec = pollIntervalInSec;
1000                 }
1001
1002                 @Override
1003                 public String toString() {
1004                         return "ApplicationL1CacheInfo [enabled=" + enabled + ", firstRunDelay=" + firstRunDelay
1005                                         + ", pollIntervalInSec=" + pollIntervalInSec + "]";
1006                 }
1007         }
1008
1009         public static class ApplicationL1CacheCatalogInfo {
1010
1011                 Boolean enabled;
1012                 Integer resourcesSizeInCache;
1013                 Integer servicesSizeInCache;
1014                 Integer productsSizeInCache;
1015
1016                 public Boolean getEnabled() {
1017                         return enabled;
1018                 }
1019
1020                 public void setEnabled(Boolean enabled) {
1021                         this.enabled = enabled;
1022                 }
1023
1024                 public Integer getResourcesSizeInCache() {
1025                         return resourcesSizeInCache;
1026                 }
1027
1028                 public void setResourcesSizeInCache(Integer resourcesSizeInCache) {
1029                         this.resourcesSizeInCache = resourcesSizeInCache;
1030                 }
1031
1032                 public Integer getServicesSizeInCache() {
1033                         return servicesSizeInCache;
1034                 }
1035
1036                 public void setServicesSizeInCache(Integer servicesSizeInCache) {
1037                         this.servicesSizeInCache = servicesSizeInCache;
1038                 }
1039
1040                 public Integer getProductsSizeInCache() {
1041                         return productsSizeInCache;
1042                 }
1043
1044                 public void setProductsSizeInCache(Integer productsSizeInCache) {
1045                         this.productsSizeInCache = productsSizeInCache;
1046                 }
1047
1048                 @Override
1049                 public String toString() {
1050                         return "ApplicationL1CacheCatalogInfo [enabled=" + enabled + ", resourcesSizeInCache="
1051                                         + resourcesSizeInCache + ", servicesSizeInCache=" + servicesSizeInCache + ", productsSizeInCache="
1052                                         + productsSizeInCache + "]";
1053                 }
1054
1055         }
1056
1057         public static class QueueInfo {
1058                 Integer numberOfCacheWorkers;
1059                 Integer waitOnShutDownInMinutes;
1060                 Integer syncIntervalInSecondes;
1061
1062                 public Integer getWaitOnShutDownInMinutes() {
1063                         return waitOnShutDownInMinutes;
1064                 }
1065
1066                 public void setWaitOnShutDownInMinutes(Integer waitOnShutDownInMinutes) {
1067                         this.waitOnShutDownInMinutes = waitOnShutDownInMinutes;
1068                 }
1069
1070                 public Integer getSyncIntervalInSecondes() {
1071                         return syncIntervalInSecondes;
1072                 }
1073
1074                 public void setSyncIntervalInSecondes(Integer syncIntervalInSecondes) {
1075                         this.syncIntervalInSecondes = syncIntervalInSecondes;
1076                 }
1077
1078                 public Integer getNumberOfCacheWorkers() {
1079                         return numberOfCacheWorkers;
1080                 }
1081
1082                 public void setNumberOfCacheWorkers(Integer numberOfCacheWorkers) {
1083                         this.numberOfCacheWorkers = numberOfCacheWorkers;
1084                 }
1085
1086                 @Override
1087                 public String toString() {
1088                         return "QueueInfo[" + "waitOnShutDownInMinutes=" + waitOnShutDownInMinutes + ", syncIntervalInSecondes="
1089                                         + syncIntervalInSecondes + ", numberOfCacheWorkers=" + this.numberOfCacheWorkers + ']';
1090                 }
1091         }
1092
1093         public CleanComponentsConfiguration getCleanComponentsConfiguration() {
1094                 return cleanComponentsConfiguration;
1095         }
1096
1097         public void setCleanComponentsConfiguration(CleanComponentsConfiguration cleanComponentsConfiguration) {
1098                 this.cleanComponentsConfiguration = cleanComponentsConfiguration;
1099         }
1100
1101         @Override
1102         public String toString() {
1103                 return new StringBuilder().append(format("backend host: %s\n", beFqdn))
1104                                 .append(format("backend http port: %s\n", beHttpPort))
1105                                 .append(format("backend ssl port: %s\n", beSslPort)).append(format("backend context: %s\n", beContext))
1106                                 .append(format("backend protocol: %s\n", beProtocol)).append(format("Version: %s\n", version))
1107                                 .append(format("Released: %s\n", released)).append(format("Supported protocols: %s\n", protocols))
1108                                 .append(format("Users: %s\n", users)).append(format("Neo4j: %s\n", neo4j))
1109                                 .append(format("ElasticSearch: %s\n", elasticSearch))
1110                                 .append(format("Titan Cfg File: %s\n", titanCfgFile))
1111                                 .append(format("Titan In memory: %s\n", titanInMemoryGraph))
1112                                 .append(format("Titan lock timeout: %s\n", titanLockTimeout))
1113                                 .append(format("Titan reconnect interval seconds: %s\n", titanReconnectIntervalInSeconds))
1114                                 .append(format("excludeResourceCategory: %s\n", excludeResourceCategory))
1115                                 .append(format("informationalResourceArtifacts: %s\n", informationalResourceArtifacts))
1116                                 .append(format("deploymentResourceArtifacts: %s\n", deploymentResourceArtifacts))
1117                                 .append(format("informationalServiceArtifacts: %s\n", informationalServiceArtifacts))
1118                                 .append(format("Supported artifacts types: %s\n", artifactTypes))
1119                                 .append(format("Supported license types: %s\n", licenseTypes))
1120                                 .append(format("Additional information Maximum number of preoperties: %s\n",
1121                                                 additionalInformationMaxNumberOfKeys))
1122                                 .append(format("Default Heat Artifact Timeout in Minutes: %s\n", defaultHeatArtifactTimeoutMinutes))
1123                                 .append(format("URLs For HTTP Requests that will not be automatically logged : %s\n", unLoggedUrls))
1124                                 .append(format("Service Api Artifacts: %s\n", serviceApiArtifacts))
1125                                 .append(format("heat env artifact header: %s\n", heatEnvArtifactHeader))
1126                                 .append(format("heat env artifact footer: %s\n", heatEnvArtifactFooter))
1127                                 .append(format("onboarding: %s\n", onboarding)).toString();
1128         }
1129
1130         public List<String> getUnLoggedUrls() {
1131                 return unLoggedUrls;
1132         }
1133
1134         public void setUnLoggedUrls(List<String> unLoggedUrls) {
1135                 this.unLoggedUrls = unLoggedUrls;
1136         }
1137
1138         public Map<String, Object> getDeploymentResourceArtifacts() {
1139                 return deploymentResourceArtifacts;
1140         }
1141
1142         public void setDeploymentResourceArtifacts(Map<String, Object> deploymentResourceArtifacts) {
1143                 this.deploymentResourceArtifacts = deploymentResourceArtifacts;
1144         }
1145
1146         public String getHeatEnvArtifactHeader() {
1147                 return heatEnvArtifactHeader;
1148         }
1149
1150         public void setHeatEnvArtifactHeader(String heatEnvArtifactHeader) {
1151                 this.heatEnvArtifactHeader = heatEnvArtifactHeader;
1152         }
1153
1154         public String getHeatEnvArtifactFooter() {
1155                 return heatEnvArtifactFooter;
1156         }
1157
1158         public void setHeatEnvArtifactFooter(String heatEnvArtifactFooter) {
1159                 this.heatEnvArtifactFooter = heatEnvArtifactFooter;
1160         }
1161
1162         public Map<String, Object> getDeploymentResourceInstanceArtifacts() {
1163                 return deploymentResourceInstanceArtifacts;
1164         }
1165
1166         public void setDeploymentResourceInstanceArtifacts(Map<String, Object> deploymentResourceInstanceArtifacts) {
1167                 this.deploymentResourceInstanceArtifacts = deploymentResourceInstanceArtifacts;
1168         }
1169
1170         public String getArtifactsIndex() {
1171                 return artifactsIndex;
1172         }
1173
1174         public void setArtifactsIndex(String artifactsIndex) {
1175                 this.artifactsIndex = artifactsIndex;
1176         }
1177
1178         public Map<String, ArtifactTypeConfig> getResourceInformationalDeployedArtifacts() {
1179                 return resourceInformationalDeployedArtifacts;
1180         }
1181
1182         public void setResourceInformationalDeployedArtifacts(
1183                         Map<String, ArtifactTypeConfig> resourceInformationalDeployedArtifacts) {
1184                 this.resourceInformationalDeployedArtifacts = resourceInformationalDeployedArtifacts;
1185         }
1186
1187         public List<String> getResourceTypes() {
1188                 return resourceTypes;
1189         }
1190
1191         public void setResourceTypes(List<String> resourceTypes) {
1192                 this.resourceTypes = resourceTypes;
1193         }
1194
1195         public String getToscaFilesDir() {
1196                 return toscaFilesDir;
1197         }
1198
1199         public void setToscaFilesDir(String toscaFilesDir) {
1200                 this.toscaFilesDir = toscaFilesDir;
1201         }
1202
1203         public String getHeatTranslatorPath() {
1204                 return heatTranslatorPath;
1205         }
1206
1207         public void setHeatTranslatorPath(String heatTranslatorPath) {
1208                 this.heatTranslatorPath = heatTranslatorPath;
1209         }
1210
1211         public Map<String, Set<String>> getRequirementsToFulfillBeforeCert() {
1212                 return requirementsToFulfillBeforeCert;
1213         }
1214
1215         public void setRequirementsToFulfillBeforeCert(Map<String, Set<String>> requirementsToFulfillBeforeCert) {
1216                 this.requirementsToFulfillBeforeCert = requirementsToFulfillBeforeCert;
1217         }
1218
1219         public Map<String, Set<String>> getCapabilitiesToConsumeBeforeCert() {
1220                 return capabilitiesToConsumeBeforeCert;
1221         }
1222
1223         public void setCapabilitiesToConsumeBeforeCert(Map<String, Set<String>> capabilitiesToConsumeBeforeCert) {
1224                 this.capabilitiesToConsumeBeforeCert = capabilitiesToConsumeBeforeCert;
1225         }
1226
1227         public OnboardingConfig getOnboarding() {
1228                 return onboarding;
1229         }
1230
1231         public void setOnboarding(OnboardingConfig onboarding) {
1232                 this.onboarding = onboarding;
1233         }
1234
1235         public EcompPortalConfig getEcompPortal() {
1236                 return ecompPortal;
1237         }
1238
1239         public void setEcompPortal(EcompPortalConfig ecompPortal) {
1240                 this.ecompPortal = ecompPortal;
1241         }
1242
1243         public ToscaValidatorsConfig getToscaValidators() {
1244                 return toscaValidators;
1245         }
1246
1247         public void setToscaValidators(ToscaValidatorsConfig toscaValidators) {
1248                 this.toscaValidators = toscaValidators;
1249         }
1250
1251         public boolean isDisableAudit() {
1252                 return disableAudit;
1253         }
1254
1255         public void setDisableAudit(boolean enableAudit) {
1256                 this.disableAudit = enableAudit;
1257         }
1258
1259         public Map<String, ArtifactTypeConfig> getResourceInformationalArtifacts() {
1260                 return resourceInformationalArtifacts;
1261         }
1262
1263         public void setResourceInformationalArtifacts(Map<String, ArtifactTypeConfig> resourceInformationalArtifacts) {
1264                 this.resourceInformationalArtifacts = resourceInformationalArtifacts;
1265         }
1266
1267         public Map<String, VfModuleProperty> getVfModuleProperties() {
1268                 return vfModuleProperties;
1269         }
1270
1271         public void setVfModuleProperties(Map<String, VfModuleProperty> vfModuleProperties) {
1272                 this.vfModuleProperties = vfModuleProperties;
1273         }
1274
1275         public String getToscaConformanceLevel() {
1276                 return toscaConformanceLevel;
1277         }
1278
1279         public void setToscaConformanceLevel(String toscaConformanceLevel) {
1280                 this.toscaConformanceLevel = toscaConformanceLevel;
1281         }
1282         
1283         public String getMinToscaConformanceLevel() {
1284                 return minToscaConformanceLevel;
1285         }
1286
1287         public void setMinToscaConformanceLevel(String toscaConformanceLevel) {
1288                 this.minToscaConformanceLevel = toscaConformanceLevel;
1289         }
1290
1291         public static class VfModuleProperty {
1292                 private String forBaseModule;
1293                 private String forNonBaseModule;
1294                 public String getForBaseModule() {
1295                         return forBaseModule;
1296                 }
1297                 public void setForBaseModule(String forBaseModule) {
1298                         this.forBaseModule = forBaseModule;
1299                 }
1300                 public String getForNonBaseModule() {
1301                         return forNonBaseModule;
1302                 }
1303                 public void setForNonBaseModule(String forNonBaseModule) {
1304                         this.forNonBaseModule = forNonBaseModule;
1305                 }
1306         }
1307
1308         public LinkedList<Map<String, Map<String, String>>> getDefaultImports() {
1309                 return defaultImports;
1310         }
1311
1312         public void setDefaultImports(LinkedList<Map<String, Map<String, String>>> defaultImports) {
1313                 this.defaultImports = defaultImports;
1314         }
1315 }