diff options
Diffstat (limited to 'mod/bpgenerator/common/src/main/java/org/onap/blueprintgenerator/model/common')
9 files changed, 480 insertions, 0 deletions
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 new file mode 100644 index 0000000..3a18b70 --- /dev/null +++ b/mod/bpgenerator/common/src/main/java/org/onap/blueprintgenerator/model/common/Appconfig.java @@ -0,0 +1,64 @@ +/* + * + * * ============LICENSE_START======================================================= + * * org.onap.dcae + * * ================================================================================ + * * Copyright (c) 2020 AT&T Intellectual Property. All rights reserved. + * * ================================================================================ + * * Licensed under the Apache License, Version 2.0 (the "License"); + * * you may not use this file except in compliance with the License. + * * You may obtain a copy of the License at + * * + * * http://www.apache.org/licenses/LICENSE-2.0 + * * + * * Unless required by applicable law or agreed to in writing, software + * * distributed under the License is distributed on an "AS IS" BASIS, + * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * See the License for the specific language governing permissions and + * * limitations under the License. + * * ============LICENSE_END========================================================= + * + * + */ + +package org.onap.blueprintgenerator.model.common; + +import org.onap.blueprintgenerator.model.componentspec.common.Calls; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import lombok.Data; + +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 + */ + +@Data +@JsonInclude(value = JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown = true) +public class Appconfig { + + private Calls[] services_calls; + + private Map<String, Dmaap> streams_publishes; + + private Map<String, Dmaap> streams_subscribes; + + private Map<String, Object> params; + + @JsonAnyGetter //The Map is persisted as flattened properties of the target POJO. + public Map<String, Object> getParams() { + return params; + } + + //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 new file mode 100644 index 0000000..d3b3c01 --- /dev/null +++ b/mod/bpgenerator/common/src/main/java/org/onap/blueprintgenerator/model/common/Concat.java @@ -0,0 +1,48 @@ +/* + * + * * ============LICENSE_START======================================================= + * * org.onap.dcae + * * ================================================================================ + * * Copyright (c) 2020 AT&T Intellectual Property. All rights reserved. + * * ================================================================================ + * * Licensed under the Apache License, Version 2.0 (the "License"); + * * you may not use this file except in compliance with the License. + * * You may obtain a copy of the License at + * * + * * http://www.apache.org/licenses/LICENSE-2.0 + * * + * * Unless required by applicable law or agreed to in writing, software + * * distributed under the License is distributed on an "AS IS" BASIS, + * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * See the License for the specific language governing permissions and + * * limitations under the License. + * * ============LICENSE_END========================================================= + * + * + */ + +package org.onap.blueprintgenerator.model.common; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import lombok.Data; + +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 + */ + +@Data +@JsonInclude(value = JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown = true) +public class 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 new file mode 100644 index 0000000..49e029f --- /dev/null +++ b/mod/bpgenerator/common/src/main/java/org/onap/blueprintgenerator/model/common/DataRouter.java @@ -0,0 +1,47 @@ +/* + * + * * ============LICENSE_START======================================================= + * * org.onap.dcae + * * ================================================================================ + * * Copyright (c) 2020 AT&T Intellectual Property. All rights reserved. + * * ================================================================================ + * * Licensed under the Apache License, Version 2.0 (the "License"); + * * you may not use this file except in compliance with the License. + * * You may obtain a copy of the License at + * * + * * http://www.apache.org/licenses/LICENSE-2.0 + * * + * * Unless required by applicable law or agreed to in writing, software + * * distributed under the License is distributed on an "AS IS" BASIS, + * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * See the License for the specific language governing permissions and + * * limitations under the License. + * * ============LICENSE_END========================================================= + * + * + */ + +package org.onap.blueprintgenerator.model.common; + + +import org.onap.blueprintgenerator.constants.Constants; +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 Data Router + */ + +@Data +@JsonInclude(value = JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown = true) +public class DataRouter extends Dmaap { + + 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 new file mode 100644 index 0000000..de3b31e --- /dev/null +++ b/mod/bpgenerator/common/src/main/java/org/onap/blueprintgenerator/model/common/Dmaap.java @@ -0,0 +1,53 @@ +/* + * + * * ============LICENSE_START======================================================= + * * org.onap.dcae + * * ================================================================================ + * * Copyright (c) 2020 AT&T Intellectual Property. All rights reserved. + * * ================================================================================ + * * Licensed under the Apache License, Version 2.0 (the "License"); + * * you may not use this file except in compliance with the License. + * * You may obtain a copy of the License at + * * + * * http://www.apache.org/licenses/LICENSE-2.0 + * * + * * Unless required by applicable law or agreed to in writing, software + * * distributed under the License is distributed on an "AS IS" BASIS, + * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * See the License for the specific language governing permissions and + * * limitations under the License. + * * ============LICENSE_END========================================================= + * + * + */ + +package org.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 + */ + +@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 GetInput pass; + + private GetInput user; + +}
\ No newline at end of file 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 new file mode 100644 index 0000000..cc87014 --- /dev/null +++ b/mod/bpgenerator/common/src/main/java/org/onap/blueprintgenerator/model/common/GetInput.java @@ -0,0 +1,54 @@ +/* + * + * * ============LICENSE_START======================================================= + * * org.onap.dcae + * * ================================================================================ + * * Copyright (c) 2020 AT&T Intellectual Property. All rights reserved. + * * ================================================================================ + * * Licensed under the Apache License, Version 2.0 (the "License"); + * * you may not use this file except in compliance with the License. + * * You may obtain a copy of the License at + * * + * * http://www.apache.org/licenses/LICENSE-2.0 + * * + * * Unless required by applicable law or agreed to in writing, software + * * distributed under the License is distributed on an "AS IS" BASIS, + * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * See the License for the specific language governing permissions and + * * limitations under the License. + * * ============LICENSE_END========================================================= + * + * + */ + +package org.onap.blueprintgenerator.model.common; + + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.AllArgsConstructor; +import lombok.Data; +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 + */ + +@Data +@JsonInclude(value = JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown = true) +@AllArgsConstructor +@NoArgsConstructor +public class GetInput { + + //private Object get_input; + + @JsonProperty("get_input") + private Object bpInputName; + +}
\ No newline at end of file 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 new file mode 100644 index 0000000..0514d20 --- /dev/null +++ b/mod/bpgenerator/common/src/main/java/org/onap/blueprintgenerator/model/common/GetProperty.java @@ -0,0 +1,47 @@ +/* + * + * * ============LICENSE_START======================================================= + * * org.onap.dcae + * * ================================================================================ + * * Copyright (c) 2020 AT&T Intellectual Property. All rights reserved. + * * ================================================================================ + * * Licensed under the Apache License, Version 2.0 (the "License"); + * * you may not use this file except in compliance with the License. + * * You may obtain a copy of the License at + * * + * * http://www.apache.org/licenses/LICENSE-2.0 + * * + * * Unless required by applicable law or agreed to in writing, software + * * distributed under the License is distributed on an "AS IS" BASIS, + * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * See the License for the specific language governing permissions and + * * limitations under the License. + * * ============LICENSE_END========================================================= + * + * + */ + +package org.onap.blueprintgenerator.model.common; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import lombok.Data; + +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 + */ + +@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 new file mode 100644 index 0000000..eacf20e --- /dev/null +++ b/mod/bpgenerator/common/src/main/java/org/onap/blueprintgenerator/model/common/Imports.java @@ -0,0 +1,45 @@ +/* + * + * * ============LICENSE_START======================================================= + * * org.onap.dcae + * * ================================================================================ + * * Copyright (c) 2020 AT&T Intellectual Property. All rights reserved. + * * ================================================================================ + * * Licensed under the Apache License, Version 2.0 (the "License"); + * * you may not use this file except in compliance with the License. + * * You may obtain a copy of the License at + * * + * * http://www.apache.org/licenses/LICENSE-2.0 + * * + * * Unless required by applicable law or agreed to in writing, software + * * distributed under the License is distributed on an "AS IS" BASIS, + * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * See the License for the specific language governing permissions and + * * limitations under the License. + * * ============LICENSE_END========================================================= + * + * + */ + +package org.onap.blueprintgenerator.model.common; + +import com.fasterxml.jackson.annotation.JsonInclude; +import lombok.Data; + +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 + */ + +@Data +@JsonInclude(value = JsonInclude.Include.NON_NULL) +public class 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 new file mode 100644 index 0000000..781ce2e --- /dev/null +++ b/mod/bpgenerator/common/src/main/java/org/onap/blueprintgenerator/model/common/Input.java @@ -0,0 +1,72 @@ +/* + * + * * ============LICENSE_START======================================================= + * * org.onap.dcae + * * ================================================================================ + * * Copyright (c) 2020 AT&T Intellectual Property. All rights reserved. + * * ================================================================================ + * * Licensed under the Apache License, Version 2.0 (the "License"); + * * you may not use this file except in compliance with the License. + * * You may obtain a copy of the License at + * * + * * http://www.apache.org/licenses/LICENSE-2.0 + * * + * * Unless required by applicable law or agreed to in writing, software + * * distributed under the License is distributed on an "AS IS" BASIS, + * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * See the License for the specific language governing permissions and + * * limitations under the License. + * * ============LICENSE_END========================================================= + * + * + */ + +package org.onap.blueprintgenerator.model.common; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import lombok.Data; + +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 + */ + +@Data +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown = true) +public class Input { + + private String componentSpecPath; + + private String bluePrintName; + + private String outputPath; + + private String policyPath; + + private String bpType; + + private int numPolicies; + + private int numPolicy; + + private String comment; + + private boolean useExisting; + + private List<String> imports; + + private boolean useDti; + + //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 new file mode 100644 index 0000000..7d96785 --- /dev/null +++ b/mod/bpgenerator/common/src/main/java/org/onap/blueprintgenerator/model/common/MessageRouter.java @@ -0,0 +1,50 @@ +/* + * + * * ============LICENSE_START======================================================= + * * org.onap.dcae + * * ================================================================================ + * * Copyright (c) 2020 AT&T Intellectual Property. All rights reserved. + * * ================================================================================ + * * Licensed under the Apache License, Version 2.0 (the "License"); + * * you may not use this file except in compliance with the License. + * * You may obtain a copy of the License at + * * + * * http://www.apache.org/licenses/LICENSE-2.0 + * * + * * Unless required by applicable law or agreed to in writing, software + * * distributed under the License is distributed on an "AS IS" BASIS, + * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * See the License for the specific language governing permissions and + * * limitations under the License. + * * ============LICENSE_END========================================================= + * + * + */ + +package org.onap.blueprintgenerator.model.common; + +import org.onap.blueprintgenerator.constants.Constants; +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 Message Router + */ + +@Data +@JsonInclude(value = JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown = true) +public class MessageRouter extends Dmaap { + + private String type = Constants.MESSAGE_ROUTER; + + private Object aaf_password; + + private Object aaf_username; + +} |