diff options
author | 2020-12-21 11:31:55 -0500 | |
---|---|---|
committer | 2020-12-21 11:32:34 -0500 | |
commit | a520d00e005db1b232b9dae0c70d4dc5d73b33e1 (patch) | |
tree | 9c0e16ce5fab9bc12da138c4d8c613bcff54516b /mod/bpgenerator/common/src | |
parent | 2f551ba584dbb70568a69144b39e6da7c55c517f (diff) |
BpGen refactor Code Quality Issue-ID: DCAEGEN2-2502
Issue-ID: DCAEGEN2-2502
Change-Id: If6e08f0bb88c9039fb27898d50d2645f79175ba4
Signed-off-by: Ravi Mantena <rx908f@att.com>
Diffstat (limited to 'mod/bpgenerator/common/src')
53 files changed, 810 insertions, 754 deletions
diff --git a/mod/bpgenerator/common/src/main/java/org/onap/blueprintgenerator/config/ObjectMapperConfig.java b/mod/bpgenerator/common/src/main/java/org/onap/blueprintgenerator/config/ObjectMapperConfig.java index fc546af..5fc646f 100644 --- a/mod/bpgenerator/common/src/main/java/org/onap/blueprintgenerator/config/ObjectMapperConfig.java +++ b/mod/bpgenerator/common/src/main/java/org/onap/blueprintgenerator/config/ObjectMapperConfig.java @@ -42,16 +42,22 @@ import org.springframework.context.annotation.Scope; @Configuration public class ObjectMapperConfig { - @Bean(name="objectMapper") + /** + * Creates Object Mapper + */ + @Bean(name = "objectMapper") @Scope(ConfigurableBeanFactory.SCOPE_SINGLETON) - public ObjectMapper objectMapper(){ + public ObjectMapper objectMapper() { return new ObjectMapper(); } - @Bean(name="yamlObjectMapper") + /** + * Creates Yaml Object Mapper + */ + @Bean(name = "yamlObjectMapper") @Scope(ConfigurableBeanFactory.SCOPE_SINGLETON) - public ObjectMapper yamlObjectMapper(){ - return new ObjectMapper(new YAMLFactory().configure(YAMLGenerator.Feature.MINIMIZE_QUOTES, true)); + public ObjectMapper yamlObjectMapper() { + return new ObjectMapper( + new YAMLFactory().configure(YAMLGenerator.Feature.MINIMIZE_QUOTES, true)); } - -}
\ No newline at end of file +} diff --git a/mod/bpgenerator/common/src/main/java/org/onap/blueprintgenerator/constants/Constants.java b/mod/bpgenerator/common/src/main/java/org/onap/blueprintgenerator/constants/Constants.java index db12c37..ac654a2 100644 --- a/mod/bpgenerator/common/src/main/java/org/onap/blueprintgenerator/constants/Constants.java +++ b/mod/bpgenerator/common/src/main/java/org/onap/blueprintgenerator/constants/Constants.java @@ -28,7 +28,7 @@ package org.onap.blueprintgenerator.constants; * @date 10/16/2020 * Application: DCAE/ONAP - Blueprint Generator * Common Module: Used by both ONAP and DCAE Blueprint Applications - * Constants: Used in ONAP and DCAE Blueprints + * Constants: Used in ONAP Blueprints */ public class Constants { @@ -46,7 +46,8 @@ public class Constants { public static final String BOOLEAN_TYPE = "boolean"; public static final String STRING_TYPE = "string"; public static final String EMPTY_VALUE = ""; - public static final String DCAE_NODES_CONTAINERIZED_SERVICE_COMPONENT_USING_DMAAP = "dcae.nodes.ContainerizedServiceComponentUsingDmaap"; + public static final String DCAE_NODES_CONTAINERIZED_SERVICE_COMPONENT_USING_DMAAP = + "dcae.nodes.ContainerizedServiceComponentUsingDmaap"; public static final String MEMORY_LIMIT_128Mi = "128Mi"; public static final String CPU_LIMIT_250m = "250m"; public static final String CPU_LIMIT = "cpu_limit"; @@ -56,7 +57,8 @@ public class Constants { public static final String CLOUDIFY_INTERFACES_LEFECYCLE = "cloudify.interfaces.lifecycle"; public static final String DCAE = "dcae"; - public static final String DCAE_NODES_CONTAINERIZED_SERVICE_COMPONENT = "dcae.nodes.ContainerizedServiceComponent"; + public static final String DCAE_NODES_CONTAINERIZED_SERVICE_COMPONENT = + "dcae.nodes.ContainerizedServiceComponent"; public static final String ONAP_NAME_DCAE = "DCAE"; public static final String POLICIES_POLICYNAME_DCAECONFIG = "DCAE.Config_"; @@ -69,11 +71,12 @@ public class Constants { public static final String WRITER_FQDN_POSTFIX = "_database_writerfqdn"; public static final boolean USE_EXISTING = true; public static final String ONAP_INPUT_CPU_LIMIT = "dcae-ves-collector_cpu_limit"; - public static final String ONAP_NODETEMPLATES = "dcae-ves-collector"; - public static final String ONAP_NODETEMPLATES_TYPE = "dcae.nodes.ContainerizedServiceComponent"; + public static final String ONAP_NODETEMPLATES = "dcae-ves-collector"; + public static final String ONAP_NODETEMPLATES_TYPE = "dcae.nodes.ContainerizedServiceComponent"; public static final String ONAP_DEFAULT250m = "\"250m\""; public static final String ONAP_SERVICE_COMPONENTNAME_OVERRIDE_DEFAULT = "\"\""; - public static final String DMAAP_NODETEMPLATES_TYPE = "dcae.nodes.ContainerizedServiceComponentUsingDmaap"; + public static final String DMAAP_NODETEMPLATES_TYPE = + "dcae.nodes.ContainerizedServiceComponentUsingDmaap"; public static final String USE_EXTERNAL_TLS_FIELD = "use_external_tls"; public static final String DEFAULT_CA = "RA"; public static final Object DEFAULT_CERT_TYPE = "P12"; @@ -81,7 +84,8 @@ public class Constants { public static final String EXTERNAL_CERT_DIRECTORY_FIELD = "external_cert_directory"; public static final String CA_NAME_FIELD = "ca_name"; public static final String CERT_TYPE_FIELD = "cert_type"; - public static final String EXTERNAL_CERTIFICATE_PARAMETERS_FIELD = "external_certificate_parameters"; + public static final String EXTERNAL_CERTIFICATE_PARAMETERS_FIELD = + "external_certificate_parameters"; public static final String CERT_DIRECTORY_FIELD = "cert_directory"; public static final String COMMON_NAME_FIELD = "common_name"; public static final String SANS_FIELD = "sans"; @@ -96,5 +100,4 @@ public class Constants { public static final String TOSCA_DATATYPES_ROOT = "tosca.datatypes.Root"; public static final String TOSCA_NODES_ROOT = "tosca.nodes.Root"; public static final String TOSCA_SIMPLE_YAML = "tosca_simple_yaml_1_0_0"; - } diff --git a/mod/bpgenerator/common/src/main/java/org/onap/blueprintgenerator/exception/BlueprintException.java b/mod/bpgenerator/common/src/main/java/org/onap/blueprintgenerator/exception/BlueprintException.java index f6ed5c7..747e327 100644 --- a/mod/bpgenerator/common/src/main/java/org/onap/blueprintgenerator/exception/BlueprintException.java +++ b/mod/bpgenerator/common/src/main/java/org/onap/blueprintgenerator/exception/BlueprintException.java @@ -28,15 +28,21 @@ package org.onap.blueprintgenerator.exception; * @date 10/16/2020 * Application: DCAE/ONAP - Blueprint Generator * Common Module: Used by both ONAP and DCAE Blueprint Applications - * Exception: For Blueprint + * Exception: To handle error messages for Blueprint */ -public class BlueprintException extends RuntimeException{ +public class BlueprintException extends RuntimeException { + /** + * Handles Blueprint Exception for Error Message + */ public BlueprintException(String errorMessage) { super(errorMessage); } + /** + * Handles Blueprint Exception for Error Message and Error + */ public BlueprintException(String errorMessage, Throwable err) { super(errorMessage, err); } diff --git a/mod/bpgenerator/common/src/main/java/org/onap/blueprintgenerator/exception/ComponentSpecException.java b/mod/bpgenerator/common/src/main/java/org/onap/blueprintgenerator/exception/ComponentSpecException.java index ff0270e..e24af19 100644 --- a/mod/bpgenerator/common/src/main/java/org/onap/blueprintgenerator/exception/ComponentSpecException.java +++ b/mod/bpgenerator/common/src/main/java/org/onap/blueprintgenerator/exception/ComponentSpecException.java @@ -28,15 +28,21 @@ package org.onap.blueprintgenerator.exception; * @date 10/16/2020 * Application: DCAE/ONAP - Blueprint Generator * Common Module: Used by both ONAP and DCAE Blueprint Applications - * Exception: For ComponentSpec + * Exception: To handle error messages for ComponentSpec */ -public class ComponentSpecException extends RuntimeException{ +public class ComponentSpecException extends RuntimeException { + /** + * Handles Component Specification Exception for Error Message + */ public ComponentSpecException(String errorMessage) { super(errorMessage); } + /** + * Handles Component Specification Exception for Error Message and Error + */ public ComponentSpecException(String errorMessage, Throwable err) { super(errorMessage, err); } diff --git a/mod/bpgenerator/common/src/main/java/org/onap/blueprintgenerator/exception/DatabasesNotFoundException.java b/mod/bpgenerator/common/src/main/java/org/onap/blueprintgenerator/exception/DatabasesNotFoundException.java index 423da79..2a441bd 100644 --- a/mod/bpgenerator/common/src/main/java/org/onap/blueprintgenerator/exception/DatabasesNotFoundException.java +++ b/mod/bpgenerator/common/src/main/java/org/onap/blueprintgenerator/exception/DatabasesNotFoundException.java @@ -28,11 +28,15 @@ package org.onap.blueprintgenerator.exception; * @date 10/16/2020 * Application: DCAE/ONAP - Blueprint Generator * Common Module: Used by both ONAP and DCAE Blueprint Applications - * Exception: For Databases Not Found + * Exception: To handle error messages for Databases Not Found */ public class DatabasesNotFoundException extends RuntimeException { - public DatabasesNotFoundException(String message) { super(message);} - + /** + * Handles Databases NotFound Exception for Error Message + */ + public DatabasesNotFoundException(String message) { + super(message); + } } diff --git a/mod/bpgenerator/common/src/main/java/org/onap/blueprintgenerator/exception/FixesException.java b/mod/bpgenerator/common/src/main/java/org/onap/blueprintgenerator/exception/FixesException.java index aa81ede..87c46b5 100644 --- a/mod/bpgenerator/common/src/main/java/org/onap/blueprintgenerator/exception/FixesException.java +++ b/mod/bpgenerator/common/src/main/java/org/onap/blueprintgenerator/exception/FixesException.java @@ -28,15 +28,21 @@ package org.onap.blueprintgenerator.exception; * @date 10/16/2020 * Application: DCAE/ONAP - Blueprint Generator * Common Module: Used by both ONAP and DCAE Blueprint Applications - * Exception: For Fixes + * Exception: To handle error messages for Fixes */ -public class FixesException extends RuntimeException{ +public class FixesException extends RuntimeException { + /** + * Handles Fixes NotFound Exception for Error Message + */ public FixesException(String errorMessage) { super(errorMessage); } + /** + * Handles Fixes Exception for Error Message and Error + */ public FixesException(String errorMessage, Throwable err) { super(errorMessage, err); } diff --git a/mod/bpgenerator/common/src/main/java/org/onap/blueprintgenerator/model/base/Blueprint.java b/mod/bpgenerator/common/src/main/java/org/onap/blueprintgenerator/model/base/Blueprint.java index a72a00d..03215cf 100644 --- a/mod/bpgenerator/common/src/main/java/org/onap/blueprintgenerator/model/base/Blueprint.java +++ b/mod/bpgenerator/common/src/main/java/org/onap/blueprintgenerator/model/base/Blueprint.java @@ -33,23 +33,19 @@ import java.util.Map; /** * @author : Ravi Mantena - * @date 10/16/2020 - * Application: DCAE/ONAP - Blueprint Generator - * Common Module: Used by both ONAP and DCAE Blueprint Applications - * Base Model: For Blueprint + * @date 10/16/2020 Application: DCAE/ONAP - Blueprint Generator Common Module: Used by both ONAP + * and DCAE Blueprint Applications Base Model: A model class which represents base Blueprint */ - @Data @JsonInclude(value = JsonInclude.Include.NON_NULL) @JsonIgnoreProperties(ignoreUnknown = true) public class Blueprint { - private String tosca_definitions_version; - - private String description; + private String tosca_definitions_version; - private List<String> imports; + private String description; - private Map<String, LinkedHashMap<String, Object>> inputs; + private List<String> imports; + private Map<String, LinkedHashMap<String, Object>> inputs; } diff --git a/mod/bpgenerator/common/src/main/java/org/onap/blueprintgenerator/model/base/Node.java b/mod/bpgenerator/common/src/main/java/org/onap/blueprintgenerator/model/base/Node.java index c3df820..3f76bb6 100644 --- a/mod/bpgenerator/common/src/main/java/org/onap/blueprintgenerator/model/base/Node.java +++ b/mod/bpgenerator/common/src/main/java/org/onap/blueprintgenerator/model/base/Node.java @@ -23,24 +23,19 @@ package org.onap.blueprintgenerator.model.base; - import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; import lombok.Data; /** * @author : Ravi Mantena - * @date 10/16/2020 - * Application: DCAE/ONAP - Blueprint Generator - * Common Module: Used by both ONAP and DCAE Blueprint Applications - * Base Model: For Node + * @date 10/16/2020 Application: DCAE/ONAP - Blueprint Generator Common Module: Used by both ONAP + * and DCAE Blueprint Applications Base Model: A model class which represents Base Node */ - @Data @JsonInclude(value = JsonInclude.Include.NON_NULL) @JsonIgnoreProperties(ignoreUnknown = true) public class Node { - private String type; - + private String type; } diff --git a/mod/bpgenerator/common/src/main/java/org/onap/blueprintgenerator/model/common/Appconfig.java b/mod/bpgenerator/common/src/main/java/org/onap/blueprintgenerator/model/common/Appconfig.java index 3a18b70..5b3cdc6 100644 --- a/mod/bpgenerator/common/src/main/java/org/onap/blueprintgenerator/model/common/Appconfig.java +++ b/mod/bpgenerator/common/src/main/java/org/onap/blueprintgenerator/model/common/Appconfig.java @@ -33,12 +33,9 @@ import java.util.Map; /** * @author : Ravi Mantena - * @date 10/16/2020 - * Application: DCAE/ONAP - Blueprint Generator - * Common Module: Used by both ONAP and DCAE Blueprint Applications - * Common Model: For App Config + * @date 10/16/2020 Application: DCAE/ONAP - Blueprint Generator Common Module: Used by both ONAP + * and DCAE Blueprint Applications Common Model: A model class which represents App Config */ - @Data @JsonInclude(value = JsonInclude.Include.NON_NULL) @JsonIgnoreProperties(ignoreUnknown = true) @@ -52,13 +49,11 @@ public class Appconfig { private Map<String, Object> params; - @JsonAnyGetter //The Map is persisted as flattened properties of the target POJO. + @JsonAnyGetter // The Map is persisted as flattened properties of the target POJO. public Map<String, Object> getParams() { return params; } - //Used in ONAP + // Used in ONAP private Calls[] service_calls; - } - diff --git a/mod/bpgenerator/common/src/main/java/org/onap/blueprintgenerator/model/common/Concat.java b/mod/bpgenerator/common/src/main/java/org/onap/blueprintgenerator/model/common/Concat.java index d3b3c01..bf3726d 100644 --- a/mod/bpgenerator/common/src/main/java/org/onap/blueprintgenerator/model/common/Concat.java +++ b/mod/bpgenerator/common/src/main/java/org/onap/blueprintgenerator/model/common/Concat.java @@ -31,18 +31,13 @@ import java.util.List; /** * @author : Ravi Mantena - * @date 10/16/2020 - * Application: DCAE/ONAP - Blueprint Generator - * Common Module: Used by both ONAP and DCAE Blueprint Applications - * Common Model: For Concat + * @date 10/16/2020 Application: DCAE/ONAP - Blueprint Generator Common Module: Used by both ONAP + * and DCAE Blueprint Applications Common Model: A model class which represents for Concat */ - @Data @JsonInclude(value = JsonInclude.Include.NON_NULL) @JsonIgnoreProperties(ignoreUnknown = true) public class Concat { - private List<Object> concat; - + private List<Object> concat; } - diff --git a/mod/bpgenerator/common/src/main/java/org/onap/blueprintgenerator/model/common/DataRouter.java b/mod/bpgenerator/common/src/main/java/org/onap/blueprintgenerator/model/common/DataRouter.java index 49e029f..203ddd5 100644 --- a/mod/bpgenerator/common/src/main/java/org/onap/blueprintgenerator/model/common/DataRouter.java +++ b/mod/bpgenerator/common/src/main/java/org/onap/blueprintgenerator/model/common/DataRouter.java @@ -23,7 +23,6 @@ package org.onap.blueprintgenerator.model.common; - import org.onap.blueprintgenerator.constants.Constants; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; @@ -31,17 +30,13 @@ import lombok.Data; /** * @author : Ravi Mantena - * @date 10/16/2020 - * Application: DCAE/ONAP - Blueprint Generator - * Common Module: Used by both ONAP and DCAE Blueprint Applications - * Common Model: For Data Router + * @date 10/16/2020 Application: DCAE/ONAP - Blueprint Generator Common Module: Used by both ONAP + * and DCAE Blueprint Applications Common Model: A model class which represents Data Router */ - @Data @JsonInclude(value = JsonInclude.Include.NON_NULL) @JsonIgnoreProperties(ignoreUnknown = true) public class DataRouter extends Dmaap { - private String type = Constants.DATA_ROUTER; - + private String type = Constants.DATA_ROUTER; } diff --git a/mod/bpgenerator/common/src/main/java/org/onap/blueprintgenerator/model/common/Dmaap.java b/mod/bpgenerator/common/src/main/java/org/onap/blueprintgenerator/model/common/Dmaap.java index de3b31e..7ed79b3 100644 --- a/mod/bpgenerator/common/src/main/java/org/onap/blueprintgenerator/model/common/Dmaap.java +++ b/mod/bpgenerator/common/src/main/java/org/onap/blueprintgenerator/model/common/Dmaap.java @@ -23,31 +23,26 @@ package org.onap.blueprintgenerator.model.common; - import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; import lombok.Data; /** * @author : Ravi Mantena - * @date 10/16/2020 - * Application: DCAE/ONAP - Blueprint Generator - * Common Module: Used by both ONAP and DCAE Blueprint Applications - * Common Model: For Dmaap + * @date 10/16/2020 Application: DCAE/ONAP - Blueprint Generator Common Module: Used by both ONAP + * and DCAE Blueprint Applications Common Model: A model class which represents Dmaap */ - @Data @JsonInclude(value = JsonInclude.Include.NON_NULL) @JsonIgnoreProperties(ignoreUnknown = true) public class Dmaap { - private Object dmaap_info; - - //Below properties are used in ONAP - private String type; + private Object dmaap_info; - private GetInput pass; + // Below properties are used in ONAP + private String type; - private GetInput user; + private GetInput pass; -}
\ No newline at end of file + private GetInput user; +} diff --git a/mod/bpgenerator/common/src/main/java/org/onap/blueprintgenerator/model/common/GetInput.java b/mod/bpgenerator/common/src/main/java/org/onap/blueprintgenerator/model/common/GetInput.java index cc87014..57dab04 100644 --- a/mod/bpgenerator/common/src/main/java/org/onap/blueprintgenerator/model/common/GetInput.java +++ b/mod/bpgenerator/common/src/main/java/org/onap/blueprintgenerator/model/common/GetInput.java @@ -23,7 +23,6 @@ package org.onap.blueprintgenerator.model.common; - import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; @@ -33,12 +32,9 @@ import lombok.NoArgsConstructor; /** * @author : Ravi Mantena - * @date 10/16/2020 - * Application: DCAE/ONAP - Blueprint Generator - * Common Module: Used by both ONAP and DCAE Blueprint Applications - * Common Model: For Get Input + * @date 10/16/2020 Application: DCAE/ONAP - Blueprint Generator Common Module: Used by both ONAP + * and DCAE Blueprint Applications Common Model: A model class which represents Get Input */ - @Data @JsonInclude(value = JsonInclude.Include.NON_NULL) @JsonIgnoreProperties(ignoreUnknown = true) @@ -46,9 +42,8 @@ import lombok.NoArgsConstructor; @NoArgsConstructor public class GetInput { - //private Object get_input; - - @JsonProperty("get_input") - private Object bpInputName; + // private Object get_input; -}
\ No newline at end of file + @JsonProperty("get_input") + private Object bpInputName; +} diff --git a/mod/bpgenerator/common/src/main/java/org/onap/blueprintgenerator/model/common/GetProperty.java b/mod/bpgenerator/common/src/main/java/org/onap/blueprintgenerator/model/common/GetProperty.java index 0514d20..2fe5c55 100644 --- a/mod/bpgenerator/common/src/main/java/org/onap/blueprintgenerator/model/common/GetProperty.java +++ b/mod/bpgenerator/common/src/main/java/org/onap/blueprintgenerator/model/common/GetProperty.java @@ -31,17 +31,13 @@ import java.util.List; /** * @author : Ravi Mantena - * @date 10/16/2020 - * Application: DCAE/ONAP - Blueprint Generator - * Common Module: Used by both ONAP and DCAE Blueprint Applications - * Common Model: For Get Property + * @date 10/16/2020 Application: DCAE/ONAP - Blueprint Generator Common Module: Used by both ONAP + * and DCAE Blueprint Applications Common Model: A model class which represents Get Property */ - @Data @JsonInclude(value = JsonInclude.Include.NON_NULL) @JsonIgnoreProperties(ignoreUnknown = true) public class GetProperty { private List<String> get_property; - } diff --git a/mod/bpgenerator/common/src/main/java/org/onap/blueprintgenerator/model/common/Imports.java b/mod/bpgenerator/common/src/main/java/org/onap/blueprintgenerator/model/common/Imports.java index eacf20e..bbeb03f 100644 --- a/mod/bpgenerator/common/src/main/java/org/onap/blueprintgenerator/model/common/Imports.java +++ b/mod/bpgenerator/common/src/main/java/org/onap/blueprintgenerator/model/common/Imports.java @@ -30,16 +30,12 @@ import java.util.List; /** * @author : Ravi Mantena - * @date 10/16/2020 - * Application: DCAE/ONAP - Blueprint Generator - * Common Module: Used by both ONAP and DCAE Blueprint Applications - * Common Model: For Imports + * @date 10/16/2020 Application: DCAE/ONAP - Blueprint Generator Common Module: Used by both ONAP + * and DCAE Blueprint Applications Common Model: A model class which represents Imports */ - @Data @JsonInclude(value = JsonInclude.Include.NON_NULL) public class Imports { - private List<String> imports; - + private List<String> imports; } diff --git a/mod/bpgenerator/common/src/main/java/org/onap/blueprintgenerator/model/common/Input.java b/mod/bpgenerator/common/src/main/java/org/onap/blueprintgenerator/model/common/Input.java index 781ce2e..0f5baf8 100644 --- a/mod/bpgenerator/common/src/main/java/org/onap/blueprintgenerator/model/common/Input.java +++ b/mod/bpgenerator/common/src/main/java/org/onap/blueprintgenerator/model/common/Input.java @@ -31,12 +31,9 @@ import java.util.List; /** * @author : Ravi Mantena - * @date 10/16/2020 - * Application: DCAE/ONAP - Blueprint Generator - * Common Module: Used by both ONAP and DCAE Blueprint Applications - * Common Model: For Input + * @date 10/16/2020 Application: DCAE/ONAP - Blueprint Generator Common Module: Used by both ONAP + * and DCAE Blueprint Applications Common Model: A model class which represents Input */ - @Data @JsonInclude(JsonInclude.Include.NON_NULL) @JsonIgnoreProperties(ignoreUnknown = true) @@ -64,9 +61,8 @@ public class Input { private boolean useDti; - //Used in ONAP + // Used in ONAP private String serviceNameOverride; private String importPath; - } diff --git a/mod/bpgenerator/common/src/main/java/org/onap/blueprintgenerator/model/common/MessageRouter.java b/mod/bpgenerator/common/src/main/java/org/onap/blueprintgenerator/model/common/MessageRouter.java index 7d96785..82cfe00 100644 --- a/mod/bpgenerator/common/src/main/java/org/onap/blueprintgenerator/model/common/MessageRouter.java +++ b/mod/bpgenerator/common/src/main/java/org/onap/blueprintgenerator/model/common/MessageRouter.java @@ -30,12 +30,9 @@ import lombok.Data; /** * @author : Ravi Mantena - * @date 10/16/2020 - * Application: DCAE/ONAP - Blueprint Generator - * Common Module: Used by both ONAP and DCAE Blueprint Applications - * Common Model: For Message Router + * @date 10/16/2020 Application: DCAE/ONAP - Blueprint Generator Common Module: Used by both ONAP + * and DCAE Blueprint Applications Common Model: A model class which represents Message Router */ - @Data @JsonInclude(value = JsonInclude.Include.NON_NULL) @JsonIgnoreProperties(ignoreUnknown = true) @@ -46,5 +43,4 @@ public class MessageRouter extends Dmaap { private Object aaf_password; private Object aaf_username; - } diff --git a/mod/bpgenerator/common/src/main/java/org/onap/blueprintgenerator/model/componentspec/base/Auxilary.java b/mod/bpgenerator/common/src/main/java/org/onap/blueprintgenerator/model/componentspec/base/Auxilary.java index 9c37163..4bfc633 100644 --- a/mod/bpgenerator/common/src/main/java/org/onap/blueprintgenerator/model/componentspec/base/Auxilary.java +++ b/mod/bpgenerator/common/src/main/java/org/onap/blueprintgenerator/model/componentspec/base/Auxilary.java @@ -23,7 +23,6 @@ package org.onap.blueprintgenerator.model.componentspec.base; - import org.onap.blueprintgenerator.model.componentspec.common.HealthCheck; import org.onap.blueprintgenerator.model.componentspec.common.Policy; import org.onap.blueprintgenerator.model.componentspec.common.Reconfigs; @@ -39,36 +38,32 @@ import java.util.Map; /** * @author : Ravi Mantena - * @date 10/16/2020 - * Application: DCAE/ONAP - Blueprint Generator - * Common Module: Used by both ONAP and DCAE Blueprint Applications - * Component Spec Model: For Auxilary + * @date 10/16/2020 Application: DCAE/ONAP - Blueprint Generator Common Module: Used by both ONAP + * and DCAE Blueprint Applications Component Spec Model: A model class which represents Auxilary of + * Componentspec */ - @Data @JsonInclude(value = JsonInclude.Include.NON_NULL) @JsonIgnoreProperties(ignoreUnknown = true) @EqualsAndHashCode public class Auxilary { - private HealthCheck healthcheck; - - private HealthCheck livehealthcheck; - - private Policy policy; + private HealthCheck healthcheck; - private Reconfigs reconfigs; + private HealthCheck livehealthcheck; - private List<LinkedHashMap<String, String>> env; + private Policy policy; - @JsonProperty(access = JsonProperty.Access.WRITE_ONLY) - private Map<String, String> databases; + private Reconfigs reconfigs; -/* @JsonProperty(access = JsonProperty.Access.WRITE_ONLY) - private Affinity affinity;*/ + private List<LinkedHashMap<String, String>> env; - @JsonProperty(access = JsonProperty.Access.WRITE_ONLY) - private Object hpa_config; + @JsonProperty(access = JsonProperty.Access.WRITE_ONLY) + private Map<String, String> databases; + /* @JsonProperty(access = JsonProperty.Access.WRITE_ONLY) + private Affinity affinity;*/ + @JsonProperty(access = JsonProperty.Access.WRITE_ONLY) + private Object hpa_config; } diff --git a/mod/bpgenerator/common/src/main/java/org/onap/blueprintgenerator/model/componentspec/base/ComponentSpec.java b/mod/bpgenerator/common/src/main/java/org/onap/blueprintgenerator/model/componentspec/base/ComponentSpec.java index e3583e7..3f7e2a6 100644 --- a/mod/bpgenerator/common/src/main/java/org/onap/blueprintgenerator/model/componentspec/base/ComponentSpec.java +++ b/mod/bpgenerator/common/src/main/java/org/onap/blueprintgenerator/model/componentspec/base/ComponentSpec.java @@ -33,12 +33,10 @@ import lombok.Data; /** * @author : Ravi Mantena - * @date 10/16/2020 - * Application: DCAE/ONAP - Blueprint Generator - * Common Module: Used by both ONAP and DCAE Blueprint Applications - * Component Spec Model: For ComponentSpec + * @date 10/16/2020 Application: DCAE/ONAP - Blueprint Generator Common Module: Used by both ONAP + * and DCAE Blueprint Applications Component Spec Model: A model class which represents base + * ComponentSpec */ - @Data @JsonInclude(value = JsonInclude.Include.NON_NULL) @JsonIgnoreProperties(ignoreUnknown = true) @@ -51,5 +49,4 @@ public class ComponentSpec { private Parameters[] parameters; private Artifacts[] artifacts; - } diff --git a/mod/bpgenerator/common/src/main/java/org/onap/blueprintgenerator/model/componentspec/common/Artifacts.java b/mod/bpgenerator/common/src/main/java/org/onap/blueprintgenerator/model/componentspec/common/Artifacts.java index 0ae1c1a..e482ab3 100644 --- a/mod/bpgenerator/common/src/main/java/org/onap/blueprintgenerator/model/componentspec/common/Artifacts.java +++ b/mod/bpgenerator/common/src/main/java/org/onap/blueprintgenerator/model/componentspec/common/Artifacts.java @@ -23,7 +23,6 @@ package org.onap.blueprintgenerator.model.componentspec.common; - import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; import lombok.Data; @@ -31,19 +30,17 @@ import lombok.EqualsAndHashCode; /** * @author : Ravi Mantena - * @date 10/16/2020 - * Application: DCAE/ONAP - Blueprint Generator - * Common Module: Used by both ONAP and DCAE Blueprint Applications - * Component Spec Model: For Artifacts + * @date 10/16/2020 Application: DCAE/ONAP - Blueprint Generator Common Module: Used by both ONAP + * and DCAE Blueprint Applications Component Spec Model: A model class which represents Artifacts + * used in Componentspec */ - @Data @JsonInclude(value = JsonInclude.Include.NON_NULL) @JsonIgnoreProperties(ignoreUnknown = true) @EqualsAndHashCode public class Artifacts { - private String type; + private String type; - private String uri; + private String uri; } diff --git a/mod/bpgenerator/common/src/main/java/org/onap/blueprintgenerator/model/componentspec/common/Calls.java b/mod/bpgenerator/common/src/main/java/org/onap/blueprintgenerator/model/componentspec/common/Calls.java index 752040d..2b27b76 100644 --- a/mod/bpgenerator/common/src/main/java/org/onap/blueprintgenerator/model/componentspec/common/Calls.java +++ b/mod/bpgenerator/common/src/main/java/org/onap/blueprintgenerator/model/componentspec/common/Calls.java @@ -23,28 +23,24 @@ package org.onap.blueprintgenerator.model.componentspec.common; - import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; import lombok.Data; /** * @author : Ravi Mantena - * @date 10/16/2020 - * Application: DCAE/ONAP - Blueprint Generator - * Common Module: Used by both ONAP and DCAE Blueprint Applications - * Component Spec Model: For Calls + * @date 10/16/2020 Application: DCAE/ONAP - Blueprint Generator Common Module: Used by both ONAP + * and DCAE Blueprint Applications Component Spec Model: A model class which represents Calls used + * in Componentspec */ - @Data @JsonInclude(value = JsonInclude.Include.NON_NULL) @JsonIgnoreProperties(ignoreUnknown = true) public class Calls { - private String config_key; - - private RequestResponse request; + private String config_key; - private RequestResponse response; + private RequestResponse request; + private RequestResponse response; } diff --git a/mod/bpgenerator/common/src/main/java/org/onap/blueprintgenerator/model/componentspec/common/Constraints.java b/mod/bpgenerator/common/src/main/java/org/onap/blueprintgenerator/model/componentspec/common/Constraints.java index cb248b9..d2b0f7b 100644 --- a/mod/bpgenerator/common/src/main/java/org/onap/blueprintgenerator/model/componentspec/common/Constraints.java +++ b/mod/bpgenerator/common/src/main/java/org/onap/blueprintgenerator/model/componentspec/common/Constraints.java @@ -29,32 +29,30 @@ import lombok.Data; /** * @author : Ravi Mantena - * @date 10/16/2020 - * Application: DCAE/ONAP - Blueprint Generator - * Common Module: Used by both ONAP and DCAE Blueprint Applications - * Component Spec Model: For Constraints + * @date 10/16/2020 Application: DCAE/ONAP - Blueprint Generator Common Module: Used by both ONAP + * and DCAE Blueprint Applications Component Spec Model: A model class which represents Constraints + * used in Componentspec */ - @Data @JsonInclude(value = JsonInclude.Include.NON_NULL) @JsonIgnoreProperties(ignoreUnknown = true) public class Constraints { - private Object equal; + private Object equal; - private int greater_than; + private int greater_than; - private int greater_or_equal; + private int greater_or_equal; - private int less_than; + private int less_than; - private int less_or_equal; + private int less_or_equal; - private Object[] valid_values; + private Object[] valid_values; - private int length; + private int length; - private int min_length; + private int min_length; - private int max_length; + private int max_length; } diff --git a/mod/bpgenerator/common/src/main/java/org/onap/blueprintgenerator/model/componentspec/common/Container.java b/mod/bpgenerator/common/src/main/java/org/onap/blueprintgenerator/model/componentspec/common/Container.java index 3157338..5f56ed6 100644 --- a/mod/bpgenerator/common/src/main/java/org/onap/blueprintgenerator/model/componentspec/common/Container.java +++ b/mod/bpgenerator/common/src/main/java/org/onap/blueprintgenerator/model/componentspec/common/Container.java @@ -29,18 +29,16 @@ import lombok.EqualsAndHashCode; /** * @author : Ravi Mantena - * @date 10/16/2020 - * Application: DCAE/ONAP - Blueprint Generator - * Common Module: Used by both ONAP and DCAE Blueprint Applications - * Component Spec Model: For Container + * @date 10/16/2020 Application: DCAE/ONAP - Blueprint Generator Common Module: Used by both ONAP + * and DCAE Blueprint Applications Component Spec Model: A model class which represents Container + * used in Componentspec */ - @Data @JsonInclude(value = JsonInclude.Include.NON_NULL) @EqualsAndHashCode public class Container { - private String bind; + private String bind; - private String mode; + private String mode; } diff --git a/mod/bpgenerator/common/src/main/java/org/onap/blueprintgenerator/model/componentspec/common/EntrySchema.java b/mod/bpgenerator/common/src/main/java/org/onap/blueprintgenerator/model/componentspec/common/EntrySchema.java index d0355ea..5a5c2c0 100644 --- a/mod/bpgenerator/common/src/main/java/org/onap/blueprintgenerator/model/componentspec/common/EntrySchema.java +++ b/mod/bpgenerator/common/src/main/java/org/onap/blueprintgenerator/model/componentspec/common/EntrySchema.java @@ -23,34 +23,30 @@ package org.onap.blueprintgenerator.model.componentspec.common; - import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; import lombok.Data; /** * @author : Ravi Mantena - * @date 10/16/2020 - * Application: DCAE/ONAP - Blueprint Generator - * Common Module: Used by both ONAP and DCAE Blueprint Applications - * Component Spec Model: For Entry Schema + * @date 10/16/2020 Application: DCAE/ONAP - Blueprint Generator Common Module: Used by both ONAP + * and DCAE Blueprint Applications Component Spec Model: A model class which represents Entry Schema + * used in Componentspec */ - @Data @JsonInclude(value = JsonInclude.Include.NON_NULL) @JsonIgnoreProperties(ignoreUnknown = true) public class EntrySchema { - private String name; - - private String description; + private String name; - private String type; + private String description; - private String value; + private String type; - private EntrySchema[] entry_schema; + private String value; - private boolean required; + private EntrySchema[] entry_schema; + private boolean required; } diff --git a/mod/bpgenerator/common/src/main/java/org/onap/blueprintgenerator/model/componentspec/common/HealthCheck.java b/mod/bpgenerator/common/src/main/java/org/onap/blueprintgenerator/model/componentspec/common/HealthCheck.java index 01c1497..8c092a2 100644 --- a/mod/bpgenerator/common/src/main/java/org/onap/blueprintgenerator/model/componentspec/common/HealthCheck.java +++ b/mod/bpgenerator/common/src/main/java/org/onap/blueprintgenerator/model/componentspec/common/HealthCheck.java @@ -23,7 +23,6 @@ package org.onap.blueprintgenerator.model.componentspec.common; - import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; import lombok.Data; @@ -31,28 +30,25 @@ import lombok.EqualsAndHashCode; /** * @author : Ravi Mantena - * @date 10/16/2020 - * Application: DCAE/ONAP - Blueprint Generator - * Common Module: Used by both ONAP and DCAE Blueprint Applications - * Component Spec Model: For HealthCheck + * @date 10/16/2020 Application: DCAE/ONAP - Blueprint Generator Common Module: Used by both ONAP + * and DCAE Blueprint Applications Component Spec Model: A model class which represents HealthCheck + * used in Componentspec */ - @Data @JsonInclude(value = JsonInclude.Include.NON_NULL) @JsonIgnoreProperties(ignoreUnknown = true) @EqualsAndHashCode public class HealthCheck { - private String interval; - - private String timeout; + private String interval; - private String script; + private String timeout; - private String type; + private String script; - private String endpoint; + private String type; - private String initialDelaySeconds; + private String endpoint; + private String initialDelaySeconds; } diff --git a/mod/bpgenerator/common/src/main/java/org/onap/blueprintgenerator/model/componentspec/common/Host.java b/mod/bpgenerator/common/src/main/java/org/onap/blueprintgenerator/model/componentspec/common/Host.java index 6a9d812..6b5021e 100644 --- a/mod/bpgenerator/common/src/main/java/org/onap/blueprintgenerator/model/componentspec/common/Host.java +++ b/mod/bpgenerator/common/src/main/java/org/onap/blueprintgenerator/model/componentspec/common/Host.java @@ -29,19 +29,16 @@ import lombok.EqualsAndHashCode; /** * @author : Ravi Mantena - * @date 10/16/2020 - * Application: DCAE/ONAP - Blueprint Generator - * Common Module: Used by both ONAP and DCAE Blueprint Applications - * Component Spec Model: For Host + * @date 10/16/2020 Application: DCAE/ONAP - Blueprint Generator Common Module: Used by both ONAP + * and DCAE Blueprint Applications Component Spec Model: A model class which represents Host used in + * Componentspec */ - @Data @JsonInclude(value = JsonInclude.Include.NON_NULL) @EqualsAndHashCode public class Host { - private String path; - - private String mode; + private String path; + private String mode; } diff --git a/mod/bpgenerator/common/src/main/java/org/onap/blueprintgenerator/model/componentspec/common/Parameters.java b/mod/bpgenerator/common/src/main/java/org/onap/blueprintgenerator/model/componentspec/common/Parameters.java index 9c1931c..67de5ef 100644 --- a/mod/bpgenerator/common/src/main/java/org/onap/blueprintgenerator/model/componentspec/common/Parameters.java +++ b/mod/bpgenerator/common/src/main/java/org/onap/blueprintgenerator/model/componentspec/common/Parameters.java @@ -30,40 +30,37 @@ import lombok.EqualsAndHashCode; /** * @author : Ravi Mantena - * @date 10/16/2020 - * Application: DCAE/ONAP - Blueprint Generator - * Common Module: Used by both ONAP and DCAE Blueprint Applications - * Component Spec Model: For Parameters + * @date 10/16/2020 Application: DCAE/ONAP - Blueprint Generator Common Module: Used by both ONAP + * and DCAE Blueprint Applications Component Spec Model: A model class which represents Parameters + * used in Componentspec */ - @Data @JsonInclude(value = JsonInclude.Include.NON_NULL) @JsonIgnoreProperties(ignoreUnknown = true) @EqualsAndHashCode public class Parameters { - private String name; - - private Object value; + private String name; - private String description; + private Object value; - private boolean sourced_at_deployment; + private String description; - private boolean designer_editable; + private boolean sourced_at_deployment; - private boolean policy_editable; + private boolean designer_editable; - private boolean required; + private boolean policy_editable; - private String type; + private boolean required; - private String policy_group; + private String type; - private PolicySchema[] policy_schema; + private String policy_group; - private EntrySchema[] entry_schema; + private PolicySchema[] policy_schema; - private Constraints[] constraints; + private EntrySchema[] entry_schema; + private Constraints[] constraints; } diff --git a/mod/bpgenerator/common/src/main/java/org/onap/blueprintgenerator/model/componentspec/common/Policy.java b/mod/bpgenerator/common/src/main/java/org/onap/blueprintgenerator/model/componentspec/common/Policy.java index ea419f3..77f49a3 100644 --- a/mod/bpgenerator/common/src/main/java/org/onap/blueprintgenerator/model/componentspec/common/Policy.java +++ b/mod/bpgenerator/common/src/main/java/org/onap/blueprintgenerator/model/componentspec/common/Policy.java @@ -29,19 +29,16 @@ import lombok.EqualsAndHashCode; /** * @author : Ravi Mantena - * @date 10/16/2020 - * Application: DCAE/ONAP - Blueprint Generator - * Common Module: Used by both ONAP and DCAE Blueprint Applications - * Component Spec Model: For Policy + * @date 10/16/2020 Application: DCAE/ONAP - Blueprint Generator Common Module: Used by both ONAP + * and DCAE Blueprint Applications Component Spec Model: A model class which represents Policy used + * in Componentspec */ - @Data @JsonInclude(value = JsonInclude.Include.NON_NULL) @EqualsAndHashCode public class Policy { - private String trigger_type; - - private String script_path; + private String trigger_type; + private String script_path; } diff --git a/mod/bpgenerator/common/src/main/java/org/onap/blueprintgenerator/model/componentspec/common/PolicySchema.java b/mod/bpgenerator/common/src/main/java/org/onap/blueprintgenerator/model/componentspec/common/PolicySchema.java index 2d17086..fc23cb8 100644 --- a/mod/bpgenerator/common/src/main/java/org/onap/blueprintgenerator/model/componentspec/common/PolicySchema.java +++ b/mod/bpgenerator/common/src/main/java/org/onap/blueprintgenerator/model/componentspec/common/PolicySchema.java @@ -29,29 +29,26 @@ import lombok.Data; /** * @author : Ravi Mantena - * @date 10/16/2020 - * Application: DCAE/ONAP - Blueprint Generator - * Common Module: Used by both ONAP and DCAE Blueprint Applications - * Component Spec Model: For Policy Schema + * @date 10/16/2020 Application: DCAE/ONAP - Blueprint Generator Common Module: Used by both ONAP + * and DCAE Blueprint Applications Component Spec Model: A model class which represents Policy + * Schema used in Componentspec */ - @Data @JsonInclude(value = JsonInclude.Include.NON_NULL) @JsonIgnoreProperties(ignoreUnknown = true) public class PolicySchema { - private String name; - - private String description; + private String name; - private String type; + private String description; - private String value; + private String type; - private EntrySchema[] entry_schema; + private String value; - private boolean required; + private EntrySchema[] entry_schema; - private Constraints[] constraints; + private boolean required; - } + private Constraints[] constraints; +} diff --git a/mod/bpgenerator/common/src/main/java/org/onap/blueprintgenerator/model/componentspec/common/Provides.java b/mod/bpgenerator/common/src/main/java/org/onap/blueprintgenerator/model/componentspec/common/Provides.java index 5301cbe..482ee4a 100644 --- a/mod/bpgenerator/common/src/main/java/org/onap/blueprintgenerator/model/componentspec/common/Provides.java +++ b/mod/bpgenerator/common/src/main/java/org/onap/blueprintgenerator/model/componentspec/common/Provides.java @@ -29,24 +29,21 @@ import lombok.Data; /** * @author : Ravi Mantena - * @date 10/16/2020 - * Application: DCAE/ONAP - Blueprint Generator - * Common Module: Used by both ONAP and DCAE Blueprint Applications - * Component Spec Model: For Provides + * @date 10/16/2020 Application: DCAE/ONAP - Blueprint Generator Common Module: Used by both ONAP + * and DCAE Blueprint Applications Component Spec Model: A model class which represents Provides + * used in Componentspec */ - @Data @JsonInclude(value = JsonInclude.Include.NON_NULL) @JsonIgnoreProperties(ignoreUnknown = true) public class Provides { - private String route; + private String route; - private RequestResponse request; - - private RequestResponse response; + private RequestResponse request; - //Used in ONAP - private String verb; + private RequestResponse response; + // Used in ONAP + private String verb; } diff --git a/mod/bpgenerator/common/src/main/java/org/onap/blueprintgenerator/model/componentspec/common/Publishes.java b/mod/bpgenerator/common/src/main/java/org/onap/blueprintgenerator/model/componentspec/common/Publishes.java index cd8230e..10e22eb 100644 --- a/mod/bpgenerator/common/src/main/java/org/onap/blueprintgenerator/model/componentspec/common/Publishes.java +++ b/mod/bpgenerator/common/src/main/java/org/onap/blueprintgenerator/model/componentspec/common/Publishes.java @@ -30,27 +30,24 @@ import lombok.EqualsAndHashCode; /** * @author : Ravi Mantena - * @date 10/16/2020 - * Application: DCAE/ONAP - Blueprint Generator - * Common Module: Used by both ONAP and DCAE Blueprint Applications - * Component Spec Model: For Publishes + * @date 10/16/2020 Application: DCAE/ONAP - Blueprint Generator Common Module: Used by both ONAP + * and DCAE Blueprint Applications Component Spec Model: A model class which represents Publishes + * used in Componentspec */ - @Data @JsonInclude(value = JsonInclude.Include.NON_NULL) @JsonIgnoreProperties(ignoreUnknown = true) @EqualsAndHashCode public class Publishes { - private String config_key; - - private String format; + private String config_key; - private String type; + private String format; - private String version; + private String type; - //Used in ONAP - private String route; + private String version; + // Used in ONAP + private String route; } diff --git a/mod/bpgenerator/common/src/main/java/org/onap/blueprintgenerator/model/componentspec/common/Reconfigs.java b/mod/bpgenerator/common/src/main/java/org/onap/blueprintgenerator/model/componentspec/common/Reconfigs.java index 96b0fb3..b5a5791 100644 --- a/mod/bpgenerator/common/src/main/java/org/onap/blueprintgenerator/model/componentspec/common/Reconfigs.java +++ b/mod/bpgenerator/common/src/main/java/org/onap/blueprintgenerator/model/componentspec/common/Reconfigs.java @@ -23,7 +23,6 @@ package org.onap.blueprintgenerator.model.componentspec.common; - import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; import lombok.Data; @@ -31,24 +30,21 @@ import lombok.EqualsAndHashCode; /** * @author : Ravi Mantena - * @date 10/16/2020 - * Application: DCAE/ONAP - Blueprint Generator - * Common Module: Used by both ONAP and DCAE Blueprint Applications - * Component Spec Model: For Reconfigs + * @date 10/16/2020 Application: DCAE/ONAP - Blueprint Generator Common Module: Used by both ONAP + * and DCAE Blueprint Applications Component Spec Model: A model class which represents Reconfigs + * used in Componentspec */ - @Data @JsonInclude(value = JsonInclude.Include.NON_NULL) @JsonIgnoreProperties(ignoreUnknown = true) @EqualsAndHashCode public class Reconfigs { - private String dti; + private String dti; - private String app_reconfig; + private String app_reconfig; - private String policy; - - private String streams; + private String policy; + private String streams; } diff --git a/mod/bpgenerator/common/src/main/java/org/onap/blueprintgenerator/model/componentspec/common/RequestResponse.java b/mod/bpgenerator/common/src/main/java/org/onap/blueprintgenerator/model/componentspec/common/RequestResponse.java index 0376de1..4930757 100644 --- a/mod/bpgenerator/common/src/main/java/org/onap/blueprintgenerator/model/componentspec/common/RequestResponse.java +++ b/mod/bpgenerator/common/src/main/java/org/onap/blueprintgenerator/model/componentspec/common/RequestResponse.java @@ -23,26 +23,22 @@ package org.onap.blueprintgenerator.model.componentspec.common; - import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; import lombok.Data; /** * @author : Ravi Mantena - * @date 10/16/2020 - * Application: DCAE/ONAP - Blueprint Generator - * Common Module: Used by both ONAP and DCAE Blueprint Applications - * Component Spec Model: For Request Response + * @date 10/16/2020 Application: DCAE/ONAP - Blueprint Generator Common Module: Used by both ONAP + * and DCAE Blueprint Applications Component Spec Model: A model class which represents Request + * Response used in Componentspec */ - @Data @JsonInclude(value = JsonInclude.Include.NON_NULL) @JsonIgnoreProperties(ignoreUnknown = true) public class RequestResponse { - private String format; - - private String version; + private String format; + private String version; } diff --git a/mod/bpgenerator/common/src/main/java/org/onap/blueprintgenerator/model/componentspec/common/Self.java b/mod/bpgenerator/common/src/main/java/org/onap/blueprintgenerator/model/componentspec/common/Self.java index b657b16..a918bf2 100644 --- a/mod/bpgenerator/common/src/main/java/org/onap/blueprintgenerator/model/componentspec/common/Self.java +++ b/mod/bpgenerator/common/src/main/java/org/onap/blueprintgenerator/model/componentspec/common/Self.java @@ -30,24 +30,21 @@ import lombok.EqualsAndHashCode; /** * @author : Ravi Mantena - * @date 10/16/2020 - * Application: DCAE/ONAP - Blueprint Generator - * Common Module: Used by both ONAP and DCAE Blueprint Applications - * Component Spec Model: For Self + * @date 10/16/2020 Application: DCAE/ONAP - Blueprint Generator Common Module: Used by both ONAP + * and DCAE Blueprint Applications Component Spec Model: A model class which represents Self used in + * Componentspec */ - @Data @JsonInclude(value = JsonInclude.Include.NON_NULL) @JsonIgnoreProperties(ignoreUnknown = true) @EqualsAndHashCode public class Self { - private String component_type; - - private String description; + private String component_type; - private String name; + private String description; - private String version; + private String name; + private String version; } diff --git a/mod/bpgenerator/common/src/main/java/org/onap/blueprintgenerator/model/componentspec/common/Streams.java b/mod/bpgenerator/common/src/main/java/org/onap/blueprintgenerator/model/componentspec/common/Streams.java index 3791e32..897184c 100644 --- a/mod/bpgenerator/common/src/main/java/org/onap/blueprintgenerator/model/componentspec/common/Streams.java +++ b/mod/bpgenerator/common/src/main/java/org/onap/blueprintgenerator/model/componentspec/common/Streams.java @@ -23,7 +23,6 @@ package org.onap.blueprintgenerator.model.componentspec.common; - import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; import lombok.Data; @@ -31,20 +30,17 @@ import lombok.EqualsAndHashCode; /** * @author : Ravi Mantena - * @date 10/16/2020 - * Application: DCAE/ONAP - Blueprint Generator - * Common Module: Used by both ONAP and DCAE Blueprint Applications - * Component Spec Model: For Streams + * @date 10/16/2020 Application: DCAE/ONAP - Blueprint Generator Common Module: Used by both ONAP + * and DCAE Blueprint Applications Component Spec Model: A model class which represents Streams used + * in Componentspec */ - @Data @JsonInclude(value = JsonInclude.Include.NON_NULL) @JsonIgnoreProperties(ignoreUnknown = true) @EqualsAndHashCode public class Streams { - private Publishes[] publishes; - - private Subscribes[] subscribes; + private Publishes[] publishes; + private Subscribes[] subscribes; } diff --git a/mod/bpgenerator/common/src/main/java/org/onap/blueprintgenerator/model/componentspec/common/Subscribes.java b/mod/bpgenerator/common/src/main/java/org/onap/blueprintgenerator/model/componentspec/common/Subscribes.java index 668a517..a0a58ae 100644 --- a/mod/bpgenerator/common/src/main/java/org/onap/blueprintgenerator/model/componentspec/common/Subscribes.java +++ b/mod/bpgenerator/common/src/main/java/org/onap/blueprintgenerator/model/componentspec/common/Subscribes.java @@ -23,7 +23,6 @@ package org.onap.blueprintgenerator.model.componentspec.common; - import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; import lombok.Data; @@ -31,26 +30,23 @@ import lombok.EqualsAndHashCode; /** * @author : Ravi Mantena - * @date 10/16/2020 - * Application: DCAE/ONAP - Blueprint Generator - * Common Module: Used by both ONAP and DCAE Blueprint Applications - * Component Spec Model: For Subscribes + * @date 10/16/2020 Application: DCAE/ONAP - Blueprint Generator Common Module: Used by both ONAP + * and DCAE Blueprint Applications Component Spec Model: A model class which represents Subscribes + * used in Componentspec */ - @Data @JsonInclude(value = JsonInclude.Include.NON_NULL) @JsonIgnoreProperties(ignoreUnknown = true) @EqualsAndHashCode public class Subscribes { - private String config_key; - - private String format; + private String config_key; - private String route; + private String format; - private String type; + private String route; - private String version; + private String type; + private String version; } diff --git a/mod/bpgenerator/common/src/main/java/org/onap/blueprintgenerator/model/componentspec/common/Volumes.java b/mod/bpgenerator/common/src/main/java/org/onap/blueprintgenerator/model/componentspec/common/Volumes.java index 6f12b47..9e9f9b1 100644 --- a/mod/bpgenerator/common/src/main/java/org/onap/blueprintgenerator/model/componentspec/common/Volumes.java +++ b/mod/bpgenerator/common/src/main/java/org/onap/blueprintgenerator/model/componentspec/common/Volumes.java @@ -23,7 +23,6 @@ package org.onap.blueprintgenerator.model.componentspec.common; - import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; import lombok.Data; @@ -31,24 +30,21 @@ import lombok.EqualsAndHashCode; /** * @author : Ravi Mantena - * @date 10/16/2020 - * Application: DCAE/ONAP - Blueprint Generator - * Common Module: Used by both ONAP and DCAE Blueprint Applications - * Component Spec Model: For Volumes + * @date 10/16/2020 Application: DCAE/ONAP - Blueprint Generator Common Module: Used by both ONAP + * and DCAE Blueprint Applications Component Spec Model: A model class which represents Volumes used + * in Componentspec */ - @Data @JsonInclude(value = JsonInclude.Include.NON_NULL) @JsonIgnoreProperties(ignoreUnknown = true) @EqualsAndHashCode public class Volumes { - private Container container; + private Container container; + + private Host host; - private Host host; - - private String type; - - private String name; + private String type; -}
\ No newline at end of file + private String name; +} diff --git a/mod/bpgenerator/common/src/main/java/org/onap/blueprintgenerator/model/policy/Policies.java b/mod/bpgenerator/common/src/main/java/org/onap/blueprintgenerator/model/policy/Policies.java index 35d210c..4f9221c 100644 --- a/mod/bpgenerator/common/src/main/java/org/onap/blueprintgenerator/model/policy/Policies.java +++ b/mod/bpgenerator/common/src/main/java/org/onap/blueprintgenerator/model/policy/Policies.java @@ -29,24 +29,20 @@ import lombok.Data; /** * @author : Ravi Mantena - * @date 10/16/2020 - * Application: DCAE/ONAP - Blueprint Generator - * Common Module: Used by both ONAp and DCAE Blueprint Applications - * Policy Model: To Get Policies + * @date 10/16/2020 Application: DCAE/ONAP - Blueprint Generator Common Module: Used by both ONAp + * and DCAE Blueprint Applications Policy Model: A model class which represents Policies */ - @Data @JsonInclude(value = JsonInclude.Include.NON_NULL) public class Policies { - private String configAttributes; + private String configAttributes; + + private String configName; + + private String onapName = Constants.ONAP_NAME_DCAE; - private String configName; - - private String onapName = Constants.ONAP_NAME_DCAE; - - private String policyName = Constants.POLICIES_POLICYNAME_DCAECONFIG; - - private boolean unique = false; + private String policyName = Constants.POLICIES_POLICYNAME_DCAECONFIG; + private boolean unique = false; } diff --git a/mod/bpgenerator/common/src/main/java/org/onap/blueprintgenerator/model/policy/PoliciesNode.java b/mod/bpgenerator/common/src/main/java/org/onap/blueprintgenerator/model/policy/PoliciesNode.java index 7b951cc..986a12e 100644 --- a/mod/bpgenerator/common/src/main/java/org/onap/blueprintgenerator/model/policy/PoliciesNode.java +++ b/mod/bpgenerator/common/src/main/java/org/onap/blueprintgenerator/model/policy/PoliciesNode.java @@ -29,16 +29,12 @@ import lombok.Data; /** * @author : Ravi Mantena - * @date 10/16/2020 - * Application: DCAE/ONAP - Blueprint Generator - * Common Module: Used by both ONAp and DCAE Blueprint Applications - * Policy Model: To Get Policies Node + * @date 10/16/2020 Application: DCAE/ONAP - Blueprint Generator Common Module: Used by both ONAp + * and DCAE Blueprint Applications Policy Model: A model class which represents Policies Node */ - @Data @JsonInclude(value = JsonInclude.Include.NON_NULL) public class PoliciesNode extends Node { - private PoliciesProperties properties; - + private PoliciesProperties properties; } diff --git a/mod/bpgenerator/common/src/main/java/org/onap/blueprintgenerator/model/policy/PoliciesProperties.java b/mod/bpgenerator/common/src/main/java/org/onap/blueprintgenerator/model/policy/PoliciesProperties.java index 11844bf..a4db4ad 100644 --- a/mod/bpgenerator/common/src/main/java/org/onap/blueprintgenerator/model/policy/PoliciesProperties.java +++ b/mod/bpgenerator/common/src/main/java/org/onap/blueprintgenerator/model/policy/PoliciesProperties.java @@ -28,16 +28,12 @@ import lombok.Data; /** * @author : Ravi Mantena - * @date 10/16/2020 - * Application: DCAE/ONAP - Blueprint Generator - * Common Module: Used by both ONAp and DCAE Blueprint Applications - * Policy Model: To Get Policies Properties + * @date 10/16/2020 Application: DCAE/ONAP - Blueprint Generator Common Module: Used by both ONAp + * and DCAE Blueprint Applications Policy Model: A model class which represents Policies Properties */ - @Data @JsonInclude(value = JsonInclude.Include.NON_NULL) public class PoliciesProperties { - private PolicyFilter policy_filter; - + private PolicyFilter policy_filter; } diff --git a/mod/bpgenerator/common/src/main/java/org/onap/blueprintgenerator/model/policy/Policy.java b/mod/bpgenerator/common/src/main/java/org/onap/blueprintgenerator/model/policy/Policy.java index b5f098c..cf2a9ff 100644 --- a/mod/bpgenerator/common/src/main/java/org/onap/blueprintgenerator/model/policy/Policy.java +++ b/mod/bpgenerator/common/src/main/java/org/onap/blueprintgenerator/model/policy/Policy.java @@ -23,22 +23,17 @@ package org.onap.blueprintgenerator.model.policy; - import com.fasterxml.jackson.annotation.JsonInclude; import lombok.Data; /** * @author : Ravi Mantena - * @date 10/16/2020 - * Application: DCAE/ONAP - Blueprint Generator - * Common Module: Used by both ONAp and DCAE Blueprint Applications - * Policy Model: To Get Policy + * @date 10/16/2020 Application: DCAE/ONAP - Blueprint Generator Common Module: Used by both ONAp + * and DCAE Blueprint Applications Policy Model: A model class which represents Policy */ - @Data @JsonInclude(value = JsonInclude.Include.NON_NULL) public class Policy { - private String policy_id; - + private String policy_id; } diff --git a/mod/bpgenerator/common/src/main/java/org/onap/blueprintgenerator/model/policy/PolicyFilter.java b/mod/bpgenerator/common/src/main/java/org/onap/blueprintgenerator/model/policy/PolicyFilter.java index e49e6c3..96cdfc6 100644 --- a/mod/bpgenerator/common/src/main/java/org/onap/blueprintgenerator/model/policy/PolicyFilter.java +++ b/mod/bpgenerator/common/src/main/java/org/onap/blueprintgenerator/model/policy/PolicyFilter.java @@ -29,24 +29,20 @@ import lombok.Data; /** * @author : Ravi Mantena - * @date 10/16/2020 - * Application: DCAE/ONAP - Blueprint Generator - * Common Module: Used by both ONAp and DCAE Blueprint Applications - * Policy Model: To Get Policy Filters + * @date 10/16/2020 Application: DCAE/ONAP - Blueprint Generator Common Module: Used by both ONAp + * and DCAE Blueprint Applications Policy Model: A model class which represents Policy Filters */ - @Data @JsonInclude(value = JsonInclude.Include.NON_NULL) public class PolicyFilter { - private String configAttributes = Constants.EMPTY; + private String configAttributes = Constants.EMPTY; - private String configName = Constants.EMPTY; - - private String onapName = Constants.ONAP_NAME_DCAE; + private String configName = Constants.EMPTY; - private Object policyName; + private String onapName = Constants.ONAP_NAME_DCAE; - private boolean unique = false; + private Object policyName; + private boolean unique = false; } diff --git a/mod/bpgenerator/common/src/main/java/org/onap/blueprintgenerator/model/policy/PolicyInput.java b/mod/bpgenerator/common/src/main/java/org/onap/blueprintgenerator/model/policy/PolicyInput.java index ca13cd7..24da65c 100644 --- a/mod/bpgenerator/common/src/main/java/org/onap/blueprintgenerator/model/policy/PolicyInput.java +++ b/mod/bpgenerator/common/src/main/java/org/onap/blueprintgenerator/model/policy/PolicyInput.java @@ -28,18 +28,14 @@ import lombok.Data; /** * @author : Ravi Mantena - * @date 10/16/2020 - * Application: DCAE/ONAP - Blueprint Generator - * Common Module: Used by both ONAp and DCAE Blueprint Applications - * Policy Model: To Get Policy Input + * @date 10/16/2020 Application: DCAE/ONAP - Blueprint Generator Common Module: Used by both ONAp + * and DCAE Blueprint Applications Policy Model: A model class which represents Policy Input */ - @Data @JsonInclude(value = JsonInclude.Include.NON_NULL) public class PolicyInput { - private Policies[] policies; - - private Policy[] policy; + private Policies[] policies; + private Policy[] policy; } diff --git a/mod/bpgenerator/common/src/main/java/org/onap/blueprintgenerator/model/policy/PolicyNode.java b/mod/bpgenerator/common/src/main/java/org/onap/blueprintgenerator/model/policy/PolicyNode.java index f5ebf05..c3256a1 100644 --- a/mod/bpgenerator/common/src/main/java/org/onap/blueprintgenerator/model/policy/PolicyNode.java +++ b/mod/bpgenerator/common/src/main/java/org/onap/blueprintgenerator/model/policy/PolicyNode.java @@ -29,16 +29,12 @@ import lombok.Data; /** * @author : Ravi Mantena - * @date 10/16/2020 - * Application: DCAE/ONAP - Blueprint Generator - * Common Module: Used by both ONAp and DCAE Blueprint Applications - * Policy Model: To Get Policy Node + * @date 10/16/2020 Application: DCAE/ONAP - Blueprint Generator Common Module: Used by both ONAp + * and DCAE Blueprint Applications Policy Model: A model class which represents Policy Node */ - @Data @JsonInclude(value = JsonInclude.Include.NON_NULL) public class PolicyNode extends Node { - private PolicyProperties properties; - + private PolicyProperties properties; } diff --git a/mod/bpgenerator/common/src/main/java/org/onap/blueprintgenerator/model/policy/PolicyProperties.java b/mod/bpgenerator/common/src/main/java/org/onap/blueprintgenerator/model/policy/PolicyProperties.java index 8ec4a32..40d66e3 100644 --- a/mod/bpgenerator/common/src/main/java/org/onap/blueprintgenerator/model/policy/PolicyProperties.java +++ b/mod/bpgenerator/common/src/main/java/org/onap/blueprintgenerator/model/policy/PolicyProperties.java @@ -29,16 +29,12 @@ import lombok.Data; /** * @author : Ravi Mantena - * @date 10/16/2020 - * Application: DCAE/ONAP - Blueprint Generator - * Common Module: Used by both ONAp and DCAE Blueprint Applications - * Policy Model: To Get Policy Properties + * @date 10/16/2020 Application: DCAE/ONAP - Blueprint Generator Common Module: Used by both ONAp + * and DCAE Blueprint Applications Policy Model: A model class which represents Policy Properties */ - @Data @JsonInclude(value = JsonInclude.Include.NON_NULL) public class PolicyProperties { - private GetInput policy_id; - + private GetInput policy_id; } diff --git a/mod/bpgenerator/common/src/main/java/org/onap/blueprintgenerator/model/translate/GetProperty.java b/mod/bpgenerator/common/src/main/java/org/onap/blueprintgenerator/model/translate/GetProperty.java index 47994c3..abbccb9 100644 --- a/mod/bpgenerator/common/src/main/java/org/onap/blueprintgenerator/model/translate/GetProperty.java +++ b/mod/bpgenerator/common/src/main/java/org/onap/blueprintgenerator/model/translate/GetProperty.java @@ -30,16 +30,12 @@ import java.util.List; /** * @author : Ravi Mantena - * @date 10/16/2020 - * Application: DCAE/ONAP - Blueprint Generator - * Common Module: Used by both ONAp and DCAE Blueprint Applications - * Translate Model: To Get Property + * @date 10/16/2020 Application: DCAE/ONAP - Blueprint Generator Common Module: Used by both ONAp + * and DCAE Blueprint Applications Translate Model: A model class which represents Get Property */ - @Data @JsonInclude(value = JsonInclude.Include.NON_NULL) public class GetProperty { - private List<String> get_property; - + private List<String> get_property; } diff --git a/mod/bpgenerator/common/src/main/java/org/onap/blueprintgenerator/service/base/BlueprintHelperService.java b/mod/bpgenerator/common/src/main/java/org/onap/blueprintgenerator/service/base/BlueprintHelperService.java index 1f6b4f8..db15360 100644 --- a/mod/bpgenerator/common/src/main/java/org/onap/blueprintgenerator/service/base/BlueprintHelperService.java +++ b/mod/bpgenerator/common/src/main/java/org/onap/blueprintgenerator/service/base/BlueprintHelperService.java @@ -23,7 +23,6 @@ package org.onap.blueprintgenerator.service.base; - import org.onap.blueprintgenerator.constants.Constants; import org.springframework.stereotype.Service; @@ -31,88 +30,184 @@ import java.util.LinkedHashMap; /** * @author : Ravi Mantena - * @date 10/16/2020 - * Application: DCAE/ONAP - Blueprint Generator - * Common Module: Used by both ONAp and DCAE Blueprint Applications - * Service: For Common Functions used across + * @date 10/16/2020 Application: DCAE/ONAP - Blueprint Generator Common Module: Used by both ONAp + * and DCAE Blueprint Applications Service: An interface for Common Functions used across Blueprint */ - @Service public class BlueprintHelperService { - - public LinkedHashMap<String, Object> createInputValue(String type, String description, Object defaultValue) { - LinkedHashMap<String, Object> inputMap = new LinkedHashMap<>(); - inputMap.put("type", type); - inputMap.put("description", description); - inputMap.put("default", defaultValue); - return inputMap; - } - - public LinkedHashMap<String, Object> createInputValue(String type, String description) { - LinkedHashMap<String, Object> inputMap = new LinkedHashMap<>(); - inputMap.put("type", type); - inputMap.put("description", description); - return inputMap; - } - - public LinkedHashMap<String, Object> createInputValue(String type, Object defaultValue) { - LinkedHashMap<String, Object> inputMap = new LinkedHashMap<>(); - inputMap.put("type", type); - inputMap.put("default", defaultValue); - return inputMap; - } - - public LinkedHashMap<String, Object> createIntegerInput(String description, Object defaultValue){ - return createInputValue(Constants.INTEGER_TYPE, description, defaultValue); - } - - public LinkedHashMap<String, Object> createIntegerInput(String description){ - return createInputValue(Constants.INTEGER_TYPE, description); - } - - public LinkedHashMap<String, Object> createIntegerInput(Object defaultValue){ - return createInputValue(Constants.INTEGER_TYPE, defaultValue); - } - - public LinkedHashMap<String, Object> createBooleanInput(String description, Object defaultValue){ - return createInputValue(Constants.BOOLEAN_TYPE, description, defaultValue); - } - - public LinkedHashMap<String, Object> createBooleanInput(String description){ - return createInputValue(Constants.BOOLEAN_TYPE, description); - } - - public LinkedHashMap<String, Object> createBooleanInput(Object defaultValue){ - return createInputValue(Constants.BOOLEAN_TYPE, defaultValue); - } - - public LinkedHashMap<String, Object> createStringInput(String description, Object defaultValue){ - return createInputValue(Constants.STRING_TYPE, description, defaultValue); - } - -/* public LinkedHashMap<String, Object> createStringInput(String description){ + /** + * creates Input value by contatinating Type, Description and Default value + * + * @param type Input Type + * @param description Description + * @param defaultValue Default value of Type + * @return + */ + public LinkedHashMap<String, Object> createInputValue( + String type, String description, Object defaultValue) { + LinkedHashMap<String, Object> inputMap = new LinkedHashMap<>(); + inputMap.put("type", type); + inputMap.put("description", description); + inputMap.put("default", defaultValue); + return inputMap; + } + + /** + * creates Input value by contatinating Type and Description + * + * @param type Input Type + * @param description Description + * @return + */ + public LinkedHashMap<String, Object> createInputValue(String type, String description) { + LinkedHashMap<String, Object> inputMap = new LinkedHashMap<>(); + inputMap.put("type", type); + inputMap.put("description", description); + return inputMap; + } + + /** + * creates Input value by contatinating Type and Default value + * + * @param type Input Type + * @param defaultValue Default value of Type + * @return + */ + public LinkedHashMap<String, Object> createInputValue(String type, Object defaultValue) { + LinkedHashMap<String, Object> inputMap = new LinkedHashMap<>(); + inputMap.put("type", type); + inputMap.put("default", defaultValue); + return inputMap; + } + + /** + * creates Input value by contatinating Description and Default value + * + * @param description Description + * @param defaultValue Default value of Type + * @return + */ + public LinkedHashMap<String, Object> createIntegerInput(String description, + Object defaultValue) { + return createInputValue(Constants.INTEGER_TYPE, description, defaultValue); + } + + /** + * creates Integer Input value for given Description + * + * @param description Description + * @return + */ + public LinkedHashMap<String, Object> createIntegerInput(String description) { + return createInputValue(Constants.INTEGER_TYPE, description); + } + + /** + * creates Integer Input value for given Default value + * + * @param defaultValue Default value of Type + * @return + */ + public LinkedHashMap<String, Object> createIntegerInput(Object defaultValue) { + return createInputValue(Constants.INTEGER_TYPE, defaultValue); + } + + /** + * creates Integer Input value for given Description and Default value + * + * @param description Description + * @param defaultValue Default value of Type + * @return + */ + public LinkedHashMap<String, Object> createBooleanInput(String description, + Object defaultValue) { + return createInputValue(Constants.BOOLEAN_TYPE, description, defaultValue); + } + + /** + * creates Boolean Input value for given Description + * + * @param description Description + * @return + */ + public LinkedHashMap<String, Object> createBooleanInput(String description) { + return createInputValue(Constants.BOOLEAN_TYPE, description); + } + + /** + * creates Boolean Input value for given Default value + * + * @param defaultValue Default value of Type + * @return + */ + public LinkedHashMap<String, Object> createBooleanInput(Object defaultValue) { + return createInputValue(Constants.BOOLEAN_TYPE, defaultValue); + } + + /** + * creates String Input value for given Default value + * @param description Description + * @param defaultValue Default value of Type + * @return + */ + public LinkedHashMap<String, Object> createStringInput(String description, + Object defaultValue) { + return createInputValue(Constants.STRING_TYPE, description, defaultValue); + } + + /* public LinkedHashMap<String, Object> createStringInput(String description){ return createInputValue(Constants.STRING_TYPE, description); }*/ - public LinkedHashMap<String, Object> createStringInput(Object defaultValue){ - return createInputValue(Constants.STRING_TYPE, defaultValue); - } - - public String joinUnderscore(String firstValue, String secondValue){ - return firstValue + "_" + secondValue; - } - - public boolean isDataRouterType(String type) { - return type.equals(Constants.DATA_ROUTER) || type.equals(Constants.DATAROUTER_VALUE); - } - - public boolean isMessageRouterType(String type) { - return type.equals(Constants.MESSAGE_ROUTER) || type.equals(Constants.MESSAGEROUTER_VALUE); - } - - public String getNamePrefix(String name) { - return name.isEmpty() ? "" : name + "_"; - } - + /** + * creates String Input value for given Default value + * + * @param defaultValue Default value of Type + * @return + */ + public LinkedHashMap<String, Object> createStringInput(Object defaultValue) { + return createInputValue(Constants.STRING_TYPE, defaultValue); + } + + /** + * Concatenates String Input values with Underscore + * + * @param firstValue Value + * @param secondValue Value + * @return + */ + public String joinUnderscore(String firstValue, String secondValue) { + return firstValue + "_" + secondValue; + } + + /** + * Returns if the type is Data Router or not + * + * @param type Input Type + * @return + */ + public boolean isDataRouterType(String type) { + return type.equals(Constants.DATA_ROUTER) || type.equals(Constants.DATAROUTER_VALUE); + } + + /** + * Returns if the type is Message Router or not + * + * @param type Input Type + * @return + */ + public boolean isMessageRouterType(String type) { + return type.equals(Constants.MESSAGE_ROUTER) || type.equals(Constants.MESSAGEROUTER_VALUE); + } + + /** + * Returns name with underscore for empty input + * + * @param name Name + * @return + */ + public String getNamePrefix(String name) { + return name.isEmpty() ? "" : name + "_"; + } } diff --git a/mod/bpgenerator/common/src/main/java/org/onap/blueprintgenerator/service/base/BlueprintService.java b/mod/bpgenerator/common/src/main/java/org/onap/blueprintgenerator/service/base/BlueprintService.java index 83c43cf..7dd05f2 100644 --- a/mod/bpgenerator/common/src/main/java/org/onap/blueprintgenerator/service/base/BlueprintService.java +++ b/mod/bpgenerator/common/src/main/java/org/onap/blueprintgenerator/service/base/BlueprintService.java @@ -23,6 +23,8 @@ package org.onap.blueprintgenerator.service.base; +import java.io.FileReader; +import java.nio.file.Paths; import org.onap.blueprintgenerator.model.base.Blueprint; import org.onap.blueprintgenerator.model.common.Input; import org.onap.blueprintgenerator.model.componentspec.base.ComponentSpec; @@ -33,7 +35,6 @@ import org.springframework.beans.factory.annotation.Qualifier; import org.springframework.stereotype.Service; import org.springframework.util.StringUtils; - import java.io.File; import java.io.IOException; import java.io.FileWriter; @@ -42,116 +43,176 @@ import java.io.PrintWriter; import java.util.LinkedHashMap; import java.util.Map; import java.util.regex.Pattern; +import java.util.Date; +import org.apache.maven.model.Model; +import org.apache.maven.model.io.xpp3.MavenXpp3Reader; /** * @author : Ravi Mantena - * @date 10/16/2020 - * Application: DCAE/ONAP - Blueprint Generator - * Common Module: Used by both ONAp and DCAE Blueprint Applications - * Service: For Adding Quotes and Converting Blueprint to Yaml/String + * @date 10/16/2020 Application: DCAE/ONAP - Blueprint Generator Common Module: Used by both ONAp + * and DCAE Blueprint Applications Service: For Adding Quotes and Converting Blueprint to + * Yaml/String */ - @Service public abstract class BlueprintService { - @Autowired - protected FixesService fixesService; - - @Qualifier("objectMapper") - @Autowired - protected ObjectMapper objectMapper; - - @Qualifier("yamlObjectMapper") - @Autowired - protected ObjectMapper yamlObjectMapper; - - public void blueprintToYaml(ComponentSpec cs, Blueprint blueprint, Input input) { - String bluePrintName = input.getBluePrintName(); - String outputPath = input.getOutputPath(); - String comment = "# " + input.getComment() + '\n'; - - try { - File outputFile; - String name = StringUtils.isEmpty(bluePrintName) ? cs.getSelf().getName() : bluePrintName; - if(name.contains(".")) { - name = name.replaceAll(Pattern.quote("."), "_"); - } - if(name.contains(" ")) { - name = name.replaceAll(" ", ""); - } - String file = name + ".yaml"; - outputFile = new File(outputPath, file); - outputFile.getParentFile().mkdirs(); - try { - outputFile.createNewFile(); - } catch (IOException e) { - throw new RuntimeException(e); + @Autowired + protected FixesService fixesService; + + @Qualifier("objectMapper") + @Autowired + protected ObjectMapper objectMapper; + + @Qualifier("yamlObjectMapper") + @Autowired + protected ObjectMapper yamlObjectMapper; + + /** + * Convertes blueprint to Yaml for given ComponentSpec, Blueprint and input + * + * @param cs ComponentSpec + * @param blueprint Blueprint + * @param input Input + * @return + */ + public void blueprintToYaml(ComponentSpec cs, Blueprint blueprint, Input input) { + String bluePrintName = input.getBluePrintName(); + String outputPath = input.getOutputPath(); + String comment = "# " + input.getComment() + '\n'; + + try { + File outputFile; + String name = + StringUtils.isEmpty(bluePrintName) ? cs.getSelf().getName() : bluePrintName; + if (name.contains(".")) { + name = name.replaceAll(Pattern.quote("."), "_"); + } + if (name.contains(" ")) { + name = name.replaceAll(" ", ""); + } + String file = name + ".yaml"; + outputFile = new File(outputPath, file); + outputFile.getParentFile().mkdirs(); + try { + outputFile.createNewFile(); + } catch (IOException e) { + throw new RuntimeException(e); + } + + String appVersion = ""; + try { + MavenXpp3Reader reader = new MavenXpp3Reader(); + Model model = reader.read(new FileReader("pom.xml")); + appVersion = "#bpgen_application_version: " + model.getVersion() + '\n'; + } catch (Exception e) { + e.printStackTrace(); + } + + String version = "#blueprint_version: " + cs.getSelf().getVersion() + '\n'; + String description = "#description: " + cs.getSelf().getDescription() + '\n'; + String date = "#blueprint_created_date: " + new Date() + '\n'; + + BufferedWriter writer = new BufferedWriter(new FileWriter(outputFile, false)); + writer.write(description); + writer.write(version); + writer.write(date); + writer.write(appVersion); + + if (isBpTypeMatches(input)) { + writer.write(comment); + } + + writer.close(); + + PrintWriter out = new PrintWriter(new BufferedWriter(new FileWriter(outputFile, true))); + yamlObjectMapper.writeValue(out, blueprint); + out.close(); + + if (isBpTypeMatches(input)) { + fixesService.fixDcaeSingleQuotes(outputFile); + } else { + fixesService.fixOnapSingleQuotes(outputFile); + } + + // new Yaml().load(new FileInputStream(outputFile)); + + System.out.println("Blueprint is created with valid YAML Format"); + } catch (Exception ex) { + throw new RuntimeException( + "Unable to generate YAML file from Blueprint or the generated YAML is not valid", + ex); + } } - String version = "#blueprint_version: " + cs.getSelf().getVersion() + '\n'; - String description = "#description: " + cs.getSelf().getDescription() + '\n'; - - BufferedWriter writer = new BufferedWriter(new FileWriter(outputFile, false)); - writer.write(description); - writer.write(version); - - if(input.getBpType().equals("dti") || input.getBpType().equals("m") || input.getBpType().equals("k")) - writer.write(comment); - - writer.close(); - - PrintWriter out = new PrintWriter(new BufferedWriter(new FileWriter(outputFile, true))); - yamlObjectMapper.writeValue(out, blueprint); - out.close(); - - if(input.getBpType().equals("dti") || input.getBpType().equals("m") || input.getBpType().equals("k")) - fixesService.fixDcaeSingleQuotes(outputFile); - else - fixesService.fixOnapSingleQuotes(outputFile); - - //new Yaml().load(new FileInputStream(outputFile)); - - System.out.println("Blueprint is created with valid YAML Format"); - } catch (Exception ex) { - throw new RuntimeException("Unable to generate YAML file from Blueprint or the generated YAML is not valid", ex); + /** + * Add quotes for given input + * + * @param inputs Inputs + * @return + */ + public Map<String, LinkedHashMap<String, Object>> addQuotes( + Map<String, LinkedHashMap<String, Object>> inputs) { + + inputs.forEach( + (key, value) -> { + if (value.get("type") != null) { + if (value.get("type").equals("string") + && value.get("default") != null + && !key.contains("policies")) { + value.replace("default", "'" + value.get("default").toString() + "'"); + } else if (value.get("type").equals("map") || value.get("type") + .equals("list")) { + // Commented the Code as we need to read the object as is for Map and List. If the + // List object is to be converted to string uncomment the below code. + /* if(inputs.get(s).get("type").equals("list")) { + String temp = inputs.get(s).get("default").toString(); + inputs.get(s).replace("default", temp); + }*/ + inputs.get(key).remove("type"); + } + } + }); + + return inputs; } - } - - // Used for DCAE - public Map<String, LinkedHashMap<String, Object>> addQuotes(Map<String, LinkedHashMap<String, Object>> inputs) { - - inputs.forEach((key,value) -> { - if(value.get("type") != null){ - if (value.get("type").equals("string") && value.get("default") != null && !key.contains("policies")){ - value.replace("default", "'" + value.get("default").toString() + "'"); - } else if (value.get("type").equals("map") || value.get("type").equals("list")) { - // Commented the Code as we need to read the object as is for Map and List. If the List object is to be converted to string uncomment the below code. - /* if(inputs.get(s).get("type").equals("list")) { - String temp = inputs.get(s).get("default").toString(); - inputs.get(s).replace("default", temp); - }*/ - inputs.get(key).remove("type"); - } - } - }); - - return inputs; - } - public String blueprintToString(ComponentSpec componentSpec, Blueprint blueprint, Input input) { - String ret = ""; - try { - ret = yamlObjectMapper.writerWithDefaultPrettyPrinter().writeValueAsString(blueprint); - } catch (JsonProcessingException e) { - e.printStackTrace(); + /** + * Converts Blueprint to String format + * + * @param componentSpec ComponentSpec + * @param blueprint Blueprint + * @param input Input + * @return + */ + public String blueprintToString(ComponentSpec componentSpec, Blueprint blueprint, Input input) { + String ret = ""; + try { + ret = yamlObjectMapper.writerWithDefaultPrettyPrinter().writeValueAsString(blueprint); + } catch (JsonProcessingException e) { + e.printStackTrace(); + } + if (isBpTypeMatches(input)) { + ret = + "# " + + componentSpec.getSelf().getDescription() + + "\n" + + "# " + + componentSpec.getSelf().getVersion() + + "\n" + + "# " + + input.getComment() + + "\n" + + ret; + ret = fixesService.fixStringQuotes(ret); + } else { + ret = fixesService.applyFixes(ret); + } + return ret; } - if(input.getBpType().equals("dti") || input.getBpType().equals("m") || input.getBpType().equals("k")){ - ret = "# " + componentSpec.getSelf().getDescription() + "\n" + "# " + componentSpec.getSelf().getVersion() + "\n" + "# " + input.getComment() + "\n" + ret; - ret = fixesService.fixStringQuotes(ret); - }else - ret = fixesService.applyFixes(ret); - return ret; - } - + private boolean isBpTypeMatches(Input input) { + return input.getBpType().equals("dti") + || input.getBpType().equals("m") + || input.getBpType().equals("k"); + } } diff --git a/mod/bpgenerator/common/src/main/java/org/onap/blueprintgenerator/service/base/FixesService.java b/mod/bpgenerator/common/src/main/java/org/onap/blueprintgenerator/service/base/FixesService.java index d848cac..4c6debc 100644 --- a/mod/bpgenerator/common/src/main/java/org/onap/blueprintgenerator/service/base/FixesService.java +++ b/mod/bpgenerator/common/src/main/java/org/onap/blueprintgenerator/service/base/FixesService.java @@ -26,7 +26,6 @@ package org.onap.blueprintgenerator.service.base; import org.onap.blueprintgenerator.exception.FixesException; import org.springframework.stereotype.Service; - import java.io.BufferedReader; import java.io.BufferedWriter; import java.io.FileWriter; @@ -38,133 +37,166 @@ import java.util.List; /** * @author : Ravi Mantena - * @date 10/16/2020 - * Application: DCAE/ONAP - Blueprint Generator - * Common Module: Used by both ONAp and DCAE Blueprint Applications - * Service: For Blueprint Quotes Fixes + * @date 10/16/2020 Application: DCAE/ONAP - Blueprint Generator Common Module: Used by both ONAp + * and DCAE Blueprint Applications Service: For Blueprint Quotes Fixes */ - @Service public class FixesService { - public void fixDcaeSingleQuotes(File file) { - List<String> lines = new ArrayList<>(); - try { - FileReader fr = new FileReader(file); - BufferedReader br = new BufferedReader(fr); - for (String line = br.readLine(); line != null; line = br.readLine()){ - if(line.contains("'")) { - line = line.replaceAll("'\\{", "{"); - line = line.replaceAll("}'", "}"); - line = line.replaceAll("'\\[", "["); - line = line.replaceAll("]'", "]"); - line = line.replaceAll("'''''", "'"); - line = line.replaceAll("'''", "'"); - line = line.replaceAll("'''", ""); - line = line.replaceAll("''\\{", "'{"); - line = line.replaceAll("}''", "}'"); - line = line.replaceAll("''\\[", "'["); - line = line.replaceAll("]''", "]'"); - line = line.replaceAll("\"''", "'"); - line = line.replaceAll("''\"", "'"); - } - if(line.contains("get_input") || line.contains("get_secret") || line.contains("envs")) - line = line.replaceAll("'", ""); - - lines.add(line); - } - - fr.close(); - br.close(); - - FileWriter fw = new FileWriter(file); - PrintWriter out = new PrintWriter(new BufferedWriter(new FileWriter(file, true))); - for(String s: lines) { - out.println(); - out.write(s); - out.flush(); - } - out.close(); - fw.close(); - } catch (Exception e) { - throw new FixesException("Unable to Fix Single Quotes in Final DCAE Blueprint", e); - } - } - - public String fixStringQuotes(String string) { - String sLines[] = string.split("\n"); - String ret = ""; - for(String line: sLines) { - if(line.contains("get_input") || line.contains("get_secret") || ((line.contains("concat") || line.contains("default: ") || line.contains("description") || line.contains("dmaap") || line.contains(".\"'")) && line.contains("'"))) - line = line.replaceAll("'", ""); - - if(line.contains("'")) { - line = line.replaceAll("'\\{", "{"); - line = line.replaceAll("}'", "}"); - line = line.replaceAll("'\\[", "["); - line = line.replaceAll("]'", "]"); - line = line.replaceAll("'''''", "'"); - line = line.replaceAll("'''", "'"); - line = line.replaceAll("'''", ""); - line = line.replaceAll("''\\{", "'{"); - line = line.replaceAll("}''", "}'"); - line = line.replaceAll("''\\[", "'["); - line = line.replaceAll("]''", "]'"); - line = line.replaceAll("\"''", "'"); - line = line.replaceAll("''\"", "'"); - } - ret = ret + "\n" + line; - } - return ret; - } - - public void fixOnapSingleQuotes(File file) { - List<String> lines = new ArrayList<>(); - try { - FileReader fr = new FileReader(file); - BufferedReader br = new BufferedReader(fr); - for (String line = br.readLine(); line != null; line = br.readLine()){ - if(line.contains("'")) { - line = line.replace("'", ""); - } - if(line.contains("\"\"") && (line.contains("m") || line.contains("M"))) { - line = line.replaceAll("\"\"", "\""); - } - lines.add(line); - - } - fr.close(); - br.close(); - FileWriter fw = new FileWriter(file); - PrintWriter out = new PrintWriter(new BufferedWriter(new FileWriter(file, true))); - for(String s: lines) { - out.println(); - out.write(s); - out.flush(); - } - - out.close(); - fw.close(); - - } catch (Exception e) { - throw new FixesException("Unable to Fix Single Quotes in final ONAP Blueprint", e); - } - } - - private String ensureNoSingleQuotes(String line) { - if ((line.contains("concat") || line.contains("default: ") || line.contains("description") || line.contains("dmaap") || line.contains(".\"'")) && line.contains("'")) - return line.replace("'", ""); - else - return line; - } - - public String applyFixes(String bp) { - List<String> lines = new ArrayList<>(); - String[] linesPre = bp.split("\n"); - for (String line : linesPre) { - lines.add(ensureNoSingleQuotes(line)); - } - return String.join("\n", lines); - } - + /** + * Interface to fix Single Quotes in the generated Blueprint + * + * @param file File + * @return + */ + public void fixDcaeSingleQuotes(File file) { + List<String> lines = new ArrayList<>(); + try { + FileReader fr = new FileReader(file); + BufferedReader br = new BufferedReader(fr); + for (String line = br.readLine(); line != null; line = br.readLine()) { + if (line.contains("'")) { + line = processLine(line); + } + if (line.contains("get_input") || line.contains("get_secret") || line + .contains("envs")) { + line = line.replaceAll("'", ""); + } + + lines.add(line); + } + + fr.close(); + br.close(); + + FileWriter fw = new FileWriter(file); + PrintWriter out = new PrintWriter(new BufferedWriter(new FileWriter(file, true))); + for (String s : lines) { + out.println(); + out.write(s); + out.flush(); + } + out.close(); + fw.close(); + } catch (Exception e) { + throw new FixesException("Unable to Fix Single Quotes in Final DCAE Blueprint", e); + } + } + + /** + * Interface to fix String Quotes in the generated Blueprint + * + * @param string String + * @return + */ + public String fixStringQuotes(String string) { + String sLines[] = string.split("\n"); + String ret = ""; + for (String line : sLines) { + if (line.contains("get_input") + || line.contains("get_secret") + || ((line.contains("concat") + || line.contains("default: ") + || line.contains("description") + || line.contains("dmaap") + || line.contains(".\"'")) + && line.contains("'"))) { + line = line.replaceAll("'", ""); + } + + if (line.contains("'")) { + line = processLine(line); + } + ret = ret + "\n" + line; + } + return ret; + } + + /** + * Interface to fix Single Quotes in the generated ONAP Blueprint + * + * @param file File + * @return + */ + public void fixOnapSingleQuotes(File file) { + List<String> lines = new ArrayList<>(); + try { + FileReader fr = new FileReader(file); + BufferedReader br = new BufferedReader(fr); + for (String line = br.readLine(); line != null; line = br.readLine()) { + if (line.contains("'")) { + line = line.replace("'", ""); + } + if (line.contains("\"\"") && (line.contains("m") || line.contains("M"))) { + line = line.replaceAll("\"\"", "\""); + } + lines.add(line); + } + fr.close(); + br.close(); + FileWriter fw = new FileWriter(file); + PrintWriter out = new PrintWriter(new BufferedWriter(new FileWriter(file, true))); + for (String s : lines) { + out.println(); + out.write(s); + out.flush(); + } + + out.close(); + fw.close(); + + } catch (Exception e) { + throw new FixesException("Unable to Fix Single Quotes in final ONAP Blueprint", e); + } + } + + /** + * Interface to fix Single Quotes for given line + * + * @param line Line + * @return + */ + private String ensureNoSingleQuotes(String line) { + if ((line.contains("concat") + || line.contains("default: ") + || line.contains("description") + || line.contains("dmaap") + || line.contains(".\"'")) + && line.contains("'")) { + return line.replace("'", ""); + } else { + return line; + } + } + + /** + * Interface to Applt fixes for Quotes + * + * @param bp Blueprint + * @return + */ + public String applyFixes(String bp) { + List<String> lines = new ArrayList<>(); + String[] linesPre = bp.split("\n"); + for (String line : linesPre) { + lines.add(ensureNoSingleQuotes(line)); + } + return String.join("\n", lines); + } + + private String processLine(String line) { + return line.replaceAll("'\\{", "{") + .replaceAll("}'", "}") + .replaceAll("'\\[", "[") + .replaceAll("]'", "]") + .replaceAll("'''''", "'") + .replaceAll("'''", "'") + .replaceAll("'''", "") + .replaceAll("''\\{", "'{") + .replaceAll("}''", "}'") + .replaceAll("''\\[", "'[") + .replaceAll("]''", "]'") + .replaceAll("\"''", "'") + .replaceAll("''\"", "'"); + } } diff --git a/mod/bpgenerator/common/src/main/java/org/onap/policycreate/exception/PolicyCreateException.java b/mod/bpgenerator/common/src/main/java/org/onap/policycreate/exception/PolicyCreateException.java index e848437..d18b414 100644 --- a/mod/bpgenerator/common/src/main/java/org/onap/policycreate/exception/PolicyCreateException.java +++ b/mod/bpgenerator/common/src/main/java/org/onap/policycreate/exception/PolicyCreateException.java @@ -25,18 +25,21 @@ package org.onap.policycreate.exception; /** * @author : Ravi Mantena - * @date 10/16/2020 - * Application: DCAE/ONAP - Blueprint Generator - * Common Module: Used by both ONAp and DCAE Blueprint Applications - * Exception: For Policy Create + * @date 10/16/2020 Application: DCAE/ONAP - Blueprint Generator Common Module: Used by both ONAp + * and DCAE Blueprint Applications Exception: To handle error messages for Policy Create exceptions */ +public class PolicyCreateException extends RuntimeException { -public class PolicyCreateException extends RuntimeException{ - + /** + * Handles Policy Create Exception for Error Message + */ public PolicyCreateException(String errorMessage) { super(errorMessage); } + /** + * Handles Policy Create Exception for Error Message and Error + */ public PolicyCreateException(String errorMessage, Throwable err) { super(errorMessage, err); } diff --git a/mod/bpgenerator/common/src/main/java/org/onap/policycreate/model/PolicyModel.java b/mod/bpgenerator/common/src/main/java/org/onap/policycreate/model/PolicyModel.java index 3d8c1a7..009ca1e 100644 --- a/mod/bpgenerator/common/src/main/java/org/onap/policycreate/model/PolicyModel.java +++ b/mod/bpgenerator/common/src/main/java/org/onap/policycreate/model/PolicyModel.java @@ -31,19 +31,14 @@ import java.util.Map; /** * @author : Ravi Mantena - * @date 10/16/2020 - * Application: DCAE/ONAP - Blueprint Generator - * Common Module: Used by both ONAp and DCAE Blueprint Applications - * Policy Create Model: For Policy Model + * @date 10/16/2020 Application: DCAE/ONAP - Blueprint Generator Common Module: Used by both ONAp + * and DCAE Blueprint Applications Policy Create Model: A model class which represents Policy Model */ - @Data -@JsonInclude(value=Include.NON_NULL) +@JsonInclude(value = Include.NON_NULL) public class PolicyModel { private String tosca_definition_version; private Map<String, PolicyModelNode> node_types; private Map<String, PolicyModelNode> data_types; - } - diff --git a/mod/bpgenerator/common/src/main/java/org/onap/policycreate/model/PolicyModelNode.java b/mod/bpgenerator/common/src/main/java/org/onap/policycreate/model/PolicyModelNode.java index eac29b6..7b2f759 100644 --- a/mod/bpgenerator/common/src/main/java/org/onap/policycreate/model/PolicyModelNode.java +++ b/mod/bpgenerator/common/src/main/java/org/onap/policycreate/model/PolicyModelNode.java @@ -31,17 +31,14 @@ import java.util.Map; /** * @author : Ravi Mantena - * @date 10/16/2020 - * Application: DCAE/ONAP - Blueprint Generator - * Common Module: Used by both ONAp and DCAE Blueprint Applications - * Policy Create Model: For Policy Model Node + * @date 10/16/2020 Application: DCAE/ONAP - Blueprint Generator Common Module: Used by both ONAp + * and DCAE Blueprint Applications Policy Create Model: A model class which represents Policy Model + * Node */ - @Data -@JsonInclude(value=Include.NON_NULL) +@JsonInclude(value = Include.NON_NULL) public class PolicyModelNode { - private String derived_from; - private Map<String, PolicyProperties> properties; - + private String derived_from; + private Map<String, PolicyProperties> properties; } diff --git a/mod/bpgenerator/common/src/main/java/org/onap/policycreate/model/PolicyProperties.java b/mod/bpgenerator/common/src/main/java/org/onap/policycreate/model/PolicyProperties.java index f12e76d..3812e73 100644 --- a/mod/bpgenerator/common/src/main/java/org/onap/policycreate/model/PolicyProperties.java +++ b/mod/bpgenerator/common/src/main/java/org/onap/policycreate/model/PolicyProperties.java @@ -29,17 +29,14 @@ import lombok.Data; /** * @author : Ravi Mantena - * @date 10/16/2020 - * Application: DCAE/ONAP - Blueprint Generator - * Common Module: Used by both ONAp and DCAE Blueprint Applications - * Policy Create Model: For Policy Properties + * @date 10/16/2020 Application: DCAE/ONAP - Blueprint Generator Common Module: Used by both ONAp + * and DCAE Blueprint Applications Policy Create Model: A model class which represents Policy + * Properties */ - @Data -@JsonInclude(value=Include.NON_NULL) +@JsonInclude(value = Include.NON_NULL) public class PolicyProperties { - private String type; - private Object entry_schema; - -}
\ No newline at end of file + private String type; + private Object entry_schema; +} |