From a8a96339680fa1c4df5577285442e902b5637631 Mon Sep 17 00:00:00 2001 From: vasraz Date: Wed, 19 Aug 2020 18:01:52 +0100 Subject: Fix Vulnerabilities reported by SONAR Change-Id: I8f4e173a4ea5111db55eebaf15be86f1583082ad Signed-off-by: Vasyl Razinkov Issue-ID: SDC-3248 --- .../sdc/be/components/impl/GroupBusinessLogic.java | 3 +- .../be/components/impl/InputsBusinessLogic.java | 2 +- .../be/components/impl/ResourceBusinessLogic.java | 16 +- .../be/dao/cassandra/schema/SdcSchemaBuilder.java | 16 +- .../sdc/be/dao/neo4j/GraphEdgeLabels.java | 18 +- .../dao/neo4j/GraphEdgePropertiesDictionary.java | 29 +- .../be/dao/neo4j/GraphPropertiesDictionary.java | 31 +- .../sdc/be/resources/data/ComponentCacheData.java | 10 +- .../sdc/be/resources/data/DAOArtifactData.java | 2 +- .../operations/NodeTemplateOperation.java | 2 +- common-app-api/pom.xml | 5 + .../sdc/common/api/ArtifactGroupTypeEnum.java | 22 +- .../openecomp/sdc/common/api/YamlSuffixEnum.java | 21 +- .../sdc/common/config/EcompClassification.java | 19 +- .../sdc/common/config/EcompErrorCode.java | 158 ++- .../sdc/common/config/EcompErrorEnum.java | 59 +- .../sdc/common/config/EcompErrorLogUtil.java | 4 +- .../config/generation/GenerateEcompErrorsCsv.java | 2 +- .../common/datastructure/AuditingFieldsKey.java | 24 +- .../datastructure/MonitoringFieldsKeysEnum.java | 24 +- .../openecomp/sdc/common/util/ValidationUtils.java | 181 ++- .../sdc/common/api/ArtifactGroupTypeEnumTest.java | 23 - .../sdc/common/api/YamlSuffixEnumTest.java | 23 - .../datastructure/AuditingFieldsKeyTest.java | 64 - .../MonitoringFieldsKeysEnumTest.java | 64 - .../sdc/be/datatypes/enums/GraphPropertyEnum.java | 58 +- .../be/datatypes/enums/JsonPresentationFields.java | 36 +- .../be/datatypes/enums/GraphPropertyEnumTest.java | 80 -- .../enums/JsonPresentationFieldsTest.java | 50 - onboarding/pom.xml | 2 +- openecomp-be/lib/openecomp-common-lib/pom.xml | 1 + .../heat/datatypes/model/HeatPseudoParameters.java | 16 +- .../core/tools/exportinfo/ExportSerializer.java | 10 +- .../core/tools/importinfo/ImportSingleTable.java | 8 +- .../org/openecomp/core/tools/model/TableData.java | 6 +- pom.xml | 1379 ++++++++++---------- 36 files changed, 979 insertions(+), 1489 deletions(-) delete mode 100644 common-app-api/src/test/java/org/openecomp/sdc/common/datastructure/AuditingFieldsKeyTest.java delete mode 100644 common-app-api/src/test/java/org/openecomp/sdc/common/datastructure/MonitoringFieldsKeysEnumTest.java diff --git a/catalog-be/src/main/java/org/openecomp/sdc/be/components/impl/GroupBusinessLogic.java b/catalog-be/src/main/java/org/openecomp/sdc/be/components/impl/GroupBusinessLogic.java index e0bf727408..0c776a16a4 100644 --- a/catalog-be/src/main/java/org/openecomp/sdc/be/components/impl/GroupBusinessLogic.java +++ b/catalog-be/src/main/java/org/openecomp/sdc/be/components/impl/GroupBusinessLogic.java @@ -23,7 +23,6 @@ package org.openecomp.sdc.be.components.impl; import fj.data.Either; -import java.util.Vector; import org.apache.commons.collections.CollectionUtils; import org.apache.commons.collections.MapUtils; import org.apache.commons.io.FilenameUtils; @@ -127,7 +126,7 @@ public class GroupBusinessLogic extends BaseBusinessLogic { private static final Logger log = Logger.getLogger(GroupBusinessLogic.class); - public LoggerSupportability loggerSupportability= LoggerSupportability.getLogger(GroupBusinessLogic.class.getName()); + private static final LoggerSupportability loggerSupportability = LoggerSupportability.getLogger(GroupBusinessLogic.class.getName()); private final AccessValidations accessValidations; private final PolicyTargetsUpdateHandler policyTargetsUpdateHandler; diff --git a/catalog-be/src/main/java/org/openecomp/sdc/be/components/impl/InputsBusinessLogic.java b/catalog-be/src/main/java/org/openecomp/sdc/be/components/impl/InputsBusinessLogic.java index 6b5878ee4b..d6459f4ad9 100644 --- a/catalog-be/src/main/java/org/openecomp/sdc/be/components/impl/InputsBusinessLogic.java +++ b/catalog-be/src/main/java/org/openecomp/sdc/be/components/impl/InputsBusinessLogic.java @@ -95,7 +95,7 @@ public class InputsBusinessLogic extends BaseBusinessLogic { private static final String GOING_TO_EXECUTE_COMMIT_ON_CREATE_GROUP = "Going to execute commit on create group."; private static final String GOING_TO_EXECUTE_ROLLBACK_ON_UPDATE_INPUT = "Going to execute rollback on update input."; private static final String GOING_TO_EXECUTE_COMMIT_ON_UPDATE_INPUT = "Going to execute commit on update input."; - public LoggerSupportability loggerSupportability=LoggerSupportability.getLogger(InputsBusinessLogic.class.getName()); + private static final LoggerSupportability loggerSupportability = LoggerSupportability.getLogger(InputsBusinessLogic.class.getName()); private final PropertyDeclarationOrchestrator propertyDeclarationOrchestrator; private final ComponentInstanceBusinessLogic componentInstanceBusinessLogic; diff --git a/catalog-be/src/main/java/org/openecomp/sdc/be/components/impl/ResourceBusinessLogic.java b/catalog-be/src/main/java/org/openecomp/sdc/be/components/impl/ResourceBusinessLogic.java index 8164bad477..ffac13bdb5 100644 --- a/catalog-be/src/main/java/org/openecomp/sdc/be/components/impl/ResourceBusinessLogic.java +++ b/catalog-be/src/main/java/org/openecomp/sdc/be/components/impl/ResourceBusinessLogic.java @@ -206,17 +206,17 @@ public class ResourceBusinessLogic extends ComponentBusinessLogic { private static final String CREATE_RESOURCE_VALIDATE_CAPABILITY_TYPES = "Create Resource - validateCapabilityTypesCreate"; private static final String COMPONENT_INSTANCE_WITH_NAME = "component instance with name "; private static final String COMPONENT_INSTANCE_WITH_NAME_IN_RESOURCE = "component instance with name {} in resource {} "; - public LoggerSupportability loggerSupportability=LoggerSupportability.getLogger(ResourceBusinessLogic.class.getName()); + private static final LoggerSupportability loggerSupportability = LoggerSupportability.getLogger(ResourceBusinessLogic.class.getName()); - private IInterfaceLifecycleOperation interfaceTypeOperation; - private LifecycleBusinessLogic lifecycleBusinessLogic; + private IInterfaceLifecycleOperation interfaceTypeOperation; + private LifecycleBusinessLogic lifecycleBusinessLogic; - private final ComponentInstanceBusinessLogic componentInstanceBusinessLogic; - private final ResourceImportManager resourceImportManager; - private final InputsBusinessLogic inputsBusinessLogic; - private final CompositionBusinessLogic compositionBusinessLogic; - private final ResourceDataMergeBusinessLogic resourceDataMergeBusinessLogic; + private final ComponentInstanceBusinessLogic componentInstanceBusinessLogic; + private final ResourceImportManager resourceImportManager; + private final InputsBusinessLogic inputsBusinessLogic; + private final CompositionBusinessLogic compositionBusinessLogic; + private final ResourceDataMergeBusinessLogic resourceDataMergeBusinessLogic; private final CsarArtifactsAndGroupsBusinessLogic csarArtifactsAndGroupsBusinessLogic; private final MergeInstanceUtils mergeInstanceUtils; private final UiComponentDataConverter uiComponentDataConverter; diff --git a/catalog-dao/src/main/java/org/openecomp/sdc/be/dao/cassandra/schema/SdcSchemaBuilder.java b/catalog-dao/src/main/java/org/openecomp/sdc/be/dao/cassandra/schema/SdcSchemaBuilder.java index c5e578ced2..03c08baf92 100644 --- a/catalog-dao/src/main/java/org/openecomp/sdc/be/dao/cassandra/schema/SdcSchemaBuilder.java +++ b/catalog-dao/src/main/java/org/openecomp/sdc/be/dao/cassandra/schema/SdcSchemaBuilder.java @@ -27,6 +27,8 @@ import com.datastax.driver.core.schemabuilder.Alter; import com.datastax.driver.core.schemabuilder.Create; import com.datastax.driver.core.schemabuilder.SchemaBuilder; import com.datastax.driver.core.schemabuilder.SchemaStatement; +import lombok.AllArgsConstructor; +import lombok.Getter; import org.apache.commons.lang3.tuple.ImmutablePair; import org.openecomp.sdc.be.config.Configuration; import org.openecomp.sdc.be.dao.cassandra.schema.tables.OldExternalApiEventTableDesc; @@ -384,20 +386,12 @@ public class SdcSchemaBuilder { return query; } - - + @AllArgsConstructor public enum ReplicationStrategy { NETWORK_TOPOLOGY_STRATEGY("NetworkTopologyStrategy"), SIMPLE_STRATEGY("SimpleStrategy"); - public String strategyName; - - private ReplicationStrategy(String strategyName) { - this.strategyName = strategyName; - } - - public String getStrategyName() { - return strategyName; - } + @Getter + private final String strategyName; } } diff --git a/catalog-dao/src/main/java/org/openecomp/sdc/be/dao/neo4j/GraphEdgeLabels.java b/catalog-dao/src/main/java/org/openecomp/sdc/be/dao/neo4j/GraphEdgeLabels.java index 5b386f18bb..fc30a7e8f3 100644 --- a/catalog-dao/src/main/java/org/openecomp/sdc/be/dao/neo4j/GraphEdgeLabels.java +++ b/catalog-dao/src/main/java/org/openecomp/sdc/be/dao/neo4j/GraphEdgeLabels.java @@ -22,7 +22,10 @@ package org.openecomp.sdc.be.dao.neo4j; import java.util.ArrayList; import java.util.List; +import lombok.AllArgsConstructor; +import lombok.Getter; +@AllArgsConstructor public enum GraphEdgeLabels { // field name @@ -41,19 +44,8 @@ public enum GraphEdgeLabels { GROUP("GROUP"), GROUP_ARTIFACT_REF("GROUP_ARTIFACT_REF"), GROUP_MEMBER("GROUP_MEMBER"), INPUT("EDGE_INPUT"), GET_INPUT("GET_INPUT"), GROUP_INST("GROUP_INST"), GROUP_TYPE_CAPABILITY_TYPE("GROUP_TYPE_CAPABILITY_TYPE"), GROUP_TYPE_CAPABILITY("GROUP_TYPE_CAPABILITY"); - private String property; - - GraphEdgeLabels(String property) { - this.property = property; - } - - public String getProperty() { - return property; - } - - public void setProperty(String property) { - this.property = property; - } + @Getter + private final String property; public static List getAllProperties() { diff --git a/catalog-dao/src/main/java/org/openecomp/sdc/be/dao/neo4j/GraphEdgePropertiesDictionary.java b/catalog-dao/src/main/java/org/openecomp/sdc/be/dao/neo4j/GraphEdgePropertiesDictionary.java index 58bd098d77..b8209e8d03 100644 --- a/catalog-dao/src/main/java/org/openecomp/sdc/be/dao/neo4j/GraphEdgePropertiesDictionary.java +++ b/catalog-dao/src/main/java/org/openecomp/sdc/be/dao/neo4j/GraphEdgePropertiesDictionary.java @@ -22,7 +22,11 @@ package org.openecomp.sdc.be.dao.neo4j; import java.util.ArrayList; import java.util.List; +import lombok.AllArgsConstructor; +import lombok.Getter; +@AllArgsConstructor +@Getter public enum GraphEdgePropertiesDictionary { // field name class type @@ -36,29 +40,8 @@ public enum GraphEdgePropertiesDictionary { LEFT_OCCURRENCES("leftOccurrences", String.class), GET_INPUT_INDEX("get_input_index", String.class); - private String property; - private Class clazz; - - GraphEdgePropertiesDictionary(String property, Class clazz) { - this.property = property; - this.clazz = clazz; - } - - public String getProperty() { - return property; - } - - public void setProperty(String property) { - this.property = property; - } - - public Class getClazz() { - return clazz; - } - - public void setClazz(Class clazz) { - this.clazz = clazz; - } + private final String property; + private final Class clazz; public static List getAllProperties() { diff --git a/catalog-dao/src/main/java/org/openecomp/sdc/be/dao/neo4j/GraphPropertiesDictionary.java b/catalog-dao/src/main/java/org/openecomp/sdc/be/dao/neo4j/GraphPropertiesDictionary.java index e27839ecb9..da6e5d5d44 100644 --- a/catalog-dao/src/main/java/org/openecomp/sdc/be/dao/neo4j/GraphPropertiesDictionary.java +++ b/catalog-dao/src/main/java/org/openecomp/sdc/be/dao/neo4j/GraphPropertiesDictionary.java @@ -20,6 +20,11 @@ package org.openecomp.sdc.be.dao.neo4j; +import lombok.AllArgsConstructor; +import lombok.Getter; + +@AllArgsConstructor +@Getter public enum GraphPropertiesDictionary { // field name class type unique indexed // stored in graph index @@ -151,33 +156,9 @@ public enum GraphPropertiesDictionary { IS_VSP_ARCHIVED ("isVspArchived", Boolean.class, false, true), ARCHIVE_TIME ("archiveTime", Long.class, false, true); - private final String property; - private final Class clazz; + private final Class clazz; private final boolean unique; private final boolean indexed; - GraphPropertiesDictionary(String property,Class clazz, boolean unique,boolean indexed) { - this.property = property; - this.clazz = clazz; - this.unique = unique; - this.indexed = indexed; - } - - - public String getProperty() { - return property; - } - - public Class getClazz() { - return clazz; - } - - public boolean isUnique() { - return unique; - } - - public boolean isIndexed() { - return indexed; - } } diff --git a/catalog-dao/src/main/java/org/openecomp/sdc/be/resources/data/ComponentCacheData.java b/catalog-dao/src/main/java/org/openecomp/sdc/be/resources/data/ComponentCacheData.java index bf17383c07..7c960ae06e 100644 --- a/catalog-dao/src/main/java/org/openecomp/sdc/be/resources/data/ComponentCacheData.java +++ b/catalog-dao/src/main/java/org/openecomp/sdc/be/resources/data/ComponentCacheData.java @@ -29,13 +29,13 @@ import java.util.Date; @Table(keyspace = "sdccomponent", name = "componentcache") public class ComponentCacheData { - public final static String RRESOURCE_ID_FIELD = "resourceId"; + public static final String RESOURCE_ID_FIELD = "resourceId"; - public final static String SERVICE_NAME_FIELD = "serviceName"; - public final static String SERVICE_VERSION_FIELD = "serviceVersion"; - public final static String ARTIFACT_NAME_FIELD = "artifactName"; + public static final String SERVICE_NAME_FIELD = "serviceName"; + public static final String SERVICE_VERSION_FIELD = "serviceVersion"; + public static final String ARTIFACT_NAME_FIELD = "artifactName"; - public static String delim = ":"; + public static final String delim = ":"; @PartitionKey @Column(name = "id") diff --git a/catalog-dao/src/main/java/org/openecomp/sdc/be/resources/data/DAOArtifactData.java b/catalog-dao/src/main/java/org/openecomp/sdc/be/resources/data/DAOArtifactData.java index 6d0a32d1d8..28a5d3569a 100644 --- a/catalog-dao/src/main/java/org/openecomp/sdc/be/resources/data/DAOArtifactData.java +++ b/catalog-dao/src/main/java/org/openecomp/sdc/be/resources/data/DAOArtifactData.java @@ -35,7 +35,7 @@ public class DAOArtifactData { public static final String SERVICE_VERSION_FIELD = "serviceVersion"; public static final String ARTIFACT_NAME_FIELD = "artifactName"; - public static String delim = ":"; + public static final String delim = ":"; @PartitionKey @Column(name = "id") diff --git a/catalog-model/src/main/java/org/openecomp/sdc/be/model/jsonjanusgraph/operations/NodeTemplateOperation.java b/catalog-model/src/main/java/org/openecomp/sdc/be/model/jsonjanusgraph/operations/NodeTemplateOperation.java index 3cd46ba846..7a399a1f69 100644 --- a/catalog-model/src/main/java/org/openecomp/sdc/be/model/jsonjanusgraph/operations/NodeTemplateOperation.java +++ b/catalog-model/src/main/java/org/openecomp/sdc/be/model/jsonjanusgraph/operations/NodeTemplateOperation.java @@ -115,7 +115,7 @@ public class NodeTemplateOperation extends BaseOperation { public static final Integer NON_HEAT_TIMEOUT = 0; private static final Logger log = Logger.getLogger(NodeTemplateOperation.class.getName()); - public LoggerSupportability loggerSupportability=LoggerSupportability.getLogger(NodeTemplateOperation.class.getName()); + private static final LoggerSupportability loggerSupportability=LoggerSupportability.getLogger(NodeTemplateOperation.class.getName()); public NodeTemplateOperation() { defaultHeatTimeout = ConfigurationManager.getConfigurationManager().getConfiguration().getHeatArtifactDeploymentTimeout().getDefaultMinutes(); if ((defaultHeatTimeout == null) || (defaultHeatTimeout < 1)) { diff --git a/common-app-api/pom.xml b/common-app-api/pom.xml index 65666aff9c..39be0353af 100644 --- a/common-app-api/pom.xml +++ b/common-app-api/pom.xml @@ -260,6 +260,11 @@ ${cassandra.driver.version} compile + + org.apache.commons + commons-text + ${apache-commons-text.version} + diff --git a/common-app-api/src/main/java/org/openecomp/sdc/common/api/ArtifactGroupTypeEnum.java b/common-app-api/src/main/java/org/openecomp/sdc/common/api/ArtifactGroupTypeEnum.java index c990d43f64..b9b440dc49 100644 --- a/common-app-api/src/main/java/org/openecomp/sdc/common/api/ArtifactGroupTypeEnum.java +++ b/common-app-api/src/main/java/org/openecomp/sdc/common/api/ArtifactGroupTypeEnum.java @@ -22,27 +22,19 @@ package org.openecomp.sdc.common.api; import java.util.ArrayList; import java.util.List; +import lombok.AllArgsConstructor; +import lombok.Getter; +@AllArgsConstructor public enum ArtifactGroupTypeEnum { INFORMATIONAL("INFORMATIONAL"), DEPLOYMENT("DEPLOYMENT"), LIFE_CYCLE("LIFE_CYCLE"), SERVICE_API("SERVICE_API"), TOSCA("TOSCA"), OTHER("OTHER"); - private String type; - - ArtifactGroupTypeEnum(String type) { - this.type = type; - } - - public String getType() { - return type; - } - - public void setType(String type) { - this.type = type; - } + @Getter + private final String type; public static ArtifactGroupTypeEnum findType(final String type) { - for (ArtifactGroupTypeEnum ate : ArtifactGroupTypeEnum.values()) { + for (ArtifactGroupTypeEnum ate : values()) { if (ate.getType().equals(type)) { return ate; } @@ -52,7 +44,7 @@ public enum ArtifactGroupTypeEnum { public static List getAllTypes() { List types = new ArrayList<>(); - for (ArtifactGroupTypeEnum ate : ArtifactGroupTypeEnum.values()) { + for (ArtifactGroupTypeEnum ate : values()) { types.add(ate.getType()); } return types; diff --git a/common-app-api/src/main/java/org/openecomp/sdc/common/api/YamlSuffixEnum.java b/common-app-api/src/main/java/org/openecomp/sdc/common/api/YamlSuffixEnum.java index 1310ab170f..ae25ebe177 100644 --- a/common-app-api/src/main/java/org/openecomp/sdc/common/api/YamlSuffixEnum.java +++ b/common-app-api/src/main/java/org/openecomp/sdc/common/api/YamlSuffixEnum.java @@ -22,30 +22,19 @@ package org.openecomp.sdc.common.api; import java.util.ArrayList; import java.util.List; +import lombok.AllArgsConstructor; +import lombok.Getter; +@AllArgsConstructor public enum YamlSuffixEnum { YAML("YAML"), - yaml("yaml"), - YML("YML"), - yml("yml"); - YamlSuffixEnum(String suffix) { - this.suffix = suffix; - } - - private String suffix; - - public String getSuffix() { - return suffix; - } - - public void setSuufix(String suffix) { - this.suffix = suffix; - } + @Getter + private final String suffix; public static List getSuffixes() { diff --git a/common-app-api/src/main/java/org/openecomp/sdc/common/config/EcompClassification.java b/common-app-api/src/main/java/org/openecomp/sdc/common/config/EcompClassification.java index 31499486de..5ea06cb3f7 100644 --- a/common-app-api/src/main/java/org/openecomp/sdc/common/config/EcompClassification.java +++ b/common-app-api/src/main/java/org/openecomp/sdc/common/config/EcompClassification.java @@ -20,22 +20,15 @@ package org.openecomp.sdc.common.config; +import lombok.AllArgsConstructor; +import lombok.Getter; + +@AllArgsConstructor public enum EcompClassification { INFORMATION("I"), WARNING("W"), ERROR("E"), FATAL("F"); - String classification; - - EcompClassification(String classification) { - this.classification = classification; - } - - public String getClassification() { - return classification; - } - - public void setClassification(String classification) { - this.classification = classification; - } + @Getter + private final String classification; } diff --git a/common-app-api/src/main/java/org/openecomp/sdc/common/config/EcompErrorCode.java b/common-app-api/src/main/java/org/openecomp/sdc/common/config/EcompErrorCode.java index e605366fcb..845288a5db 100644 --- a/common-app-api/src/main/java/org/openecomp/sdc/common/config/EcompErrorCode.java +++ b/common-app-api/src/main/java/org/openecomp/sdc/common/config/EcompErrorCode.java @@ -20,87 +20,94 @@ package org.openecomp.sdc.common.config; +import lombok.Getter; + +@Getter public enum EcompErrorCode { E_100("Authentication problem towards U-EB server. Reason: %s", - "An Authentication failure occured during access to UEB server. Please check that UEB keys are configured correctly in ASDC BE distribution configuration."), E_199( - "Internal authentication problem. Description: %s"), - - E_200("ASDC Backend probably lost connectivity to either one of the following components: JanusGraph DB, Cassandra, Onboarding, UEB Cluster. Please check the logs for more information."), E_201( - "ASDC Backend probably lost connectivity to JanusGraph DB. Please check the logs for more information."), E_202( - "ASDC Backend probably lost connectivity to ElasticSearch. Please check the logs for more information."), E_203( - "ASDC Backend probably lost connectivity to UEB Cluster. Please check the logs for more information.", - "Check connectivity to UEB cluster which is configured under parameter uebServers in distribution-configuration.yaml."), E_204( - "Unable to connect to a valid ASDC Backend Server", - "Please check connectivity from this FE instance towards BE or BE Load Balancer. Please check that parameters in FE configuration.yaml: beHost, beHttpPort and beSslPort point to a valid host and port values."), - - E_205("ASDC Backend Recovery to either one of the following components: JanusGraph DB, Cassandra, Onboarding, UEB Cluster."), E_206( - "ASDC Backend connection recovery to JanusGraph DB."), E_208( - "ASDC Backend connection recovery to UEB Cluster."), E_209( - "Connectivity to ASDC BE Server is recovered."), E_210( - "Connection problem towards U-EB server. Reason: %s", - "Please check that that parameter uebServers in distribution-configuration.yaml points to a valid UEB Cluster."), E_211( - "Connection problem towards U-EB server. Cannot reach host %s", - "Please check that that parameter uebServers in distribution-configuration.yaml points to a valid UEB Cluster."), E_212( - "Couldn't resolve hostIP. Desciption: %s"), E_213( - "Site switch over was done. Site is now in %s mode"), E_214( - "Dmaap Connection problem."), E_220( - "User HTTP session is expired"), E_299( - "Internal Connection problem. Description: %s"), + "An Authentication failure occured during access to UEB server. Please check that UEB keys are configured correctly in ASDC BE distribution configuration."), + E_199("Internal authentication problem. Description: %s"), + + E_200("ASDC Backend probably lost connectivity to either one of the following components: JanusGraph DB, Cassandra, Onboarding, UEB Cluster. Please check the logs for more information."), + E_201("ASDC Backend probably lost connectivity to JanusGraph DB. Please check the logs for more information."), + E_202("ASDC Backend probably lost connectivity to ElasticSearch. Please check the logs for more information."), + E_203("ASDC Backend probably lost connectivity to UEB Cluster. Please check the logs for more information.", + "Check connectivity to UEB cluster which is configured under parameter uebServers in distribution-configuration.yaml."), + E_204("Unable to connect to a valid ASDC Backend Server", + "Please check connectivity from this FE instance towards BE or BE Load Balancer. Please check that parameters in FE configuration.yaml: beHost, beHttpPort and beSslPort point to a valid host and port values."), + + E_205("ASDC Backend Recovery to either one of the following components: JanusGraph DB, Cassandra, Onboarding, UEB Cluster."), + E_206("ASDC Backend connection recovery to JanusGraph DB."), + E_208("ASDC Backend connection recovery to UEB Cluster."), + E_209("Connectivity to ASDC BE Server is recovered."), + E_210("Connection problem towards U-EB server. Reason: %s", + "Please check that that parameter uebServers in distribution-configuration.yaml points to a valid UEB Cluster."), + E_211("Connection problem towards U-EB server. Cannot reach host %s", + "Please check that that parameter uebServers in distribution-configuration.yaml points to a valid UEB Cluster."), + E_212("Couldn't resolve hostIP. Desciption: %s"), + E_213("Site switch over was done. Site is now in %s mode"), + E_214("Dmaap Connection problem."), + E_220("User HTTP session is expired"), + E_299("Internal Connection problem. Description: %s"), // [resource/service/product] E_300("Mandatory %s Component %s cannot be found in repository"), // [SERVICE/RESOURCE/PRODUCT] [id] is not valid. Cannot be found in graph. - E_301("%s Component %s is not valid. Cannot be found in graph."), E_302( - "Configuration parameter %s is invalid. Value configured is %s."), E_303( - "Error occured during access to U-EB Server. Data not found: %s", - "An error occured during access to UEB Server, ASDC failed to either register or unregister to/from UEB topic."), E_304( - "The artifact type %s does not appear in the list of valid artifacts %s"), E_305( - "Configuration parameter %s is missing"), E_306( - "Configuration parameter %s is invalid. At least %s values shall be configured"), E_307( - "Invalid configuration in YAML file. %s"), E_308( - "Artifact uploaded has missing information. Missing %s"), E_309( - "Artifact %s requested is not found"), E_310( - "User %s requested is not found"), E_311( - "Ecomp error description params mismatch between code and YAML or wrong format, name: %s"), E_312( - "Ecomp error element not found in YAML, name: %s"), + E_301("%s Component %s is not valid. Cannot be found in graph."), + E_302("Configuration parameter %s is invalid. Value configured is %s."), + E_303("Error occured during access to U-EB Server. Data not found: %s", + "An error occured during access to UEB Server, ASDC failed to either register or unregister to/from UEB topic."), + E_304("The artifact type %s does not appear in the list of valid artifacts %s"), + E_305("Configuration parameter %s is missing"), + E_306("Configuration parameter %s is invalid. At least %s values shall be configured"), + E_307("Invalid configuration in YAML file. %s"), + E_308("Artifact uploaded has missing information. Missing %s"), + E_309("Artifact %s requested is not found"), + E_310("User %s requested is not found"), + E_311("Ecomp error description params mismatch between code and YAML or wrong format, name: %s"), + E_312("Ecomp error element not found in YAML, name: %s"), E_399("Internal Invalid Object. Description: %s"), - E_400("The type %s of %s is invalid"), E_401("The value %s of %s from type %s is invalid"), E_402( - "Payload of artifact uploaded is invalid (invalid MD5 or encryption)"), E_403( - "Input for artifact metadata is invalid"), E_404("%s %s required is missing"), E_405( - "Failed to convert json input to object"), E_406("Distribution %s required is missing"), + E_400("The type %s of %s is invalid"), + E_401("The value %s of %s from type %s is invalid"), + E_402("Payload of artifact uploaded is invalid (invalid MD5 or encryption)"), + E_403("Input for artifact metadata is invalid"), + E_404("%s %s required is missing"), + E_405("Failed to convert json input to object"), + E_406("Distribution %s required is missing"), E_499("Invalid input. Description: %s"), - E_500("Catalog-BE was not initialized properly"), E_501( - "Failed to add resource instance of resource %s to service %s"), E_502( - "Error occured during access to U-EB Server. Operation: %s", - "An error occured in ASDC distribution mechanism. Please check the logs for more information."), E_503( - "Error occured in Distribution Engine. Failed operation: %s", - "System Error occured in ASDC Distribution Engine. Please check ASDC logs for more details."), E_504( - "Failed adding node of type %s to graph."), E_505( - "Operation towards database failed.", - "Please check JanusGraph DB health or look at the logs for more details."), E_506( - "Unexpected error during operation"), E_507( - "Going to execute rollback on graph."), E_508( - "Failed to lock object for update. Type = %s, Id = %s"), E_509( - "Failed to create node %s on graph. status is %s"), E_510( - "Failed to update node %s on graph. Status is %s"), E_511( - "Failed to delete node %s on graph. Status is %s"), E_512( - "Failed to retrieve node %s from graph. Status is %s"), E_513( - "Failed to find parent node of %s on graph. Status is %s"), E_514( - "Failed to fetch all nodes with type %s of parent node %s . Status is %s"), E_515( - "Cannot find node with type %s associated with node %s . Status is %s"), E_516( - "Error occured in Component Cleaner Task. Failed operation: %s"), E_517( - "Error when logging FE HTTP request/response"), E_518( - "Error when trying to access FE Portal page"), + E_500("Catalog-BE was not initialized properly"), + E_501("Failed to add resource instance of resource %s to service %s"), + E_502("Error occured during access to U-EB Server. Operation: %s", + "An error occured in ASDC distribution mechanism. Please check the logs for more information."), + E_503("Error occured in Distribution Engine. Failed operation: %s", + "System Error occured in ASDC Distribution Engine. Please check ASDC logs for more details."), + E_504("Failed adding node of type %s to graph."), + E_505("Operation towards database failed.", + "Please check JanusGraph DB health or look at the logs for more details."), + E_506("Unexpected error during operation"), + E_507("Going to execute rollback on graph."), + E_508("Failed to lock object for update. Type = %s, Id = %s"), + E_509("Failed to create node %s on graph. status is %s"), + E_510("Failed to update node %s on graph. Status is %s"), + E_511("Failed to delete node %s on graph. Status is %s"), + E_512("Failed to retrieve node %s from graph. Status is %s"), + E_513("Failed to find parent node of %s on graph. Status is %s"), + E_514("Failed to fetch all nodes with type %s of parent node %s . Status is %s"), + E_515("Cannot find node with type %s associated with node %s . Status is %s"), + E_516("Error occured in Component Cleaner Task. Failed operation: %s"), + E_517("Error when logging FE HTTP request/response"), + E_518("Error when trying to access FE Portal page"), E_599("Internal flow error. Operation: %s"), - E_900("Unexpected error during BE REST API execution"), E_901("General error during FE Health Check"), E_999( - "Unexpected error. Description: %s"); + E_900("Unexpected error during BE REST API execution"), + E_901("General error during FE Health Check"), + E_999("Unexpected error. Description: %s"); /* * 100-199 Security/Permission Related - Authentication problems (from @@ -125,8 +132,8 @@ public enum EcompErrorCode { * 900-999 Unknown Errors - unexpected exception */ - private String description; - private String resolution; + private final String description; + private final String resolution; EcompErrorCode(String description, String resolution) { this.description = description; @@ -135,22 +142,7 @@ public enum EcompErrorCode { EcompErrorCode(String description) { this.description = description; - } - - public String getDescription() { - return description; - } - - public void setDescription(String description) { - this.description = description; - } - - public String getResolution() { - return resolution; - } - - public void setResolution(String resolution) { - this.resolution = resolution; + this.resolution = ""; } } diff --git a/common-app-api/src/main/java/org/openecomp/sdc/common/config/EcompErrorEnum.java b/common-app-api/src/main/java/org/openecomp/sdc/common/config/EcompErrorEnum.java index bed7255057..61e992bbd7 100644 --- a/common-app-api/src/main/java/org/openecomp/sdc/common/config/EcompErrorEnum.java +++ b/common-app-api/src/main/java/org/openecomp/sdc/common/config/EcompErrorEnum.java @@ -20,6 +20,9 @@ package org.openecomp.sdc.common.config; +import lombok.Getter; + +@Getter public enum EcompErrorEnum { @@ -410,13 +413,11 @@ public enum EcompErrorEnum { * AlarmSeverity.CRITICAL, EcompClassification.FATAL), */; - ; - - EcompErrorCode ecompErrorCode; - ErrorType eType; - AlarmSeverity alarmSeverity; - EcompClassification classification; - EcompErrorEnum clearCode; + private final EcompErrorCode ecompErrorCode; + private final ErrorType eType; + private final AlarmSeverity alarmSeverity; + private final EcompClassification classification; + private final EcompErrorEnum clearCode; EcompErrorEnum(EcompErrorCode ecompErrorCode, ErrorType eType, AlarmSeverity alarmSeverity, EcompClassification classification, EcompErrorEnum clearCode) { @@ -435,46 +436,7 @@ public enum EcompErrorEnum { this.eType = eType; this.alarmSeverity = alarmSeverity; this.classification = classification; - } - - public ErrorType geteType() { - return eType; - } - - public void seteType(ErrorType eType) { - this.eType = eType; - } - - public AlarmSeverity getAlarmSeverity() { - return alarmSeverity; - } - - public void setAlarmSeverity(AlarmSeverity alarmSeverity) { - this.alarmSeverity = alarmSeverity; - } - - public EcompErrorCode getEcompErrorCode() { - return ecompErrorCode; - } - - public void setEcompErrorCode(EcompErrorCode ecompErrorCode) { - this.ecompErrorCode = ecompErrorCode; - } - - public EcompClassification getClassification() { - return classification; - } - - public void setClassification(EcompClassification classification) { - this.classification = classification; - } - - public EcompErrorEnum getClearCode() { - return clearCode; - } - - public void setClearCode(EcompErrorEnum clearCode) { - this.clearCode = clearCode; + this.clearCode = null; } public enum ErrorType { @@ -485,7 +447,4 @@ public enum EcompErrorEnum { CRITICAL, MAJOR, MINOR, INFORMATIONAL, NONE } - // public String toString() { - // return eType + "," + eCode + "," + desc; - // } } diff --git a/common-app-api/src/main/java/org/openecomp/sdc/common/config/EcompErrorLogUtil.java b/common-app-api/src/main/java/org/openecomp/sdc/common/config/EcompErrorLogUtil.java index feb3ea6e68..7145a11005 100644 --- a/common-app-api/src/main/java/org/openecomp/sdc/common/config/EcompErrorLogUtil.java +++ b/common-app-api/src/main/java/org/openecomp/sdc/common/config/EcompErrorLogUtil.java @@ -111,9 +111,9 @@ public class EcompErrorLogUtil { String eCode = createEcode(ecompErrorEnum); - MDC.put("alarmSeverity", ecompErrorEnum.alarmSeverity.name()); + MDC.put("alarmSeverity", ecompErrorEnum.getAlarmSeverity().name()); // else it stays ERROR - formatter.format(ECOMP_ERROR_TMPL, ecompErrorEnum.geteType(), ecompErrorEnum.name(), eCode, + formatter.format(ECOMP_ERROR_TMPL, ecompErrorEnum.getEType(), ecompErrorEnum.name(), eCode, ecompErrorContext, description); log.error(severity, EcompLoggerErrorCode.getByValue(ecompErrorEnum.getEcompErrorCode().name()), diff --git a/common-app-api/src/main/java/org/openecomp/sdc/common/config/generation/GenerateEcompErrorsCsv.java b/common-app-api/src/main/java/org/openecomp/sdc/common/config/generation/GenerateEcompErrorsCsv.java index a4852d10f1..b9c0d77be8 100644 --- a/common-app-api/src/main/java/org/openecomp/sdc/common/config/generation/GenerateEcompErrorsCsv.java +++ b/common-app-api/src/main/java/org/openecomp/sdc/common/config/generation/GenerateEcompErrorsCsv.java @@ -167,7 +167,7 @@ public class GenerateEcompErrorsCsv { ecompErrorRow.setDescription(ecompErrorEnum.getEcompErrorCode().getDescription()); ecompErrorRow.setErrorCode(errorCode); ecompErrorRow.setErrorName(ecompErrorEnum.name()); - ecompErrorRow.setErrorType(ecompErrorEnum.geteType()); + ecompErrorRow.setErrorType(ecompErrorEnum.getEType()); ecompErrorRow.setResolution(ecompErrorEnum.getEcompErrorCode().getResolution()); errors.add(ecompErrorRow); diff --git a/common-app-api/src/main/java/org/openecomp/sdc/common/datastructure/AuditingFieldsKey.java b/common-app-api/src/main/java/org/openecomp/sdc/common/datastructure/AuditingFieldsKey.java index 06b2452d82..060e3ea79a 100644 --- a/common-app-api/src/main/java/org/openecomp/sdc/common/datastructure/AuditingFieldsKey.java +++ b/common-app-api/src/main/java/org/openecomp/sdc/common/datastructure/AuditingFieldsKey.java @@ -21,7 +21,11 @@ package org.openecomp.sdc.common.datastructure; import java.util.Date; +import lombok.AllArgsConstructor; +import lombok.Getter; +@AllArgsConstructor +@Getter public enum AuditingFieldsKey { // General AUDIT_TIMESTAMP(Date.class, "TIMESTAMP"), @@ -92,23 +96,7 @@ public enum AuditingFieldsKey { AUDIT_AUTH_REALM(String.class, "REALM"), AUDIT_ECOMP_USER(String.class, "ECOMP_USER"); - private Class clazz; - private String displayName; + private final Class clazz; + private final String displayName; - AuditingFieldsKey(Class clazz, String displayName) { - this.clazz = clazz; - this.displayName = displayName; - } - - public Class getValueClass() { - return this.clazz; - } - - public String getDisplayName() { - return displayName; - } - - public void setDisplayName(String displayName) { - this.displayName = displayName; - } } diff --git a/common-app-api/src/main/java/org/openecomp/sdc/common/datastructure/MonitoringFieldsKeysEnum.java b/common-app-api/src/main/java/org/openecomp/sdc/common/datastructure/MonitoringFieldsKeysEnum.java index f92b4ef687..d44470758a 100644 --- a/common-app-api/src/main/java/org/openecomp/sdc/common/datastructure/MonitoringFieldsKeysEnum.java +++ b/common-app-api/src/main/java/org/openecomp/sdc/common/datastructure/MonitoringFieldsKeysEnum.java @@ -21,7 +21,11 @@ package org.openecomp.sdc.common.datastructure; import java.util.Date; +import lombok.AllArgsConstructor; +import lombok.Getter; +@AllArgsConstructor +@Getter public enum MonitoringFieldsKeysEnum { MONITORING_TIMESTAMP(Date.class, "TIMESTAMP"), MONITORING_HOST_IP(String.class, "HOST_IP"), @@ -35,23 +39,7 @@ public enum MonitoringFieldsKeysEnum { MONITORING_APP_ID(String.class, "APP_ID"), MONITORING_APP_STAT(String.class, "APP_STAT"); - private Class clazz; - private String displayName; + private final Class clazz; + private final String displayName; - MonitoringFieldsKeysEnum(Class clazz, String displayName) { - this.clazz = clazz; - this.displayName = displayName; - } - - public Class getValueClass() { - return this.clazz; - } - - public String getDisplayName() { - return displayName; - } - - public void setDisplayName(String displayName) { - this.displayName = displayName; - } } diff --git a/common-app-api/src/main/java/org/openecomp/sdc/common/util/ValidationUtils.java b/common-app-api/src/main/java/org/openecomp/sdc/common/util/ValidationUtils.java index 6183d42417..57cf96e068 100644 --- a/common-app-api/src/main/java/org/openecomp/sdc/common/util/ValidationUtils.java +++ b/common-app-api/src/main/java/org/openecomp/sdc/common/util/ValidationUtils.java @@ -22,116 +22,116 @@ package org.openecomp.sdc.common.util; import com.google.common.base.CharMatcher; import org.apache.commons.collections.CollectionUtils; -import org.apache.commons.lang3.StringEscapeUtils; +import org.apache.commons.text.StringEscapeUtils; import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.math.NumberUtils; -import org.apache.commons.lang3.text.WordUtils; +import org.apache.commons.text.WordUtils; import org.apache.commons.validator.routines.UrlValidator; import org.jsoup.Jsoup; -import org.jsoup.helper.StringUtil; import org.jsoup.safety.Whitelist; import java.util.*; import java.util.regex.Pattern; public class ValidationUtils { - public final static Integer COMPONENT_NAME_MAX_LENGTH = 1024; - public final static Pattern COMPONENT_NAME_PATTERN = Pattern + + private ValidationUtils() { + } + + public static final Integer COMPONENT_NAME_MAX_LENGTH = 1024; + public static final Pattern COMPONENT_NAME_PATTERN = Pattern .compile("^[\\w][\\w \\.\\-\\_\\:\\+]{0," + (COMPONENT_NAME_MAX_LENGTH-1) + "}$"); - public final static Integer ADDITIONAL_INFORMATION_KEY_MAX_LENGTH = 50; - public final static Pattern ADDITIONAL_INFORMATION_KEY_PATTERN = Pattern + public static final Integer ADDITIONAL_INFORMATION_KEY_MAX_LENGTH = 50; + public static final Pattern ADDITIONAL_INFORMATION_KEY_PATTERN = Pattern .compile("^[\\w\\s\\.\\-\\_]{1," + COMPONENT_NAME_MAX_LENGTH + "}$"); - public final static Integer RSI_NAME_MAX_LENGTH = 1024; - public final static Pattern RSI_NAME_PATTERN = Pattern + public static final Integer RSI_NAME_MAX_LENGTH = 1024; + public static final Pattern RSI_NAME_PATTERN = Pattern .compile("^[\\w \\s\\.\\-\\_\\:\\+]{1," + RSI_NAME_MAX_LENGTH + "}$"); - public final static Integer COMMENT_MAX_LENGTH = 256; + public static final Integer COMMENT_MAX_LENGTH = 256; - public final static Integer ICON_MAX_LENGTH = 25; - public final static Pattern ICON_PATTERN = Pattern.compile("^[\\w\\-]{1," + ICON_MAX_LENGTH + "}$"); - public final static Integer PROJECT_CODE_MAX_LEGTH = 50; - public final static Pattern PROJECT_CODE_PATTERN = Pattern.compile("^[\\s\\w_.-]{5,50}$"); + public static final Integer ICON_MAX_LENGTH = 25; + public static final Pattern ICON_PATTERN = Pattern.compile("^[\\w\\-]{1," + ICON_MAX_LENGTH + "}$"); + public static final Integer PROJECT_CODE_MAX_LEGTH = 50; + public static final Pattern PROJECT_CODE_PATTERN = Pattern.compile("^[\\s\\w_.-]{5,50}$"); // USER_ID format : aannnX (where a=a-z or A-Z, n=0-9, and X=a-z,A-Z, or 0-9) - public final static Integer CONNTACT_ID_MAX_LENGTH = 50; - // public final static Pattern CONTACT_ID_PATTERN = Pattern -// .compile("[mM]{1}[0-9]{5}|[a-zA-Z]{2}[0-9]{4}|[a-zA-Z]{2}[0-9]{3}[a-zA-Z]{1}"); - public final static Pattern CONTACT_ID_PATTERN = Pattern.compile("^[\\s\\w_.-]{1,50}$"); - public final static Pattern OCTET_PATTERN = Pattern.compile("%[a-fA-F0-9]{2}"); - public final static Pattern NONE_UTF8_PATTERN = Pattern.compile("[^\\x00-\\x7F]+"); - public final static Pattern URL_INVALIDE_PATTERN = Pattern.compile("[,#?&@$<>~^`\\\\\\[\\]{}|\")(*!+=;%]+");// ,#?&@$<>~^`\\[]{}|")(*! - - public final static Pattern ENGLISH_PATTERN = Pattern.compile("^[\\p{Graph}\\x20]+$"); - public final static Pattern COMMENT_PATTERN = Pattern.compile("^[\\u0000-\\u00BF]{1,1024}$"); - public final static Pattern SERVICE_METADATA_PATTERN = Pattern.compile("^[\\x20-\\x21\\x23-\\x29\\x2B-\\x2E\\x30-\\x39\\x3B\\x3D\\x40-\\x5B\\x5D-\\x7B\\x7D-\\xFF]{1,256}"); - public final static Integer COMPONENT_DESCRIPTION_MAX_LENGTH = 1024; - public final static Integer SERVICE_TYPE_MAX_LENGTH = 256; - public final static Integer SERVICE_ROLE_MAX_LENGTH = 256; - public final static Integer SERVICE_FUNCTION_MAX_LENGTH = 256; - public final static Integer SERVICE_NAMING_POLICY_MAX_SIZE = 100; - - public final static Integer TAG_MAX_LENGTH = 1024; - public final static Integer TAG_LIST_MAX_LENGTH = 1024; - public final static Integer VENDOR_NAME_MAX_LENGTH = 60; - public final static Pattern VENDOR_NAME_PATTERN = Pattern + public static final Integer CONNTACT_ID_MAX_LENGTH = 50; + + public static final Pattern CONTACT_ID_PATTERN = Pattern.compile("^[\\s\\w_.-]{1,50}$"); + public static final Pattern OCTET_PATTERN = Pattern.compile("%[a-fA-F0-9]{2}"); + public static final Pattern NONE_UTF8_PATTERN = Pattern.compile("[^\\x00-\\x7F]+"); + public static final Pattern URL_INVALIDE_PATTERN = Pattern.compile("[,#?&@$<>~^`\\\\\\[\\]{}|\")(*!+=;%]+");// ,#?&@$<>~^`\\[]{}|")(*! + + public static final Pattern ENGLISH_PATTERN = Pattern.compile("^[\\p{Graph}\\x20]+$"); + public static final Pattern COMMENT_PATTERN = Pattern.compile("^[\\u0000-\\u00BF]{1,1024}$"); + public static final Pattern SERVICE_METADATA_PATTERN = Pattern.compile("^[\\x20-\\x21\\x23-\\x29\\x2B-\\x2E\\x30-\\x39\\x3B\\x3D\\x40-\\x5B\\x5D-\\x7B\\x7D-\\xFF]{1,256}"); + public static final Integer COMPONENT_DESCRIPTION_MAX_LENGTH = 1024; + public static final Integer SERVICE_TYPE_MAX_LENGTH = 256; + public static final Integer SERVICE_ROLE_MAX_LENGTH = 256; + public static final Integer SERVICE_FUNCTION_MAX_LENGTH = 256; + public static final Integer SERVICE_NAMING_POLICY_MAX_SIZE = 100; + + public static final Integer TAG_MAX_LENGTH = 1024; + public static final Integer TAG_LIST_MAX_LENGTH = 1024; + public static final Integer VENDOR_NAME_MAX_LENGTH = 60; + public static final Pattern VENDOR_NAME_PATTERN = Pattern .compile("^[\\x20-\\x21\\x23-\\x29\\x2B-\\x2E\\x30-\\x39\\x3B\\x3D\\x40-\\x5B\\x5D-\\x7B\\x7D-\\xFF]+$"); - public final static Integer VENDOR_RELEASE_MAX_LENGTH = 25; - public final static Pattern VENDOR_RELEASE_PATTERN = Pattern + public static final Integer VENDOR_RELEASE_MAX_LENGTH = 25; + public static final Pattern VENDOR_RELEASE_PATTERN = Pattern .compile("^[\\x20-\\x21\\x23-\\x29\\x2B-\\x2E\\x30-\\x39\\x3B\\x3D\\x40-\\x5B\\x5D-\\x7B\\x7D-\\xFF]+$"); - public final static Integer RESOURCE_VENDOR_MODEL_NUMBER_MAX_LENGTH = 65; - - public final static Pattern CLEAN_FILENAME_PATTERN = Pattern.compile("[\\x00-\\x1f\\x80-\\x9f\\x5c/\\*:|\"/]+"); - - public final static Pattern DASH_PATTERN = Pattern.compile("[-]+"); - public final static Pattern UNDERSCORE_PATTERN = Pattern.compile("[_]+"); - public final static Pattern PLUS_PATTERN = Pattern.compile("[+]+"); - public final static Pattern SPACE_PATTERN = Pattern.compile("[ ]+"); - public final static Pattern AMP_PATTERN = Pattern.compile("[&]+"); - public final static Pattern DOT_PATTERN = Pattern.compile("[\\.]+"); - public final static Pattern APOST_PATTERN = Pattern.compile("[']+"); - public final static Pattern HASHTAG_PATTERN = Pattern.compile("[#]+"); - public final static Pattern EQUAL_PATTERN = Pattern.compile("[=]+"); - public final static Pattern COLON_PATTERN = Pattern.compile("[:]+"); - public final static Pattern AT_PATTERN = Pattern.compile("[@]+"); - public final static Pattern AND_PATTERN = Pattern.compile(" [aA][Nn][Dd] "); - public final static Set CATEGORY_CONJUNCTIONS = new HashSet<>( + public static final Integer RESOURCE_VENDOR_MODEL_NUMBER_MAX_LENGTH = 65; + + public static final Pattern CLEAN_FILENAME_PATTERN = Pattern.compile("[\\x00-\\x1f\\x80-\\x9f\\x5c/\\*:|\"/]+"); + + public static final Pattern DASH_PATTERN = Pattern.compile("[-]+"); + public static final Pattern UNDERSCORE_PATTERN = Pattern.compile("[_]+"); + public static final Pattern PLUS_PATTERN = Pattern.compile("[+]+"); + public static final Pattern SPACE_PATTERN = Pattern.compile("[ ]+"); + public static final Pattern AMP_PATTERN = Pattern.compile("[&]+"); + public static final Pattern DOT_PATTERN = Pattern.compile("[\\.]+"); + public static final Pattern APOST_PATTERN = Pattern.compile("[']+"); + public static final Pattern HASHTAG_PATTERN = Pattern.compile("[#]+"); + public static final Pattern EQUAL_PATTERN = Pattern.compile("[=]+"); + public static final Pattern COLON_PATTERN = Pattern.compile("[:]+"); + public static final Pattern AT_PATTERN = Pattern.compile("[@]+"); + public static final Pattern AND_PATTERN = Pattern.compile(" [aA][Nn][Dd] "); + private static final Set CATEGORY_CONJUNCTIONS = new HashSet<>( Arrays.asList("of", "to", "for", "as", "a", "an", "the")); - public final static Pattern COST_PATTERN = Pattern.compile("^[0-9]{1,5}\\.[0-9]{1,3}$"); - public final static Pattern ARTIFACT_LABEL_PATTERN = Pattern.compile("^[a-zA-Z0-9 \\-+]+$"); - public final static Integer ARTIFACT_LABEL_LENGTH = 255; - public final static Pattern ARTIFACT_DISPLAY_NAME_PATTERN = Pattern.compile("^[a-zA-Z0-9][a-zA-Z0-9 &\\.'#=:@_\\-+]+$"); - public final static Pattern CATEGORY_LABEL_PATTERN = Pattern.compile("^[a-zA-Z0-9][a-zA-Z0-9 &\\.'#=:@_\\-+]+$"); - public final static Integer CATEGORY_LABEL_MIN_LENGTH = 3; - public final static Integer CATEGORY_LABEL_MAX_LENGTH = 25; - - public final static Pattern COMPONENT_NAME_DELIMETER_PATTERN = Pattern.compile("[\\.\\-\\_]+"); - public final static Pattern COMPONENT_INCTANCE_NAME_DELIMETER_PATTERN = Pattern.compile("[\\.\\-]+"); - public final static Pattern PRODUCT_NAME_DELIMETER_PATTERN = Pattern.compile("[\\.\\-\\_&=#@':\\[\\]\\+]+"); - public final static Integer CONSUMER_NAME_MAX_LENGTH = 255; - // public final static Pattern CONSUMER_NAME_PATTERN = - // Pattern.compile("^[\\w]{1}?[\\w\\.\\-]{0," + CONSUMER_NAME_MAX_LENGTH + - // "}?$"); - public final static Pattern CONSUMER_NAME_PATTERN = Pattern.compile("^[\\w]+[\\w\\.\\-]*$"); - public final static Integer CONSUMER_SALT_LENGTH = 32; - public final static Integer CONSUMER_PASSWORD_LENGTH = 64; - public final static Pattern CONSUMER_PASS_SALT_PATTERN = Pattern.compile("^[a-z0-9]+$"); - public final static Pattern FLOAT_PATTERN = Pattern.compile("^[\\d]+[\\.]{1}[\\d]+$"); - public final static Pattern CERTIFIED_VERSION_PATTERN = Pattern.compile("^[1-9][0-9]*\\.0$"); - public final static Pattern MINOR_VERSION_PATTERN = Pattern.compile("^0\\.[1-9][0-9]*$"); - public final static Pattern TAGS_PATTERN = Pattern.compile("<[^><]*>"); - public final static Pattern TAG_PATTERN = Pattern.compile("^[\\s\\w_.-]{1,1024}$"); - - public final static Integer ARTIFACT_NAME_LENGTH = 255; - public final static Integer API_URL_LENGTH = 100; - public final static Integer ARTIFACT_DESCRIPTION_MAX_LENGTH = 256; - - public final static Integer PRODUCT_FULL_NAME_MIN_LENGTH = 4; - public final static Integer PRODUCT_FULL_NAME_MAX_LENGTH = 100; + public static final Pattern COST_PATTERN = Pattern.compile("^[0-9]{1,5}\\.[0-9]{1,3}$"); + public static final Pattern ARTIFACT_LABEL_PATTERN = Pattern.compile("^[a-zA-Z0-9 \\-+]+$"); + public static final Integer ARTIFACT_LABEL_LENGTH = 255; + public static final Pattern ARTIFACT_DISPLAY_NAME_PATTERN = Pattern.compile("^[a-zA-Z0-9][a-zA-Z0-9 &\\.'#=:@_\\-+]+$"); + public static final Pattern CATEGORY_LABEL_PATTERN = Pattern.compile("^[a-zA-Z0-9][a-zA-Z0-9 &\\.'#=:@_\\-+]+$"); + public static final Integer CATEGORY_LABEL_MIN_LENGTH = 3; + public static final Integer CATEGORY_LABEL_MAX_LENGTH = 25; + + public static final Pattern COMPONENT_NAME_DELIMETER_PATTERN = Pattern.compile("[\\.\\-\\_]+"); + public static final Pattern COMPONENT_INCTANCE_NAME_DELIMETER_PATTERN = Pattern.compile("[\\.\\-]+"); + public static final Pattern PRODUCT_NAME_DELIMETER_PATTERN = Pattern.compile("[\\.\\-\\_&=#@':\\[\\]\\+]+"); + public static final Integer CONSUMER_NAME_MAX_LENGTH = 255; + + public static final Pattern CONSUMER_NAME_PATTERN = Pattern.compile("^[\\w]+[\\w\\.\\-]*$"); + public static final Integer CONSUMER_SALT_LENGTH = 32; + public static final Integer CONSUMER_PASSWORD_LENGTH = 64; + public static final Pattern CONSUMER_PASS_SALT_PATTERN = Pattern.compile("^[a-z0-9]+$"); + public static final Pattern FLOAT_PATTERN = Pattern.compile("^[\\d]+[\\.]{1}[\\d]+$"); + public static final Pattern CERTIFIED_VERSION_PATTERN = Pattern.compile("^[1-9][0-9]*\\.0$"); + public static final Pattern MINOR_VERSION_PATTERN = Pattern.compile("^0\\.[1-9][0-9]*$"); + public static final Pattern TAGS_PATTERN = Pattern.compile("<[^><]*>"); + public static final Pattern TAG_PATTERN = Pattern.compile("^[\\s\\w_.-]{1,1024}$"); + + public static final Integer ARTIFACT_NAME_LENGTH = 255; + public static final Integer API_URL_LENGTH = 100; + public static final Integer ARTIFACT_DESCRIPTION_MAX_LENGTH = 256; + + public static final Integer PRODUCT_FULL_NAME_MIN_LENGTH = 4; + public static final Integer PRODUCT_FULL_NAME_MAX_LENGTH = 100; public static final Integer FORWARDING_PATH_NAME_MAX_LENGTH = 100; - public final static Pattern FORWARDING_PATH_NAME_PATTERN = Pattern.compile("^[\\w][\\w \\.\\-\\_\\:\\+]{0," + (FORWARDING_PATH_NAME_MAX_LENGTH-1) + "}$"); + public static final Pattern FORWARDING_PATH_NAME_PATTERN = Pattern.compile("^[\\w][\\w \\.\\-\\_\\:\\+]{0," + (FORWARDING_PATH_NAME_MAX_LENGTH-1) + "}$"); - public final static Integer POLICY_MAX_LENGTH = 1024; - public final static Pattern POLICY_NAME_PATTERN = Pattern + public static final Integer POLICY_MAX_LENGTH = 1024; + public static final Pattern POLICY_NAME_PATTERN = Pattern .compile("^[\\w][\\w \\.\\-\\_\\:\\+]{0," + (POLICY_MAX_LENGTH-1) + "}$"); public static boolean validateArtifactLabel(String label) { @@ -456,10 +456,6 @@ public class ValidationUtils { } public static String normalizeFileName(String filename) { - // String[] split = filename.split(Pattern.quote(File.separator)); - // String name = ""; - // - // name = split[split.length - 1]; return cleanFileName(filename); } @@ -497,7 +493,6 @@ public class ValidationUtils { str = PLUS_PATTERN.matcher(str).replaceAll("+"); str = normaliseWhitespace(str); str = str.trim(); - // str = str.replaceAll(" ", ""); return str; } diff --git a/common-app-api/src/test/java/org/openecomp/sdc/common/api/ArtifactGroupTypeEnumTest.java b/common-app-api/src/test/java/org/openecomp/sdc/common/api/ArtifactGroupTypeEnumTest.java index 768ac4eaf4..185134a52b 100644 --- a/common-app-api/src/test/java/org/openecomp/sdc/common/api/ArtifactGroupTypeEnumTest.java +++ b/common-app-api/src/test/java/org/openecomp/sdc/common/api/ArtifactGroupTypeEnumTest.java @@ -31,29 +31,6 @@ public class ArtifactGroupTypeEnumTest { return ArtifactGroupTypeEnum.DEPLOYMENT; } - - @Test - public void testGetType() throws Exception { - ArtifactGroupTypeEnum testSubject; - String result; - - // default test - testSubject = createTestSubject(); - result = testSubject.getType(); - } - - - @Test - public void testSetType() throws Exception { - ArtifactGroupTypeEnum testSubject; - String type = ""; - - // default test - testSubject = createTestSubject(); - testSubject.setType(ArtifactGroupTypeEnum.DEPLOYMENT.getType()); - } - - @Test public void testFindType() throws Exception { String type = ""; diff --git a/common-app-api/src/test/java/org/openecomp/sdc/common/api/YamlSuffixEnumTest.java b/common-app-api/src/test/java/org/openecomp/sdc/common/api/YamlSuffixEnumTest.java index e201386d2f..8cc7862038 100644 --- a/common-app-api/src/test/java/org/openecomp/sdc/common/api/YamlSuffixEnumTest.java +++ b/common-app-api/src/test/java/org/openecomp/sdc/common/api/YamlSuffixEnumTest.java @@ -31,29 +31,6 @@ public class YamlSuffixEnumTest { return YamlSuffixEnum.YAML; } - - @Test - public void testGetSuffix() throws Exception { - YamlSuffixEnum testSubject; - String result; - - // default test - testSubject = createTestSubject(); - result = testSubject.getSuffix(); - } - - - @Test - public void testSetSuufix() throws Exception { - YamlSuffixEnum testSubject; - String suffix = ""; - - // default test - testSubject = createTestSubject(); - testSubject.setSuufix(suffix); - } - - @Test public void testGetSuffixes() throws Exception { List result; diff --git a/common-app-api/src/test/java/org/openecomp/sdc/common/datastructure/AuditingFieldsKeyTest.java b/common-app-api/src/test/java/org/openecomp/sdc/common/datastructure/AuditingFieldsKeyTest.java deleted file mode 100644 index 5e4fd9a5c2..0000000000 --- a/common-app-api/src/test/java/org/openecomp/sdc/common/datastructure/AuditingFieldsKeyTest.java +++ /dev/null @@ -1,64 +0,0 @@ -/*- - * ============LICENSE_START======================================================= - * SDC - * ================================================================================ - * Copyright (C) 2019 AT&T Intellectual Property. All rights reserved. - * ================================================================================ - * 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. - * See the License for the specific language governing permissions and - * limitations under the License. - * ============LICENSE_END========================================================= - */ - -package org.openecomp.sdc.common.datastructure; - -import org.junit.Test; - - -public class AuditingFieldsKeyTest { - - private AuditingFieldsKey createTestSubject() { - return AuditingFieldsKey.AUDIT_ACTION; - } - - - @Test - public void testGetValueClass() throws Exception { - AuditingFieldsKey testSubject; - Class result; - - // default test - testSubject = createTestSubject(); - result = testSubject.getValueClass(); - } - - - @Test - public void testGetDisplayName() throws Exception { - AuditingFieldsKey testSubject; - String result; - - // default test - testSubject = createTestSubject(); - result = testSubject.getDisplayName(); - } - - - @Test - public void testSetDisplayName() throws Exception { - AuditingFieldsKey testSubject; - String displayName = ""; - - // default test - testSubject = createTestSubject(); - testSubject.setDisplayName(displayName); - } -} diff --git a/common-app-api/src/test/java/org/openecomp/sdc/common/datastructure/MonitoringFieldsKeysEnumTest.java b/common-app-api/src/test/java/org/openecomp/sdc/common/datastructure/MonitoringFieldsKeysEnumTest.java deleted file mode 100644 index 16817a12c4..0000000000 --- a/common-app-api/src/test/java/org/openecomp/sdc/common/datastructure/MonitoringFieldsKeysEnumTest.java +++ /dev/null @@ -1,64 +0,0 @@ -/*- - * ============LICENSE_START======================================================= - * SDC - * ================================================================================ - * Copyright (C) 2019 AT&T Intellectual Property. All rights reserved. - * ================================================================================ - * 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. - * See the License for the specific language governing permissions and - * limitations under the License. - * ============LICENSE_END========================================================= - */ - -package org.openecomp.sdc.common.datastructure; - -import org.junit.Test; - - -public class MonitoringFieldsKeysEnumTest { - - private MonitoringFieldsKeysEnum createTestSubject() { - return MonitoringFieldsKeysEnum.MONITORING_APP_ID; - } - - - @Test - public void testGetValueClass() throws Exception { - MonitoringFieldsKeysEnum testSubject; - Class result; - - // default test - testSubject = createTestSubject(); - result = testSubject.getValueClass(); - } - - - @Test - public void testGetDisplayName() throws Exception { - MonitoringFieldsKeysEnum testSubject; - String result; - - // default test - testSubject = createTestSubject(); - result = testSubject.getDisplayName(); - } - - - @Test - public void testSetDisplayName() throws Exception { - MonitoringFieldsKeysEnum testSubject; - String displayName = ""; - - // default test - testSubject = createTestSubject(); - testSubject.setDisplayName(displayName); - } -} diff --git a/common-be/src/main/java/org/openecomp/sdc/be/datatypes/enums/GraphPropertyEnum.java b/common-be/src/main/java/org/openecomp/sdc/be/datatypes/enums/GraphPropertyEnum.java index 1f1c01f9a4..70f76030bd 100644 --- a/common-be/src/main/java/org/openecomp/sdc/be/datatypes/enums/GraphPropertyEnum.java +++ b/common-be/src/main/java/org/openecomp/sdc/be/datatypes/enums/GraphPropertyEnum.java @@ -18,8 +18,11 @@ package org.openecomp.sdc.be.datatypes.enums; import java.util.ArrayList; import java.util.List; import java.util.Map; +import lombok.AllArgsConstructor; +import lombok.Getter; - +@AllArgsConstructor +@Getter public enum GraphPropertyEnum { // field name ,class type ,unique ,indexed @@ -59,25 +62,16 @@ public enum GraphPropertyEnum { IS_ARCHIVED("isArchived", Boolean.class, false, true), IS_VSP_ARCHIVED("isVspArchived", Boolean.class, false, true), ARCHIVE_TIME("archiveTime", Long.class, false, true), - PREV_CATALOG_UPDATE_TIME ("previousUpdateTime", Long.class, false, true), - CURRENT_CATALOG_UPDATE_TIME ("currentUpdateTime", Long.class, false, true), + PREV_CATALOG_UPDATE_TIME("previousUpdateTime", Long.class, false, true), + CURRENT_CATALOG_UPDATE_TIME("currentUpdateTime", Long.class, false, true), //Healing HEALING_VERSION("healVersion", Integer.class, false, true); - - - private String property; - private Class clazz; - private boolean unique; - private boolean indexed; - - GraphPropertyEnum(String property, Class clazz, boolean unique, boolean indexed) { - this.property = property; - this.clazz = clazz; - this.unique = unique; - this.indexed = indexed; - } + private final String property; + private final Class clazz; + private final boolean unique; + private final boolean indexed; public static GraphPropertyEnum getByProperty(String property) { for (GraphPropertyEnum currProperty : GraphPropertyEnum.values()) { @@ -88,38 +82,6 @@ public enum GraphPropertyEnum { return null; } - public String getProperty() { - return property; - } - - public void setProperty(String property) { - this.property = property; - } - - public Class getClazz() { - return clazz; - } - - public void setClazz(Class clazz) { - this.clazz = clazz; - } - - public boolean isUnique() { - return unique; - } - - public void setUnique(boolean unique) { - this.unique = unique; - } - - public boolean isIndexed() { - return indexed; - } - - public void setIndexed(boolean indexed) { - this.indexed = indexed; - } - public static List getAllProperties() { List arrayList = new ArrayList<>(); diff --git a/common-be/src/main/java/org/openecomp/sdc/be/datatypes/enums/JsonPresentationFields.java b/common-be/src/main/java/org/openecomp/sdc/be/datatypes/enums/JsonPresentationFields.java index 46a3f99abc..41c04e77b2 100644 --- a/common-be/src/main/java/org/openecomp/sdc/be/datatypes/enums/JsonPresentationFields.java +++ b/common-be/src/main/java/org/openecomp/sdc/be/datatypes/enums/JsonPresentationFields.java @@ -17,7 +17,13 @@ package org.openecomp.sdc.be.datatypes.enums; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; +import lombok.AllArgsConstructor; +import lombok.Getter; +import lombok.ToString; +@AllArgsConstructor +@Getter +@ToString(onlyExplicitlyIncluded = true) public enum JsonPresentationFields { UNIQUE_ID("uniqueId", GraphPropertyEnum.UNIQUE_ID), @@ -256,32 +262,16 @@ public enum JsonPresentationFields { TOSCA_DEFINITIONS_VERSION("tosca_definitions_version", null); - - private String presentation; - private GraphPropertyEnum storedAs; - - JsonPresentationFields(String presentation, GraphPropertyEnum storedAs) { - this.presentation = presentation; - this.storedAs = storedAs; - } + @ToString.Include + private final String presentation; + @ToString.Exclude + private final GraphPropertyEnum storedAs; @JsonValue public String getPresentation() { return presentation; } - public void setPresentation(String presentation) { - this.presentation = presentation; - } - - public GraphPropertyEnum getStoredAs() { - return storedAs; - } - - public void setStoredAs(GraphPropertyEnum storedAs) { - this.storedAs = storedAs; - } - public static String getPresentationByGraphProperty(GraphPropertyEnum property) { for (JsonPresentationFields currPresentation : JsonPresentationFields.values()) { if (currPresentation.getStoredAs() == property) { @@ -291,12 +281,6 @@ public enum JsonPresentationFields { return null; } - @Override - public String toString() { - // TODO Auto-generated method stub - return presentation; - } - @JsonCreator public static JsonPresentationFields getByPresentation(String presentation) { for (JsonPresentationFields inst : JsonPresentationFields.values()) { diff --git a/common-be/src/test/java/org/openecomp/sdc/be/datatypes/enums/GraphPropertyEnumTest.java b/common-be/src/test/java/org/openecomp/sdc/be/datatypes/enums/GraphPropertyEnumTest.java index 63d1384cda..c4165d4cc0 100644 --- a/common-be/src/test/java/org/openecomp/sdc/be/datatypes/enums/GraphPropertyEnumTest.java +++ b/common-be/src/test/java/org/openecomp/sdc/be/datatypes/enums/GraphPropertyEnumTest.java @@ -40,86 +40,6 @@ public class GraphPropertyEnumTest { result = GraphPropertyEnum.getByProperty(GraphPropertyEnum.COMPONENT_TYPE.getProperty()); } - @Test - public void testGetProperty() throws Exception { - GraphPropertyEnum testSubject; - String result; - - // default test - testSubject = createTestSubject(); - result = testSubject.getProperty(); - } - - @Test - public void testSetProperty() throws Exception { - GraphPropertyEnum testSubject; - String property = ""; - - // default test - testSubject = createTestSubject(); - testSubject.setProperty(property); - } - - @Test - public void testGetClazz() throws Exception { - GraphPropertyEnum testSubject; - Class result; - - // default test - testSubject = createTestSubject(); - result = testSubject.getClazz(); - } - - @Test - public void testSetClazz() throws Exception { - GraphPropertyEnum testSubject; - Class clazz = null; - - // default test - testSubject = createTestSubject(); - testSubject.setClazz(clazz); - } - - @Test - public void testIsUnique() throws Exception { - GraphPropertyEnum testSubject; - boolean result; - - // default test - testSubject = createTestSubject(); - result = testSubject.isUnique(); - } - - @Test - public void testSetUnique() throws Exception { - GraphPropertyEnum testSubject; - boolean unique = false; - - // default test - testSubject = createTestSubject(); - testSubject.setUnique(unique); - } - - @Test - public void testIsIndexed() throws Exception { - GraphPropertyEnum testSubject; - boolean result; - - // default test - testSubject = createTestSubject(); - result = testSubject.isIndexed(); - } - - @Test - public void testSetIndexed() throws Exception { - GraphPropertyEnum testSubject; - boolean indexed = false; - - // default test - testSubject = createTestSubject(); - testSubject.setIndexed(indexed); - } - @Test public void testGetAllProperties() throws Exception { List result; diff --git a/common-be/src/test/java/org/openecomp/sdc/be/datatypes/enums/JsonPresentationFieldsTest.java b/common-be/src/test/java/org/openecomp/sdc/be/datatypes/enums/JsonPresentationFieldsTest.java index b0dc9aaef4..f31b6df3a1 100644 --- a/common-be/src/test/java/org/openecomp/sdc/be/datatypes/enums/JsonPresentationFieldsTest.java +++ b/common-be/src/test/java/org/openecomp/sdc/be/datatypes/enums/JsonPresentationFieldsTest.java @@ -28,46 +28,6 @@ public class JsonPresentationFieldsTest { return JsonPresentationFields.API_URL; } - @Test - public void testGetPresentation() throws Exception { - JsonPresentationFields testSubject; - String result; - - // default test - testSubject = createTestSubject(); - result = testSubject.getPresentation(); - } - - @Test - public void testSetPresentation() throws Exception { - JsonPresentationFields testSubject; - String presentation = ""; - - // default test - testSubject = createTestSubject(); - testSubject.setPresentation(presentation); - } - - @Test - public void testGetStoredAs() throws Exception { - JsonPresentationFields testSubject; - GraphPropertyEnum result; - - // default test - testSubject = createTestSubject(); - result = testSubject.getStoredAs(); - } - - @Test - public void testSetStoredAs() throws Exception { - JsonPresentationFields testSubject; - GraphPropertyEnum storedAs = null; - - // default test - testSubject = createTestSubject(); - testSubject.setStoredAs(storedAs); - } - @Test public void testGetPresentationByGraphProperty() throws Exception { GraphPropertyEnum property = null; @@ -78,16 +38,6 @@ public class JsonPresentationFieldsTest { result = JsonPresentationFields.getPresentationByGraphProperty(GraphPropertyEnum.INVARIANT_UUID); } - @Test - public void testToString() throws Exception { - JsonPresentationFields testSubject; - String result; - - // default test - testSubject = createTestSubject(); - result = testSubject.toString(); - } - @Test public void testGetByPresentation() throws Exception { String presentation = ""; diff --git a/onboarding/pom.xml b/onboarding/pom.xml index 3458964511..034c642de3 100644 --- a/onboarding/pom.xml +++ b/onboarding/pom.xml @@ -135,7 +135,7 @@ org.apache.commons commons-text - 1.3 + ${apache-commons-text.version} com.beust diff --git a/openecomp-be/lib/openecomp-common-lib/pom.xml b/openecomp-be/lib/openecomp-common-lib/pom.xml index a2a36c3cab..9ffb3c5284 100644 --- a/openecomp-be/lib/openecomp-common-lib/pom.xml +++ b/openecomp-be/lib/openecomp-common-lib/pom.xml @@ -46,6 +46,7 @@ org.apache.commons commons-text + ${apache-commons-text.version} com.fasterxml.jackson.core diff --git a/openecomp-be/lib/openecomp-heat-lib/src/main/java/org/openecomp/sdc/heat/datatypes/model/HeatPseudoParameters.java b/openecomp-be/lib/openecomp-heat-lib/src/main/java/org/openecomp/sdc/heat/datatypes/model/HeatPseudoParameters.java index 7ed8203bfe..73020bcbcf 100644 --- a/openecomp-be/lib/openecomp-heat-lib/src/main/java/org/openecomp/sdc/heat/datatypes/model/HeatPseudoParameters.java +++ b/openecomp-be/lib/openecomp-heat-lib/src/main/java/org/openecomp/sdc/heat/datatypes/model/HeatPseudoParameters.java @@ -23,33 +23,27 @@ package org.openecomp.sdc.heat.datatypes.model; import java.util.ArrayList; import java.util.List; +import lombok.AllArgsConstructor; import lombok.Getter; +@AllArgsConstructor @Getter public enum HeatPseudoParameters { OS_STACK_NAME("OS::stack_name"), OS_STACK_ID("OS::stack_id"), OS_PROJECT_ID("OS::project_id"); - private static List pseudoParameterNames; - private String pseudoParameter; + private static final List pseudoParameterNames = new ArrayList<>(); + private final String pseudoParameter; static { - pseudoParameterNames = new ArrayList<>(); - for (HeatPseudoParameters parameter : HeatPseudoParameters.values()) { + for (HeatPseudoParameters parameter : values()) { pseudoParameterNames.add(parameter.getPseudoParameter()); } } - HeatPseudoParameters(String pseudoParameter) { - this.pseudoParameter = pseudoParameter; - } - public static List getPseudoParameterNames() { return pseudoParameterNames; } - public static void setPseudoParameterNames(List pseudoParameterNames) { - HeatPseudoParameters.pseudoParameterNames = pseudoParameterNames; - } } diff --git a/openecomp-be/tools/zusammen-tools/src/main/java/org/openecomp/core/tools/exportinfo/ExportSerializer.java b/openecomp-be/tools/zusammen-tools/src/main/java/org/openecomp/core/tools/exportinfo/ExportSerializer.java index b41f74fc69..3454b99dc2 100644 --- a/openecomp-be/tools/zusammen-tools/src/main/java/org/openecomp/core/tools/exportinfo/ExportSerializer.java +++ b/openecomp-be/tools/zusammen-tools/src/main/java/org/openecomp/core/tools/exportinfo/ExportSerializer.java @@ -53,8 +53,8 @@ public class ExportSerializer { public void serializeResult(final ResultSet resultSet, final Set filteredItems, final String filteredColumn, Set vlms) { try { TableData tableData = new TableData(); - tableData.definitions = resultSet.getColumnDefinitions().asList().stream().map(ColumnDefinition::new).collect(Collectors.toList()); - String table = tableData.definitions.iterator().next().getTable(); + tableData.getDefinitions().addAll(resultSet.getColumnDefinitions().asList().stream().map(ColumnDefinition::new).collect(Collectors.toList())); + String table = tableData.getDefinitions().iterator().next().getTable(); boolean isElementTable = table.equals(ELEMENT_TABLE_NAME); Iterator iterator = resultSet.iterator(); iterator.forEachRemaining(row -> { @@ -62,14 +62,14 @@ public class ExportSerializer { return; } List rowData = new ArrayList<>(); - for (int i = 0; i < tableData.definitions.size(); i++) { - ColumnDefinition columnDefinition = tableData.definitions.get(i); + for (int i = 0; i < tableData.getDefinitions().size(); i++) { + ColumnDefinition columnDefinition = tableData.getDefinitions().get(i); Name name = dataTypesMap.get(columnDefinition.getType()); boolean checkForVLM = isElementTable && columnDefinition.getName().equals(ELEMENT_INFO_COLUMN_NAME); Object data = convertByType(vlms, row, i, name, checkForVLM); rowData.add(data.toString()); } - tableData.rows.add(rowData); + tableData.getRows().add(rowData); }); ObjectMapper objectMapper = new ObjectMapper(); String fileName = ImportProperties.ROOT_DIRECTORY + File.separator + table + "_" + System.currentTimeMillis() + ".json"; diff --git a/openecomp-be/tools/zusammen-tools/src/main/java/org/openecomp/core/tools/importinfo/ImportSingleTable.java b/openecomp-be/tools/zusammen-tools/src/main/java/org/openecomp/core/tools/importinfo/ImportSingleTable.java index 40486c8269..64c595caa5 100644 --- a/openecomp-be/tools/zusammen-tools/src/main/java/org/openecomp/core/tools/importinfo/ImportSingleTable.java +++ b/openecomp-be/tools/zusammen-tools/src/main/java/org/openecomp/core/tools/importinfo/ImportSingleTable.java @@ -61,7 +61,7 @@ public class ImportSingleTable { TableData tableData = objectMapper.readValue(file.toFile(), TableData.class); Session session = CassandraSessionFactory.getSession(); PreparedStatement ps = getPrepareStatement(tableData, session); - tableData.rows.forEach(row -> executeQuery(session, ps, tableData.definitions, row)); + tableData.getRows().forEach(row -> executeQuery(session, ps, tableData.getDefinitions(), row)); } catch (IOException e) { Utils.logError(logger, e); } @@ -153,12 +153,12 @@ public class ImportSingleTable { } private String createQuery(TableData tableData) { - ColumnDefinition def = tableData.definitions.iterator().next(); + ColumnDefinition def = tableData.getDefinitions().iterator().next(); StringBuilder sb = new StringBuilder(1024); sb.append(INSERT_INTO).append(def.getKeyspace()).append(".").append(def.getTable()); - sb.append(tableData.definitions.stream().map(ColumnDefinition::getName) + sb.append(tableData.getDefinitions().stream().map(ColumnDefinition::getName) .collect(Collectors.joining(" , ", " ( ", " ) "))); - sb.append(VALUES).append(tableData.definitions.stream().map(definition -> "?") + sb.append(VALUES).append(tableData.getDefinitions().stream().map(definition -> "?") .collect(Collectors.joining(" , ", " ( ", " ) "))).append(";"); return sb.toString(); } diff --git a/openecomp-be/tools/zusammen-tools/src/main/java/org/openecomp/core/tools/model/TableData.java b/openecomp-be/tools/zusammen-tools/src/main/java/org/openecomp/core/tools/model/TableData.java index a6fdbd801e..77b6ca1b76 100644 --- a/openecomp-be/tools/zusammen-tools/src/main/java/org/openecomp/core/tools/model/TableData.java +++ b/openecomp-be/tools/zusammen-tools/src/main/java/org/openecomp/core/tools/model/TableData.java @@ -21,8 +21,10 @@ package org.openecomp.core.tools.model; import java.util.ArrayList; import java.util.List; +import lombok.Getter; +@Getter public class TableData { - public List definitions = new ArrayList<>(); - public List> rows = new ArrayList<>(); + private final List definitions = new ArrayList<>(); + private final List> rows = new ArrayList<>(); } diff --git a/pom.xml b/pom.xml index 7bbdf53de6..6b727da9aa 100644 --- a/pom.xml +++ b/pom.xml @@ -20,51 +20,52 @@ Modifications copyright (c) 2018-2019 Nokia ================================================================================ --> - 4.0.0 - - org.openecomp.sdc - sdc-main - 1.7.1-SNAPSHOT - pom - sdc - - - org.onap.oparent - oparent - 2.0.0 - - - - - UTF-8 - - ${project.version} - - - 0.11 - 3.10 - 18.0 - 0.3.1 - 4.3.18.RELEASE - 2.27 - 4.1.48.Final - 3.1.0 - 2.26.3 - 2.6.0 - 4.3.1.0 - 2.1.8 - 1.18.12 - 1.9.4 - 2.3 - 4.1.0 - 1.6.1 - - 4.1 - 2.1 - - 9.4.18.v20190429 + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> + 4.0.0 + + org.openecomp.sdc + sdc-main + 1.7.1-SNAPSHOT + pom + sdc + + + org.onap.oparent + oparent + 2.0.0 + + + + + UTF-8 + + ${project.version} + + + 0.11 + 3.10 + 18.0 + 0.3.1 + 4.3.18.RELEASE + 2.27 + 4.1.48.Final + 3.1.0 + 2.26.3 + 2.6.0 + 4.3.1.0 + 2.1.8 + 1.18.12 + 1.9.4 + 2.3 + 4.1.0 + 1.6.1 + 1.9 + + 4.1 + 2.1 + + 9.4.18.v20190429 2.11.0 @@ -73,651 +74,651 @@ Modifications copyright (c) 2018-2019 Nokia 2.1.1 false - - 1.14 - 4.7 - 4.5.3 - 4.4.1 - 1.1 - - - - 1.2.3 - 1.7.25 - 1.10 - 1.2 - 3.0.6 - 2.13.1 - - - 0.20.1 - 1.8.4 - 1.7.4 - 0.13.2 - - - - 1.6.4 - - 3.0.3 - - - 2.3.1 - - - 1.1 - - - 3.3.3 - 3.3.3 - 1.35 - 4.12 - 1.6.0 - 5.6.0 - 3.16.0 - 7.2.0 - 5.6.0 - 0.11 - 2.1 - 1.3 - 2.22.2 - 2.4 - - - 1.6.5 - - - ${project.version} - ${project.basedir}/node/node - ${project.build.directory}/surefire-reports - - ${project.build.directory}/code-coverage/lcov.info - - - ${project.reporting.outputDirectory}/jacoco-ut/jacoco.xml - - ${project.build.sourceEncoding} - ${project.basedir} - pom.xml,src/test - - 3.8.0 - - nexus - nexus - - - https://registry.npmjs.org/ - https://nexus.onap.org - /content/sites/site/org/openecomp/sdc/${project.version} - 176c31dfe190a - - yyyyMMdd'T'HHmmss'Z' - - ${project.version}-${maven.build.timestamp} - - 2.6.1.Final - - 2.9.9 - - - 1.6.0 - - 0.8.5 - 4.5.1 - - - 1C - true - - - - - - com.google.guava - guava - ${guava.version} - - - - org.glassfish.jersey.ext - jersey-bean-validation - ${jersey-bom.version} - - - - org.glassfish.hk2.external - asm-all-repackaged - 2.4.0 - - - - org.assertj - assertj-core - ${assertj.version} - - - - org.jmockit - jmockit - ${jmockit.version} - - - - com.github.tomakehurst - wiremock-standalone - ${wire-mock.version} - - - - io.cucumber - cucumber-java - ${cucumber.version} - - - - io.cucumber - cucumber-junit - ${cucumber.version} - - - - org.apache.commons - commons-lang3 - ${lang3.version} - - - org.codehaus.groovy - groovy - 2.4.13 - - - io.netty - netty-all - ${netty.version} - - - io.netty - netty-handler - ${netty.version} - - - - + + 1.14 + 4.7 + 4.5.3 + 4.4.1 + 1.1 + + + + 1.2.3 + 1.7.25 + 1.10 + 1.2 + 3.0.6 + 2.13.1 + + + 0.20.1 + 1.8.4 + 1.7.4 + 0.13.2 + + + + 1.6.4 + + 3.0.3 + + + 2.3.1 + + + 1.1 + + + 3.3.3 + 3.3.3 + 1.35 + 4.12 + 1.6.0 + 5.6.0 + 3.16.0 + 7.2.0 + 5.6.0 + 0.11 + 2.1 + 1.3 + 2.22.2 + 2.4 + + + 1.6.5 + + + ${project.version} + ${project.basedir}/node/node + ${project.build.directory}/surefire-reports + + ${project.build.directory}/code-coverage/lcov.info + + + ${project.reporting.outputDirectory}/jacoco-ut/jacoco.xml + + ${project.build.sourceEncoding} + ${project.basedir} + pom.xml,src/test + + 3.8.0 + + nexus + nexus + + + https://registry.npmjs.org/ + https://nexus.onap.org + /content/sites/site/org/openecomp/sdc/${project.version} + 176c31dfe190a + + yyyyMMdd'T'HHmmss'Z' + + ${project.version}-${maven.build.timestamp} + + 2.6.1.Final + + 2.9.9 + + + 1.6.0 + + 0.8.5 + 4.5.1 + + + 1C + true + + + - - - org.jacoco - org.jacoco.agent - runtime - ${jacoco.version} - test - - - - org.junit.jupiter - junit-jupiter-engine - ${junitJupiter.version} - test - - - - org.junit.vintage - junit-vintage-engine - ${junitJupiter.version} - test - - - - org.mockito - mockito-core - ${mockito.version} - test - + + com.google.guava + guava + ${guava.version} + + + + org.glassfish.jersey.ext + jersey-bean-validation + ${jersey-bom.version} + + + + org.glassfish.hk2.external + asm-all-repackaged + 2.4.0 + + + + org.assertj + assertj-core + ${assertj.version} + + + + org.jmockit + jmockit + ${jmockit.version} + + + + com.github.tomakehurst + wiremock-standalone + ${wire-mock.version} + + + + io.cucumber + cucumber-java + ${cucumber.version} + + + + io.cucumber + cucumber-junit + ${cucumber.version} + + + + org.apache.commons + commons-lang3 + ${lang3.version} + + + org.codehaus.groovy + groovy + 2.4.13 + + + io.netty + netty-all + ${netty.version} + + + io.netty + netty-handler + ${netty.version} + - - - - - org.apache.maven.plugins - maven-javadoc-plugin - 3.0.1 - - false - org.umlgraph.doclet.UmlGraphDoc - - org.umlgraph - umlgraph - 5.6 - - true - - - - - - - - - - org.jacoco - jacoco-maven-plugin - ${jacoco.version} - - - org.apache.maven.plugins - maven-assembly-plugin - 3.1.0 - - posix - - - - - org.codehaus.mojo - exec-maven-plugin - 1.6.0 - - - org.sonarsource.scanner.maven - sonar-maven-plugin - 3.7.0.1746 - - - org.apache.maven.plugins - maven-clean-plugin - 3.1.0 - - - ru.yaal.maven - write-text-files-maven-plugin - 1.1 - - - org.codehaus.gmaven - gmaven-plugin - 1.5 - - - org.codehaus.mojo - build-helper-maven-plugin - 3.2.0 - - - org.apache.maven.plugins - maven-deploy-plugin - 2.8.2 - - - org.apache.maven.plugins - maven-shade-plugin - 3.1.1 - - - org.apache.maven.plugins - maven-resources-plugin - 3.2.0 - - - io.fabric8 - docker-maven-plugin - 0.31.0 - - - org.apache.maven.plugins - maven-war-plugin - 3.2.2 - - - com.github.eirslett - frontend-maven-plugin - 1.8.0 - - - org.apache.maven.plugins - maven-surefire-plugin - ${maven-surefire-plugin.version} - - - org.apache.maven.plugins - maven-failsafe-plugin - ${maven-surefire-plugin.version} - - - org.apache.maven.plugins - maven-compiler-plugin - 3.8.0 - - - com.github.sylvainlaurent.maven - yaml-json-validator-maven-plugin - 1.0.2 - - - pl.project13.maven - git-commit-id-plugin - 4.0.0 - - - - - - - maven-checkstyle-plugin - 2.17 - - checkstyle-suppressions.xml - checkstyle.suppressions.file - ${checkstyle.skip} - - - - - org.codehaus.mojo - build-helper-maven-plugin - - - parse-version - pre-clean - - parse-version - - - - - - - - org.jacoco - jacoco-maven-plugin - false - - - default-instrument - - instrument - - - - default-restore-instrumented-classes - - restore-instrumented-classes - - - - default-report - - report - - - ${project.build.directory}/jacoco.exec - - - - - - - org.apache.maven.plugins - maven-site-plugin - 3.7.1 - - - org.apache.maven.wagon - wagon-webdav-jackrabbit - 3.0.0 - - - - - - - org.codehaus.gmaven - gmaven-plugin - - - false - integration-test - - execute - - - - pom.properties['deploy.url'] = - pom.version.contains('-SNAPSHOT') ? - project.distributionManagement.snapshotRepository.url : - project.distributionManagement.repository.url; - pom.properties['repo.id'] = pom.version.contains('-SNAPSHOT') ? - project.distributionManagement.snapshotRepository.id : - project.distributionManagement.repository.id; - - - - - - - org.apache.maven.plugins - maven-compiler-plugin - - 1.8 - 1.8 - - - - org.apache.maven.plugins - maven-surefire-plugin - - - org.apache.maven.surefire - surefire-junit-platform - ${maven-surefire-plugin.version} - - - - false - - ${project.build.directory}/jacoco.exec - - ${surefire.forkCount} - ${surefire.reuseForks} - methods - - - - pl.project13.maven - git-commit-id-plugin - - - - revision - - - - - true - ${project.build.outputDirectory}/META-INF/git.properties - - true - false - - git.build.version - git.build.time - git.commit.id - git.commit.time - git.commit.user.name - git.commit.user.email - git.commit.message.short - git.commit.message.full - - - true - - false - - - - - - - - all - - true - - - true - - - onboarding - common-app-logging - common-app-api - common-be - catalog-dao - catalog-model - catalog-be - catalog-be-plugins - asdctool - catalog-ui - catalog-fe - sdc-os-chef - utils/webseal-simulator - integration-tests - - - - skip-integration-tests - - - skipITs - true - - - - true - - - onboarding - common-app-logging - common-app-api - common-be - catalog-dao - catalog-model - catalog-be - asdctool - catalog-ui - catalog-fe - sdc-os-chef - utils/webseal-simulator - - - - fast-build - - false - - - true - true - true - true - - - onboarding - common-app-logging - common-app-api - common-be - catalog-be-plugins - catalog-dao - catalog-model - catalog-be - asdctool - catalog-ui - catalog-fe - sdc-os-chef - utils/webseal-simulator - - - - start-sdc - - false - - - true - true - true - true - true - - - integration-tests - - - - stop-sdc - - false - - - true - true - true - true - true - - - integration-tests - - - - run-integration-tests - - false - - - true - true - true - - - integration-tests - - - - - - - - ecomp-releases - Release Repository - ${nexus.proxy}/content/repositories/releases/ - - - ecomp-snapshots - Snapshots Repository - ${nexus.proxy}/content/repositories/snapshots/ - - - ecomp-public - Public Repository - ${nexus.proxy}/content/repositories/public/ - - - - - - - ecomp-releases - Release Repository - ${nexus.proxy}/content/repositories/releases/ - - - ecomp-snapshots - Snapshot Repository - ${nexus.proxy}/content/repositories/snapshots/ - - - ecomp-site - dav:${nexus.proxy}${sitePath} - - + + + + + + org.jacoco + org.jacoco.agent + runtime + ${jacoco.version} + test + + + + org.junit.jupiter + junit-jupiter-engine + ${junitJupiter.version} + test + + + + org.junit.vintage + junit-vintage-engine + ${junitJupiter.version} + test + + + + org.mockito + mockito-core + ${mockito.version} + test + + + + + + + org.apache.maven.plugins + maven-javadoc-plugin + 3.0.1 + + false + org.umlgraph.doclet.UmlGraphDoc + + org.umlgraph + umlgraph + 5.6 + + true + + + + + + + + + + org.jacoco + jacoco-maven-plugin + ${jacoco.version} + + + org.apache.maven.plugins + maven-assembly-plugin + 3.1.0 + + posix + + + + + org.codehaus.mojo + exec-maven-plugin + 1.6.0 + + + org.sonarsource.scanner.maven + sonar-maven-plugin + 3.7.0.1746 + + + org.apache.maven.plugins + maven-clean-plugin + 3.1.0 + + + ru.yaal.maven + write-text-files-maven-plugin + 1.1 + + + org.codehaus.gmaven + gmaven-plugin + 1.5 + + + org.codehaus.mojo + build-helper-maven-plugin + 3.2.0 + + + org.apache.maven.plugins + maven-deploy-plugin + 2.8.2 + + + org.apache.maven.plugins + maven-shade-plugin + 3.1.1 + + + org.apache.maven.plugins + maven-resources-plugin + 3.2.0 + + + io.fabric8 + docker-maven-plugin + 0.31.0 + + + org.apache.maven.plugins + maven-war-plugin + 3.2.2 + + + com.github.eirslett + frontend-maven-plugin + 1.8.0 + + + org.apache.maven.plugins + maven-surefire-plugin + ${maven-surefire-plugin.version} + + + org.apache.maven.plugins + maven-failsafe-plugin + ${maven-surefire-plugin.version} + + + org.apache.maven.plugins + maven-compiler-plugin + 3.8.0 + + + com.github.sylvainlaurent.maven + yaml-json-validator-maven-plugin + 1.0.2 + + + pl.project13.maven + git-commit-id-plugin + 4.0.0 + + + + + + + maven-checkstyle-plugin + 2.17 + + checkstyle-suppressions.xml + checkstyle.suppressions.file + ${checkstyle.skip} + + + + + org.codehaus.mojo + build-helper-maven-plugin + + + parse-version + pre-clean + + parse-version + + + + + + + + org.jacoco + jacoco-maven-plugin + false + + + default-instrument + + instrument + + + + default-restore-instrumented-classes + + restore-instrumented-classes + + + + default-report + + report + + + ${project.build.directory}/jacoco.exec + + + + + + + org.apache.maven.plugins + maven-site-plugin + 3.7.1 + + + org.apache.maven.wagon + wagon-webdav-jackrabbit + 3.0.0 + + + + + + + org.codehaus.gmaven + gmaven-plugin + + + false + integration-test + + execute + + + + pom.properties['deploy.url'] = + pom.version.contains('-SNAPSHOT') ? + project.distributionManagement.snapshotRepository.url : + project.distributionManagement.repository.url; + pom.properties['repo.id'] = pom.version.contains('-SNAPSHOT') ? + project.distributionManagement.snapshotRepository.id : + project.distributionManagement.repository.id; + + + + + + + org.apache.maven.plugins + maven-compiler-plugin + + 1.8 + 1.8 + + + + org.apache.maven.plugins + maven-surefire-plugin + + + org.apache.maven.surefire + surefire-junit-platform + ${maven-surefire-plugin.version} + + + + false + + ${project.build.directory}/jacoco.exec + + ${surefire.forkCount} + ${surefire.reuseForks} + methods + + + + pl.project13.maven + git-commit-id-plugin + + + + revision + + + + + true + ${project.build.outputDirectory}/META-INF/git.properties + + true + false + + git.build.version + git.build.time + git.commit.id + git.commit.time + git.commit.user.name + git.commit.user.email + git.commit.message.short + git.commit.message.full + + + true + + false + + + + + + + + all + + true + + + true + + + onboarding + common-app-logging + common-app-api + common-be + catalog-dao + catalog-model + catalog-be + catalog-be-plugins + asdctool + catalog-ui + catalog-fe + sdc-os-chef + utils/webseal-simulator + integration-tests + + + + skip-integration-tests + + + skipITs + true + + + + true + + + onboarding + common-app-logging + common-app-api + common-be + catalog-dao + catalog-model + catalog-be + asdctool + catalog-ui + catalog-fe + sdc-os-chef + utils/webseal-simulator + + + + fast-build + + false + + + true + true + true + true + + + onboarding + common-app-logging + common-app-api + common-be + catalog-be-plugins + catalog-dao + catalog-model + catalog-be + asdctool + catalog-ui + catalog-fe + sdc-os-chef + utils/webseal-simulator + + + + start-sdc + + false + + + true + true + true + true + true + + + integration-tests + + + + stop-sdc + + false + + + true + true + true + true + true + + + integration-tests + + + + run-integration-tests + + false + + + true + true + true + + + integration-tests + + + + + + + + ecomp-releases + Release Repository + ${nexus.proxy}/content/repositories/releases/ + + + ecomp-snapshots + Snapshots Repository + ${nexus.proxy}/content/repositories/snapshots/ + + + ecomp-public + Public Repository + ${nexus.proxy}/content/repositories/public/ + + + + + + + ecomp-releases + Release Repository + ${nexus.proxy}/content/repositories/releases/ + + + ecomp-snapshots + Snapshot Repository + ${nexus.proxy}/content/repositories/snapshots/ + + + ecomp-site + dav:${nexus.proxy}${sitePath} + + -- cgit 1.2.3-korg