X-Git-Url: https://gerrit.onap.org/r/gitweb?a=blobdiff_plain;f=common-app-api%2Fsrc%2Fmain%2Fjava%2Forg%2Fopenecomp%2Fsdc%2Fbe%2Fconfig%2FConfiguration.java;h=d33a80d8f78af2b4ea884b74aef379ac40bc5996;hb=c6d49ae4af0b13bd0f75a878ffa88487ef38afc2;hp=96505f4e5df013e3f74b26d419c7dde84939581d;hpb=451a3400b76511393c62a444f588a4ed15f4a549;p=sdc.git diff --git a/common-app-api/src/main/java/org/openecomp/sdc/be/config/Configuration.java b/common-app-api/src/main/java/org/openecomp/sdc/be/config/Configuration.java index 96505f4e5d..d33a80d8f7 100644 --- a/common-app-api/src/main/java/org/openecomp/sdc/be/config/Configuration.java +++ b/common-app-api/src/main/java/org/openecomp/sdc/be/config/Configuration.java @@ -7,9 +7,9 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -20,1214 +20,498 @@ package org.openecomp.sdc.be.config; +import static java.lang.String.format; +import static java.util.Collections.emptyMap; + +import java.util.Collections; import java.util.Date; import java.util.List; import java.util.Map; import java.util.Set; - +import lombok.Getter; +import lombok.NoArgsConstructor; +import lombok.Setter; +import lombok.ToString; +import org.apache.commons.collections.CollectionUtils; +import org.apache.commons.collections.map.CaseInsensitiveMap; import org.openecomp.sdc.common.api.BasicConfiguration; -import static java.lang.String.format; - +@Getter +@Setter +@NoArgsConstructor public class Configuration extends BasicConfiguration { - private List identificationHeaderFields; - /** - * Requests from these Urls will not be logged by - * org.openecomp.sdc.be.filters.BeServletFilter.
- **/ - private List unLoggedUrls; - - /** - * backend host - */ - private String beFqdn; - /** - * backend http port - */ - private Integer beHttpPort; - /** - * backend http secured port - */ - private Integer beSslPort; - /** - * be http context - */ - private String beContext; - /** - * backend protocol. http | https - */ - private String beProtocol = "http"; - - private Date released; - private String version = "1111"; - private List protocols; - private Map users; - private Map neo4j; - private ElasticSearchConfig elasticSearch; - private String titanCfgFile; - private Boolean titanInMemoryGraph; - private Long titanLockTimeout; - private Long titanReconnectIntervalInSeconds; - private Long titanHealthCheckReadTimeout; - private Long esReconnectIntervalInSeconds; - private Long uebHealthCheckReconnectIntervalInSeconds; - private Long uebHealthCheckReadTimeout; - - private List resourceTypes; - private List excludeResourceCategory; - private Map deploymentResourceArtifacts; - private Map deploymentResourceInstanceArtifacts; - private Map toscaArtifacts; - private Map informationalResourceArtifacts; - private Map informationalServiceArtifacts; - private Map resourceDeploymentArtifacts; - private Map serviceDeploymentArtifacts; - private Map resourceInstanceDeploymentArtifacts; - private Map resourceInformationalDeployedArtifacts; - private Map serviceApiArtifacts; - private List excludeServiceCategory; - private Map> requirementsToFulfillBeforeCert; - private Map> capabilitiesToConsumeBeforeCert; - - private List artifactTypes; - private List licenseTypes; - - private Integer additionalInformationMaxNumberOfKeys; - private Integer defaultHeatArtifactTimeoutMinutes; - - private BeMonitoringConfig systemMonitoring; - private CleanComponentsConfiguration cleanComponentsConfiguration; - - private String artifactsIndex; - - private String heatEnvArtifactHeader; - private String heatEnvArtifactFooter; - - private String toscaFilesDir; - private String heatTranslatorPath; - - private OnboardingConfig onboarding; - - private CassandrConfig cassandraConfig; - - private SwitchoverDetectorConfig switchoverDetector; - - private ApplicationL1CacheConfig applicationL1Cache; - - private ApplicationL2CacheConfig applicationL2Cache; - - private ToscaValidatorsConfig toscaValidators; - - private boolean disableAudit; - - public SwitchoverDetectorConfig getSwitchoverDetector() { - return switchoverDetector; - } - - public void setSwitchoverDetector(SwitchoverDetectorConfig switchoverDetector) { - this.switchoverDetector = switchoverDetector; - } - - public ApplicationL1CacheConfig getApplicationL1Cache() { - return applicationL1Cache; - } - - public void setApplicationL1Cache(ApplicationL1CacheConfig applicationL1Cache) { - this.applicationL1Cache = applicationL1Cache; - } - - public ApplicationL2CacheConfig getApplicationL2Cache() { - return applicationL2Cache; - } - - public void setApplicationL2Cache(ApplicationL2CacheConfig applicationL2Cache) { - this.applicationL2Cache = applicationL2Cache; - } - - private EcompPortalConfig ecompPortal; - - public CassandrConfig getCassandraConfig() { - return cassandraConfig; - } - - public void setCassandraConfig(CassandrConfig cassandraKeySpace) { - this.cassandraConfig = cassandraKeySpace; - } - - public List getIdentificationHeaderFields() { - return identificationHeaderFields; - } - - public void setIdentificationHeaderFields(List identificationHeaderFields) { - this.identificationHeaderFields = identificationHeaderFields; - } - - public Date getReleased() { - return released; - } - - public String getVersion() { - return version; - } - - public void setReleased(Date released) { - this.released = released; - } - - public void setVersion(String version) { - this.version = version; - } - - public List getProtocols() { - return protocols; - } - - public void setProtocols(List protocols) { - this.protocols = protocols; - } - - public Map getUsers() { - return users; - } - - public void setUsers(Map users) { - this.users = users; - } - - public String getBeFqdn() { - return beFqdn; - } - - public void setBeFqdn(String beHost) { - this.beFqdn = beHost; - } - - public Integer getBeHttpPort() { - return beHttpPort; - } - - public void setBeHttpPort(Integer beHttpPort) { - this.beHttpPort = beHttpPort; - } - - public Integer getBeSslPort() { - return beSslPort; - } - - public void setBeSslPort(Integer beSslPort) { - this.beSslPort = beSslPort; - } - - public String getBeContext() { - return beContext; - } - - public void setBeContext(String beContext) { - this.beContext = beContext; - } - - public String getBeProtocol() { - return beProtocol; - } - - public void setBeProtocol(String beProtocol) { - this.beProtocol = beProtocol; - } - - public Map getNeo4j() { - return neo4j; - } - - public void setNeo4j(Map neo4j) { - this.neo4j = neo4j; - } - - public ElasticSearchConfig getElasticSearch() { - return elasticSearch; - } - - public void setElasticSearch(ElasticSearchConfig elasticSearch) { - this.elasticSearch = elasticSearch; - } - - public String getTitanCfgFile() { - return titanCfgFile; - } - - public void setTitanCfgFile(String titanCfgFile) { - this.titanCfgFile = titanCfgFile; - } - - public Boolean getTitanInMemoryGraph() { - return titanInMemoryGraph; - } - - public void setTitanInMemoryGraph(Boolean titanInMemoryGraph) { - this.titanInMemoryGraph = titanInMemoryGraph; - } - - public Long getTitanLockTimeout() { - return titanLockTimeout; - } - - public void setTitanLockTimeout(Long titanLockTimeout) { - this.titanLockTimeout = titanLockTimeout; - } - - public Long getTitanHealthCheckReadTimeout() { - return titanHealthCheckReadTimeout; - } - - public Long getTitanHealthCheckReadTimeout(long defaultVal) { - return titanHealthCheckReadTimeout == null ? defaultVal : titanHealthCheckReadTimeout; - } - - public void setTitanHealthCheckReadTimeout(Long titanHealthCheckReadTimeout) { - this.titanHealthCheckReadTimeout = titanHealthCheckReadTimeout; - } - - public Long getTitanReconnectIntervalInSeconds() { - return titanReconnectIntervalInSeconds; - } - - public Long getTitanReconnectIntervalInSeconds(long defaultVal) { - return titanReconnectIntervalInSeconds == null ? defaultVal : titanReconnectIntervalInSeconds; - } - - public void setTitanReconnectIntervalInSeconds(Long titanReconnectIntervalInSeconds) { - this.titanReconnectIntervalInSeconds = titanReconnectIntervalInSeconds; - } - - public Long getEsReconnectIntervalInSeconds() { - return esReconnectIntervalInSeconds; - } - - public Long getEsReconnectIntervalInSeconds(long defaultVal) { - return esReconnectIntervalInSeconds == null ? defaultVal : esReconnectIntervalInSeconds; - } - - public void setEsReconnectIntervalInSeconds(Long esReconnectIntervalInSeconds) { - this.esReconnectIntervalInSeconds = esReconnectIntervalInSeconds; - } - - public List getArtifactTypes() { - return artifactTypes; - } - - public void setArtifactTypes(List artifactTypes) { - this.artifactTypes = artifactTypes; - } - - public List getExcludeResourceCategory() { - return excludeResourceCategory; - } - - public void setExcludeResourceCategory(List excludeResourceCategory) { - this.excludeResourceCategory = excludeResourceCategory; - } - - public Map getToscaArtifacts() { - return toscaArtifacts; - } - - public void setToscaArtifacts(Map toscaArtifacts) { - this.toscaArtifacts = toscaArtifacts; - } - - public Map getInformationalResourceArtifacts() { - return informationalResourceArtifacts; - } - - public void setInformationalResourceArtifacts(Map informationalResourceArtifacts) { - this.informationalResourceArtifacts = informationalResourceArtifacts; - } - - public Map getInformationalServiceArtifacts() { - return informationalServiceArtifacts; - } - - public void setInformationalServiceArtifacts(Map informationalServiceArtifacts) { - this.informationalServiceArtifacts = informationalServiceArtifacts; - } - - public Map getServiceApiArtifacts() { - return serviceApiArtifacts; - } - - public void setServiceApiArtifacts(Map serviceApiArtifacts) { - this.serviceApiArtifacts = serviceApiArtifacts; - } - - public Map getServiceDeploymentArtifacts() { - return serviceDeploymentArtifacts; - } - - public void setServiceDeploymentArtifacts(Map serviceDeploymentArtifacts) { - this.serviceDeploymentArtifacts = serviceDeploymentArtifacts; - } - - public Map getResourceDeploymentArtifacts() { - return resourceDeploymentArtifacts; - } - - public void setResourceDeploymentArtifacts(Map resourceDeploymentArtifacts) { - this.resourceDeploymentArtifacts = resourceDeploymentArtifacts; - } - - public void setResourceInstanceDeploymentArtifacts( - Map resourceInstanceDeploymentArtifacts) { - this.resourceInstanceDeploymentArtifacts = resourceInstanceDeploymentArtifacts; - } - - public Map getResourceInstanceDeploymentArtifacts() { - return resourceInstanceDeploymentArtifacts; - } - - public List getExcludeServiceCategory() { - return excludeServiceCategory; - } - - public void setExcludeServiceCategory(List excludeServiceCategory) { - this.excludeServiceCategory = excludeServiceCategory; - } - - public List getLicenseTypes() { - return licenseTypes; - } - - public void setLicenseTypes(List licenseTypes) { - this.licenseTypes = licenseTypes; - } - - public Integer getAdditionalInformationMaxNumberOfKeys() { - return additionalInformationMaxNumberOfKeys; - } - - public void setAdditionalInformationMaxNumberOfKeys(Integer additionalInformationMaxNumberOfKeys) { - this.additionalInformationMaxNumberOfKeys = additionalInformationMaxNumberOfKeys; - } - - public BeMonitoringConfig getSystemMonitoring() { - return systemMonitoring; - } - - public void setSystemMonitoring(BeMonitoringConfig systemMonitoring) { - this.systemMonitoring = systemMonitoring; - } - - public Integer getDefaultHeatArtifactTimeoutMinutes() { - return defaultHeatArtifactTimeoutMinutes; - } - - public void setDefaultHeatArtifactTimeoutMinutes(Integer defaultHeatArtifactTimeoutMinutes) { - this.defaultHeatArtifactTimeoutMinutes = defaultHeatArtifactTimeoutMinutes; - } - - public Long getUebHealthCheckReconnectIntervalInSeconds() { - return uebHealthCheckReconnectIntervalInSeconds; - } - - public void setUebHealthCheckReconnectIntervalInSeconds(Long uebHealthCheckReconnectIntervalInSeconds) { - this.uebHealthCheckReconnectIntervalInSeconds = uebHealthCheckReconnectIntervalInSeconds; - } - - public Long getUebHealthCheckReadTimeout() { - return uebHealthCheckReadTimeout; - } - - public void setUebHealthCheckReadTimeout(Long uebHealthCheckReadTimeout) { - this.uebHealthCheckReadTimeout = uebHealthCheckReadTimeout; - } - - public static class ElasticSearchConfig { - - List indicesTimeFrequency; - - public List getIndicesTimeFrequency() { - return indicesTimeFrequency; - } - - public void setIndicesTimeFrequency(List indicesTimeFrequency) { - this.indicesTimeFrequency = indicesTimeFrequency; - } - - public static class IndicesTimeFrequencyEntry { - - String indexPrefix; - String creationPeriod; - - public String getIndexPrefix() { - return indexPrefix; - } - - public void setIndexPrefix(String indexPrefix) { - this.indexPrefix = indexPrefix; - } - - public String getCreationPeriod() { - return creationPeriod; - } - - public void setCreationPeriod(String creationPeriod) { - this.creationPeriod = creationPeriod; - } - } - } - - public static class CassandrConfig { - - List cassandraHosts; - String localDataCenter; - Long reconnectTimeout; - List keySpaces; - boolean authenticate; - String username; - String password; - boolean ssl; - String truststorePath; - String truststorePassword; - - public String getLocalDataCenter() { - return localDataCenter; - } - - public void setLocalDataCenter(String localDataCenter) { - this.localDataCenter = localDataCenter; - } - - public boolean isAuthenticate() { - return authenticate; - } - - public void setAuthenticate(boolean authenticate) { - this.authenticate = authenticate; - } - - public String getUsername() { - return username; - } - - public void setUsername(String username) { - this.username = username; - } - - public String getPassword() { - return password; - } - - public void setPassword(String password) { - this.password = password; - } - - public boolean isSsl() { - return ssl; - } - - public void setSsl(boolean ssl) { - this.ssl = ssl; - } - - public String getTruststorePath() { - return truststorePath; - } - - public void setTruststorePath(String truststorePath) { - this.truststorePath = truststorePath; - } - - public String getTruststorePassword() { - return truststorePassword; - } - - public void setTruststorePassword(String truststorePassword) { - this.truststorePassword = truststorePassword; - } - - public Long getReconnectTimeout() { - return reconnectTimeout; - } - - public void setReconnectTimeout(Long reconnectTimeout) { - this.reconnectTimeout = reconnectTimeout; - } - - public List getCassandraHosts() { - return cassandraHosts; - } - - public void setCassandraHosts(List cassandraHosts) { - this.cassandraHosts = cassandraHosts; - } - - public List getKeySpaces() { - return keySpaces; - } - - public void setKeySpaces(List cassandraConfig) { - this.keySpaces = cassandraConfig; - } - - public static class KeyspaceConfig { - - String name; - String replicationStrategy; - List replicationInfo; - - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } - - public String getReplicationStrategy() { - return replicationStrategy; - } - - public void setReplicationStrategy(String replicationStrategy) { - this.replicationStrategy = replicationStrategy; - } - - public List getReplicationInfo() { - return replicationInfo; - } - - public void setReplicationInfo(List replicationInfo) { - this.replicationInfo = replicationInfo; - } - } - } - - public static class SwitchoverDetectorConfig { - - String gBeFqdn; - String gFeFqdn; - String beVip; - String feVip; - int beResolveAttempts; - int feResolveAttempts; - Boolean enabled; - long interval; - String changePriorityUser; - String changePriorityPassword; - String publishNetworkUrl; - String publishNetworkBody; - Map groups; - - public String getgBeFqdn() { - return gBeFqdn; - } - - public void setgBeFqdn(String gBeFqdn) { - this.gBeFqdn = gBeFqdn; - } - - public String getgFeFqdn() { - return gFeFqdn; - } - - public void setgFeFqdn(String gFeFqdn) { - this.gFeFqdn = gFeFqdn; - } - - public String getBeVip() { - return beVip; - } - - public void setBeVip(String beVip) { - this.beVip = beVip; - } - - public String getFeVip() { - return feVip; - } - - public void setFeVip(String feVip) { - this.feVip = feVip; - } - - public int getBeResolveAttempts() { - return beResolveAttempts; - } - - public void setBeResolveAttempts(int beResolveAttempts) { - this.beResolveAttempts = beResolveAttempts; - } - - public int getFeResolveAttempts() { - return feResolveAttempts; - } - - public void setFeResolveAttempts(int feResolveAttempts) { - this.feResolveAttempts = feResolveAttempts; - } - - public Boolean getEnabled() { - return enabled; - } - - public void setEnabled(Boolean enabled) { - this.enabled = enabled; - } - - public long getInterval() { - return interval; - } - - public void setInterval(long interval) { - this.interval = interval; - } - - public String getChangePriorityUser() { - return changePriorityUser; - } - - public void setChangePriorityUser(String changePriorityUser) { - this.changePriorityUser = changePriorityUser; - } - - public String getChangePriorityPassword() { - return changePriorityPassword; - } - - public void setChangePriorityPassword(String changePriorityPassword) { - this.changePriorityPassword = changePriorityPassword; - } - - public String getPublishNetworkUrl() { - return publishNetworkUrl; - } - - public void setPublishNetworkUrl(String publishNetworkUrl) { - this.publishNetworkUrl = publishNetworkUrl; - } - - public String getPublishNetworkBody() { - return publishNetworkBody; - } - - public void setPublishNetworkBody(String publishNetworkBody) { - this.publishNetworkBody = publishNetworkBody; - } - - public Map getGroups() { - return groups; - } - - public void setGroups(Map groups) { - this.groups = groups; - } - - public static class GroupInfo { - - String changePriorityUrl; - String changePriorityBody; - - public String getChangePriorityUrl() { - return changePriorityUrl; - } - - public void setChangePriorityUrl(String changePriorityUrl) { - this.changePriorityUrl = changePriorityUrl; - } - - public String getChangePriorityBody() { - return changePriorityBody; - } - - public void setChangePriorityBody(String changePriorityBody) { - this.changePriorityBody = changePriorityBody; - } - } - - } - - public static class BeMonitoringConfig { - - Boolean enabled; - Boolean isProxy; - Integer probeIntervalInSeconds; - - public Boolean getEnabled() { - return enabled; - } - - public void setEnabled(Boolean enabled) { - this.enabled = enabled; - } - - public Boolean getIsProxy() { - return isProxy; - } - - public void setIsProxy(Boolean isProxy) { - this.isProxy = isProxy; - } - - public Integer getProbeIntervalInSeconds() { - return probeIntervalInSeconds; - } - - public Integer getProbeIntervalInSeconds(int defaultVal) { - return probeIntervalInSeconds == null ? defaultVal : probeIntervalInSeconds; - } - - public void setProbeIntervalInSeconds(Integer probeIntervalInSeconds) { - this.probeIntervalInSeconds = probeIntervalInSeconds; - } - } - - public static class DeploymentArtifactTypeConfig { - - List acceptedTypes; - List validForResourceTypes; - - public List getValidForResourceTypes() { - return validForResourceTypes; - } - - public void setValidForResourceTypes(List validForResourceTypes) { - this.validForResourceTypes = validForResourceTypes; - } - - public List getAcceptedTypes() { - return acceptedTypes; - } - - public void setAcceptedTypes(List acceptedTypes) { - this.acceptedTypes = acceptedTypes; - } - } - - public static class OnboardingConfig { - - String protocol = "http"; - String host; - Integer port; - String downloadCsarUri; - - public String getProtocol() { - return protocol; - } - - public void setProtocol(String protocol) { - this.protocol = protocol; - } - - public String getHost() { - return host; - } - - public void setHost(String host) { - this.host = host; - } - - public Integer getPort() { - return port; - } - - public void setPort(Integer port) { - this.port = port; - } - - public String getDownloadCsarUri() { - return downloadCsarUri; - } - - public void setDownloadCsarUri(String downloadCsarUri) { - this.downloadCsarUri = downloadCsarUri; - } - - @Override - public String toString() { - return "OnboardingConfig [protocol=" + protocol + ", host=" + host + ", port=" + port + ", downloadCsarUri=" - + downloadCsarUri + "]"; - } - - } - - public static class EcompPortalConfig { - - private String defaultFunctionalMenu; - - public String getDefaultFunctionalMenu() { - return defaultFunctionalMenu; - } - - public void setDefaultFunctionalMenu(String defaultFunctionalMenu) { - this.defaultFunctionalMenu = defaultFunctionalMenu; - } - - @Override - public String toString() { - return "EcompPortalConfig [defaultFunctionalMenu=" + defaultFunctionalMenu + "]"; - } - - } - - public static class ApplicationL1CacheConfig { - - ApplicationL1CacheInfo datatypes; - - public ApplicationL1CacheInfo getDatatypes() { - return datatypes; - } - - public void setDatatypes(ApplicationL1CacheInfo datatypes) { - this.datatypes = datatypes; - } - - @Override - public String toString() { - return "ApplicationL1CacheConfig [datatypes=" + datatypes + "]"; - } - - } - - public static class ApplicationL2CacheConfig { - - boolean enabled; - ApplicationL1CacheCatalogInfo catalogL1Cache; - - QueueInfo queue; - - public boolean isEnabled() { - return enabled; - } - - public void setEnabled(boolean enabled) { - this.enabled = enabled; - } - - public ApplicationL1CacheCatalogInfo getCatalogL1Cache() { - return catalogL1Cache; - } - - public void setCatalogL1Cache(ApplicationL1CacheCatalogInfo catalogL1Cache) { - this.catalogL1Cache = catalogL1Cache; - } - - public QueueInfo getQueue() { - return queue; - } - - public void setQueue(QueueInfo queue) { - this.queue = queue; - } - - @Override - public String toString() { - return "ApplicationL2CacheConfig [enabled=" + enabled + ", catalogL1Cache=" + catalogL1Cache + "]"; - } - - } - - public static class ToscaValidatorsConfig { - - private Integer stringMaxLength; - - public Integer getStringMaxLength() { - return stringMaxLength; - } - - public void setStringMaxLength(Integer stringMaxLength) { - this.stringMaxLength = stringMaxLength; - } - - @Override - public String toString() { - return "ToscaValidatorsConfig [stringMaxLength=" + stringMaxLength + "]"; - } - - } - - public static class ApplicationL1CacheInfo { - - Boolean enabled; - Integer firstRunDelay; - Integer pollIntervalInSec; - - public Boolean getEnabled() { - return enabled; - } - - public void setEnabled(Boolean enabled) { - this.enabled = enabled; - } - - public Integer getFirstRunDelay() { - return firstRunDelay; - } - - public void setFirstRunDelay(Integer firstRunDelay) { - this.firstRunDelay = firstRunDelay; - } - - public Integer getPollIntervalInSec() { - return pollIntervalInSec; - } - - public void setPollIntervalInSec(Integer pollIntervalInSec) { - this.pollIntervalInSec = pollIntervalInSec; - } - - @Override - public String toString() { - return "ApplicationL1CacheInfo [enabled=" + enabled + ", firstRunDelay=" + firstRunDelay - + ", pollIntervalInSec=" + pollIntervalInSec + "]"; - } - } - - public static class ApplicationL1CacheCatalogInfo { - - Boolean enabled; - Integer resourcesSizeInCache; - Integer servicesSizeInCache; - Integer productsSizeInCache; - - public Boolean getEnabled() { - return enabled; - } - - public void setEnabled(Boolean enabled) { - this.enabled = enabled; - } - - public Integer getResourcesSizeInCache() { - return resourcesSizeInCache; - } - - public void setResourcesSizeInCache(Integer resourcesSizeInCache) { - this.resourcesSizeInCache = resourcesSizeInCache; - } - - public Integer getServicesSizeInCache() { - return servicesSizeInCache; - } - - public void setServicesSizeInCache(Integer servicesSizeInCache) { - this.servicesSizeInCache = servicesSizeInCache; - } - - public Integer getProductsSizeInCache() { - return productsSizeInCache; - } - - public void setProductsSizeInCache(Integer productsSizeInCache) { - this.productsSizeInCache = productsSizeInCache; - } - - @Override - public String toString() { - return "ApplicationL1CacheCatalogInfo [enabled=" + enabled + ", resourcesSizeInCache=" - + resourcesSizeInCache + ", servicesSizeInCache=" + servicesSizeInCache + ", productsSizeInCache=" - + productsSizeInCache + "]"; - } - - } - - public static class QueueInfo { - Integer numberOfCacheWorkers; - Integer waitOnShutDownInMinutes; - Integer syncIntervalInSecondes; - - public Integer getWaitOnShutDownInMinutes() { - return waitOnShutDownInMinutes; - } - - public void setWaitOnShutDownInMinutes(Integer waitOnShutDownInMinutes) { - this.waitOnShutDownInMinutes = waitOnShutDownInMinutes; - } - - public Integer getSyncIntervalInSecondes() { - return syncIntervalInSecondes; - } - - public void setSyncIntervalInSecondes(Integer syncIntervalInSecondes) { - this.syncIntervalInSecondes = syncIntervalInSecondes; - } - - public Integer getNumberOfCacheWorkers() { - return numberOfCacheWorkers; - } - - public void setNumberOfCacheWorkers(Integer numberOfCacheWorkers) { - this.numberOfCacheWorkers = numberOfCacheWorkers; - } - - @Override - public String toString() { - return "QueueInfo[" + "waitOnShutDownInMinutes=" + waitOnShutDownInMinutes + ", syncIntervalInSecondes=" - + syncIntervalInSecondes + ", numberOfCacheWorkers=" + this.numberOfCacheWorkers + ']'; - } - } - - public CleanComponentsConfiguration getCleanComponentsConfiguration() { - return cleanComponentsConfiguration; - } - - public void setCleanComponentsConfiguration(CleanComponentsConfiguration cleanComponentsConfiguration) { - this.cleanComponentsConfiguration = cleanComponentsConfiguration; - } - - @Override - public String toString() { - return new StringBuilder().append(format("backend host: %s\n", beFqdn)) - .append(format("backend http port: %s\n", beHttpPort)) - .append(format("backend ssl port: %s\n", beSslPort)).append(format("backend context: %s\n", beContext)) - .append(format("backend protocol: %s\n", beProtocol)).append(format("Version: %s\n", version)) - .append(format("Released: %s\n", released)).append(format("Supported protocols: %s\n", protocols)) - .append(format("Users: %s\n", users)).append(format("Neo4j: %s\n", neo4j)) - .append(format("ElasticSearch: %s\n", elasticSearch)) - .append(format("Titan Cfg File: %s\n", titanCfgFile)) - .append(format("Titan In memory: %s\n", titanInMemoryGraph)) - .append(format("Titan lock timeout: %s\n", titanLockTimeout)) - .append(format("Titan reconnect interval seconds: %s\n", titanReconnectIntervalInSeconds)) - .append(format("excludeResourceCategory: %s\n", excludeResourceCategory)) - .append(format("informationalResourceArtifacts: %s\n", informationalResourceArtifacts)) - .append(format("deploymentResourceArtifacts: %s\n", deploymentResourceArtifacts)) - .append(format("informationalServiceArtifacts: %s\n", informationalServiceArtifacts)) - .append(format("Supported artifacts types: %s\n", artifactTypes)) - .append(format("Supported license types: %s\n", licenseTypes)) - .append(format("Additional information Maximum number of preoperties: %s\n", - additionalInformationMaxNumberOfKeys)) - .append(format("Default Heat Artifact Timeout in Minutes: %s\n", defaultHeatArtifactTimeoutMinutes)) - .append(format("URLs For HTTP Requests that will not be automatically logged : %s\n", unLoggedUrls)) - .append(format("Service Api Artifacts: %s\n", serviceApiArtifacts)) - .append(format("heat env artifact header: %s\n", heatEnvArtifactHeader)) - .append(format("heat env artifact footer: %s\n", heatEnvArtifactFooter)) - .append(format("onboarding: %s\n", onboarding)).toString(); - } - - public List getUnLoggedUrls() { - return unLoggedUrls; - } - - public void setUnLoggedUrls(List unLoggedUrls) { - this.unLoggedUrls = unLoggedUrls; - } - - public Map getDeploymentResourceArtifacts() { - return deploymentResourceArtifacts; - } - - public void setDeploymentResourceArtifacts(Map deploymentResourceArtifacts) { - this.deploymentResourceArtifacts = deploymentResourceArtifacts; - } - - public String getHeatEnvArtifactHeader() { - return heatEnvArtifactHeader; - } - - public void setHeatEnvArtifactHeader(String heatEnvArtifactHeader) { - this.heatEnvArtifactHeader = heatEnvArtifactHeader; - } - - public String getHeatEnvArtifactFooter() { - return heatEnvArtifactFooter; - } - - public void setHeatEnvArtifactFooter(String heatEnvArtifactFooter) { - this.heatEnvArtifactFooter = heatEnvArtifactFooter; - } - - public Map getDeploymentResourceInstanceArtifacts() { - return deploymentResourceInstanceArtifacts; - } - - public void setDeploymentResourceInstanceArtifacts(Map deploymentResourceInstanceArtifacts) { - this.deploymentResourceInstanceArtifacts = deploymentResourceInstanceArtifacts; - } - - public String getArtifactsIndex() { - return artifactsIndex; - } - - public void setArtifactsIndex(String artifactsIndex) { - this.artifactsIndex = artifactsIndex; - } - - public Map getResourceInformationalDeployedArtifacts() { - return resourceInformationalDeployedArtifacts; - } - - public void setResourceInformationalDeployedArtifacts( - Map resourceInformationalDeployedArtifacts) { - this.resourceInformationalDeployedArtifacts = resourceInformationalDeployedArtifacts; - } - - public List getResourceTypes() { - return resourceTypes; - } - - public void setResourceTypes(List resourceTypes) { - this.resourceTypes = resourceTypes; - } - - public String getToscaFilesDir() { - return toscaFilesDir; - } - - public void setToscaFilesDir(String toscaFilesDir) { - this.toscaFilesDir = toscaFilesDir; - } - - public String getHeatTranslatorPath() { - return heatTranslatorPath; - } - - public void setHeatTranslatorPath(String heatTranslatorPath) { - this.heatTranslatorPath = heatTranslatorPath; - } - - public Map> getRequirementsToFulfillBeforeCert() { - return requirementsToFulfillBeforeCert; - } - - public void setRequirementsToFulfillBeforeCert(Map> requirementsToFulfillBeforeCert) { - this.requirementsToFulfillBeforeCert = requirementsToFulfillBeforeCert; - } - - public Map> getCapabilitiesToConsumeBeforeCert() { - return capabilitiesToConsumeBeforeCert; - } - - public void setCapabilitiesToConsumeBeforeCert(Map> capabilitiesToConsumeBeforeCert) { - this.capabilitiesToConsumeBeforeCert = capabilitiesToConsumeBeforeCert; - } - - public OnboardingConfig getOnboarding() { - return onboarding; - } - - public void setOnboarding(OnboardingConfig onboarding) { - this.onboarding = onboarding; - } - - public EcompPortalConfig getEcompPortal() { - return ecompPortal; - } - - public void setEcompPortal(EcompPortalConfig ecompPortal) { - this.ecompPortal = ecompPortal; - } - - public ToscaValidatorsConfig getToscaValidators() { - return toscaValidators; - } - - public void setToscaValidators(ToscaValidatorsConfig toscaValidators) { - this.toscaValidators = toscaValidators; - } - - public boolean isDisableAudit() { - return disableAudit; - } - - public void setDisableAudit(boolean enableAudit) { - this.disableAudit = enableAudit; - } + private List identificationHeaderFields; + /** + * Requests from these Urls will not be logged by org.openecomp.sdc.be.filters.BeServletFilter.
+ **/ + private List unLoggedUrls; + /** + * backend host + */ + private String beFqdn; + /** + * backend http port + */ + private Integer beHttpPort; + /** + * backend http secured port + */ + private Integer beSslPort; + /** + * be http context + */ + private String beContext; + /** + * backend protocol. http | https + */ + private String beProtocol = "http"; + private String tlsCert; + private String tlsKey; + private String caCert; + private Date released; + private String version = "1111"; + private String toscaConformanceLevel = "3.0"; + private String minToscaConformanceLevel = "3.0"; + private List protocols; + private Map users; + private Map neo4j; + private String janusGraphCfgFile; + private String janusGraphMigrationKeySpaceCfgFile; + private Boolean janusGraphInMemoryGraph; + private int startMigrationFrom; + private Long janusGraphLockTimeout; + private Long janusGraphReconnectIntervalInSeconds; + private List healthStatusExclude; + private Long janusGraphHealthCheckReadTimeout; + private Long uebHealthCheckReconnectIntervalInSeconds; + private Long uebHealthCheckReadTimeout; + private List>> defaultImports; + private List globalCsarImports; + private List resourceTypes; + private List excludeResourceCategory; + private List excludeResourceType; + private Map> excludedPolicyTypesMapping; + private Map> excludedGroupTypesMapping; + private Map deploymentResourceArtifacts; + private Map deploymentResourceInstanceArtifacts; + private Map toscaArtifacts; + private Map informationalResourceArtifacts; + private Map informationalServiceArtifacts; + private Map serviceApiArtifacts; + private List excludeServiceCategory; + private List licenseTypes; + private List definedResourceNamespace; + private List directives; + private List defaultCustomToscaFunctions; + private Integer additionalInformationMaxNumberOfKeys; + private HeatDeploymentArtifactTimeout heatArtifactDeploymentTimeout; + private BeMonitoringConfig systemMonitoring; + private CleanComponentsConfiguration cleanComponentsConfiguration; + private String artifactsIndex; + private String heatEnvArtifactHeader; + private String heatEnvArtifactFooter; + private String toscaFilesDir; + private String heatTranslatorPath; + private OnboardingConfig onboarding; + private BasicAuthConfig basicAuth; + private CassandrConfig cassandraConfig; + private SwitchoverDetectorConfig switchoverDetector; + private ApplicationL1CacheConfig applicationL1Cache; + private ApplicationL2CacheConfig applicationL2Cache; + private ToscaValidatorsConfig toscaValidators; + private boolean disableAudit; + private Map vfModuleProperties; + private Map genericAssetNodeTypes; + private Map serviceBaseNodeTypes; + private Map> resourceNodeTypes; + private String appVersion; + private String artifactGeneratorConfig; + private String autoHealingOwner; + private boolean enableAutoHealing; + private Map> resourcesForUpgrade; + private DmaapConsumerConfiguration dmaapConsumerConfiguration; + private DmaapProducerConfiguration dmaapProducerConfiguration; + private boolean skipUpgradeFailedVfs; + private boolean skipUpgradeVSPs; + private DmeConfiguration dmeConfiguration; + private boolean supportAllottedResourcesAndProxy; + private Integer deleteLockTimeoutInSeconds; + private Integer maxDeleteComponents; + private String workloadContext; + private EnvironmentContext environmentContext; + private List gabConfig; + private EcompPortalConfig ecompPortal; + private List artifacts; + private Map>> componentAllowedInstanceTypes; + private ExternalCsarStore externalCsarStore; + private CsarFormat csarFormat; + private String componentInstanceCounterDelimiter; + private String dataValidatorFilterExcludedUrls; // Comma separated list of excluded URLs by the DataValidatorFilter + private String permittedAncestors; // Space separated list of permitted ancestors + + @SuppressWarnings("unchecked") + private Map safeGetCapsInsensitiveMap(Map map) { + return map == null ? emptyMap() : new CaseInsensitiveMap(map); + } + + public Long getJanusGraphHealthCheckReadTimeout(long defaultVal) { + return janusGraphHealthCheckReadTimeout == null ? defaultVal : janusGraphHealthCheckReadTimeout; + } + + public Long getJanusGraphReconnectIntervalInSeconds(long defaultVal) { + return janusGraphReconnectIntervalInSeconds == null ? defaultVal : janusGraphReconnectIntervalInSeconds; + } + + public Map> getExcludedPolicyTypesMapping() { + return safeGetCapsInsensitiveMap(excludedPolicyTypesMapping); + } + + public Map> getExcludedGroupTypesMapping() { + return safeGetCapsInsensitiveMap(excludedGroupTypesMapping); + } + + public List>> getDefaultImports() { + return Collections.unmodifiableList(defaultImports); + } + + @Override + public String toString() { + return new StringBuilder().append(format("backend host: %s%n", beFqdn)).append(format("backend http port: %s%n", beHttpPort)) + .append(format("backend ssl port: %s%n", beSslPort)).append(format("backend context: %s%n", beContext)) + .append(format("backend protocol: %s%n", beProtocol)).append(format("Version: %s%n", version)).append(format("Released: %s%n", released)) + .append(format("Supported protocols: %s%n", protocols)).append(format("Users: %s%n", users)).append(format("Neo4j: %s%n", neo4j)) + .append(format("JanusGraph Cfg File: %s%n", janusGraphCfgFile)).append(format("JanusGraph In memory: %s%n", janusGraphInMemoryGraph)) + .append(format("JanusGraph lock timeout: %s%n", janusGraphLockTimeout)) + .append(format("JanusGraph reconnect interval seconds: %s%n", janusGraphReconnectIntervalInSeconds)) + .append(format("excludeResourceCategory: %s%n", excludeResourceCategory)) + .append(format("informationalResourceArtifacts: %s%n", informationalResourceArtifacts)) + .append(format("deploymentResourceArtifacts: %s%n", deploymentResourceArtifacts)) + .append(format("informationalServiceArtifacts: %s%n", informationalServiceArtifacts)) + .append(format("Supported artifacts types: %s%n", artifacts)).append(format("Supported license types: %s%n", licenseTypes)) + .append(format("Additional information Maximum number of preoperties: %s%n", additionalInformationMaxNumberOfKeys)) + .append(format("Heat Artifact Timeout in Minutes: %s%n", heatArtifactDeploymentTimeout)) + .append(format("URLs For HTTP Requests that will not be automatically logged : %s%n", unLoggedUrls)) + .append(format("Service Api Artifacts: %s%n", serviceApiArtifacts)) + .append(format("heat env artifact header: %s%n", heatEnvArtifactHeader)) + .append(format("heat env artifact footer: %s%n", heatEnvArtifactFooter)).append(format("onboarding: %s%n", onboarding)).toString(); + } + + public List getGlobalCsarImports() { + if (CollectionUtils.isEmpty(globalCsarImports)) { + return Collections.emptyList(); + } + return globalCsarImports; + } + + @Getter + @Setter + @NoArgsConstructor + public static class CassandrConfig { + + private static final Integer CASSANDRA_DEFAULT_PORT = 9042; + private List cassandraHosts; + private Integer cassandraPort; + private String localDataCenter; + private Long reconnectTimeout; + private Integer socketReadTimeout; + private Integer socketConnectTimeout; + private List keySpaces; + private boolean authenticate; + private String username; + private String password; + private boolean ssl; + private String keystorePath; + private String keystorePassword; + private String truststorePath; + private String truststorePassword; + private int maxWaitSeconds = 120; + + public Integer getCassandraPort() { + return cassandraPort != null ? cassandraPort : CASSANDRA_DEFAULT_PORT; + } + + @Getter + @Setter + @NoArgsConstructor + public static class KeyspaceConfig { + + private String name; + private String replicationStrategy; + private List replicationInfo; + } + } + + @Getter + @Setter + @NoArgsConstructor + public static class SwitchoverDetectorConfig { + + private String gBeFqdn; + private String gFeFqdn; + private String beVip; + private String feVip; + private int beResolveAttempts; + private int feResolveAttempts; + private Boolean enabled; + private long interval; + private String changePriorityUser; + private String changePriorityPassword; + private String publishNetworkUrl; + private String publishNetworkBody; + private Map groups; + + public String getgBeFqdn() { + return gBeFqdn; + } + + public void setgBeFqdn(String gBeFqdn) { + this.gBeFqdn = gBeFqdn; + } + + public String getgFeFqdn() { + return gFeFqdn; + } + + public void setgFeFqdn(String gFeFqdn) { + this.gFeFqdn = gFeFqdn; + } + + @Getter + @Setter + @NoArgsConstructor + public static class GroupInfo { + + String changePriorityUrl; + String changePriorityBody; + } + } + + @Getter + @Setter + @NoArgsConstructor + @ToString + public static class HeatDeploymentArtifactTimeout { + + private Integer defaultMinutes; + private Integer minMinutes; + private Integer maxMinutes; + } + + @Getter + @Setter + @NoArgsConstructor + public static class BeMonitoringConfig { + + private Boolean enabled; + private Boolean isProxy; + private Integer probeIntervalInSeconds; + + public Integer getProbeIntervalInSeconds(int defaultVal) { + return probeIntervalInSeconds == null ? defaultVal : probeIntervalInSeconds; + } + } + + @Getter + @Setter + @NoArgsConstructor + public static class ArtifactTypeConfig { + + private List acceptedTypes; + private List validForResourceTypes; + } + + @Getter + @Setter + @NoArgsConstructor + @ToString + public static class OnboardingConfig { + + private String protocol = "http"; + private String host; + private Integer port; + private String getLatestVspPackageUri; + private String getVspPackageUri; + private String getVspUri; + private String getLatestVspUri; + @ToString.Exclude + private String healthCheckUri; + } + + @Getter + @Setter + @NoArgsConstructor + public static class BasicAuthConfig { + + private boolean enabled; + private String userName; + private String userPass; + private String excludedUrls; + } + + @Getter + @Setter + @NoArgsConstructor + @ToString(onlyExplicitlyIncluded = true) + public static class EcompPortalConfig { + + private String protocol = "https"; + private String host; + private Integer port; + private String healthCheckUri; + @ToString.Include + private String defaultFunctionalMenu; + private Integer pollingInterval; + private Integer timeoutMs; + } + + @Getter + @Setter + @NoArgsConstructor + @ToString + public static class ApplicationL1CacheConfig { + + private ApplicationL1CacheInfo datatypes; + } + + @Getter + @Setter + @NoArgsConstructor + @ToString + public static class ApplicationL2CacheConfig { + + private boolean enabled; + private ApplicationL1CacheCatalogInfo catalogL1Cache; + @ToString.Exclude + private QueueInfo queue; + } + + @Getter + @Setter + @NoArgsConstructor + @ToString + public static class ToscaValidatorsConfig { + + private Integer stringMaxLength; + } + + @Getter + @Setter + @NoArgsConstructor + @ToString + public static class ApplicationL1CacheInfo { + + private Boolean enabled; + private Integer firstRunDelay; + private Integer pollIntervalInSec; + } + + @Getter + @Setter + @NoArgsConstructor + @ToString + public static class ApplicationL1CacheCatalogInfo { + + private Boolean enabled; + private Integer resourcesSizeInCache; + private Integer servicesSizeInCache; + private Integer productsSizeInCache; + } + + @Getter + @Setter + @NoArgsConstructor + @ToString + public static class QueueInfo { + + private Integer waitOnShutDownInMinutes; + private Integer syncIntervalInSecondes; + private Integer numberOfCacheWorkers; + } + + @Getter + @Setter + @NoArgsConstructor + public static class EnvironmentContext { + + private String defaultValue; + private List validValues; + } + + @Getter + @Setter + @NoArgsConstructor + public static class VfModuleProperty { + + private String forBaseModule; + private String forNonBaseModule; + } + + @Getter + @Setter + @NoArgsConstructor + public static class PathsAndNamesDefinition { + + private String friendlyName; + private String path; + private Boolean searchable; + } + + @Getter + @Setter + @NoArgsConstructor + public static class GabConfig { + + private String artifactType; + private List pathsAndNamesDefinitions; + } + + @Getter + @Setter + @NoArgsConstructor + public static class ExternalCsarStore { + + private String storageType; + private Endpoint endpoint; + private Credentials credentials; + private String tempPath; + private int uploadPartSize; + + @Getter + @Setter + @NoArgsConstructor + public static class Endpoint { + + private String host; + private int port; + private boolean secure; + } + + @Getter + @Setter + @NoArgsConstructor + public static class Credentials { + + private String accessKey; + private String secretKey; + } + } + + @Getter + @Setter + @NoArgsConstructor + public static class CsarFormat { + + private String defaultFormat; + } + + @Getter + @Setter + @NoArgsConstructor + public static class CustomToscaFunction { + + private String name; + private String type; + } }