diff options
Diffstat (limited to 'mod2/catalog-service/src/main/java/org/onap/dcaegen2/platform/mod/model/deploymentartifact')
5 files changed, 192 insertions, 0 deletions
diff --git a/mod2/catalog-service/src/main/java/org/onap/dcaegen2/platform/mod/model/deploymentartifact/DeploymentArtifact.java b/mod2/catalog-service/src/main/java/org/onap/dcaegen2/platform/mod/model/deploymentartifact/DeploymentArtifact.java new file mode 100644 index 0000000..600c735 --- /dev/null +++ b/mod2/catalog-service/src/main/java/org/onap/dcaegen2/platform/mod/model/deploymentartifact/DeploymentArtifact.java @@ -0,0 +1,51 @@ +/* + * ============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.dcaegen2.platform.mod.model.deploymentartifact; + +import lombok.Data; +import org.springframework.data.mongodb.core.mapping.Document; + +import java.util.Map; + +/** + * A model class which represents Deployment-Artifact entity + */ +@Data +@Document("deployment-artifact") +public class DeploymentArtifact { + + private String id; + + private Integer version; + + private String content; + + private String fileName; + + private DeploymentArtifactStatus status; + + private Map<String, Object> metadata; + + private MsInstanceInfo msInstanceInfo; + + private Map<String, Object> specificationInfo; + +} diff --git a/mod2/catalog-service/src/main/java/org/onap/dcaegen2/platform/mod/model/deploymentartifact/DeploymentArtifactFilter.java b/mod2/catalog-service/src/main/java/org/onap/dcaegen2/platform/mod/model/deploymentartifact/DeploymentArtifactFilter.java new file mode 100644 index 0000000..870ca46 --- /dev/null +++ b/mod2/catalog-service/src/main/java/org/onap/dcaegen2/platform/mod/model/deploymentartifact/DeploymentArtifactFilter.java @@ -0,0 +1,40 @@ +/* + * ============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.dcaegen2.platform.mod.model.deploymentartifact; + +import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.Data; + +/** + * A model class to construct a filter that can be passed in DeploymentArtifactSearch + * @see org.onap.dcaegen2.platform.mod.model.deploymentartifact.DeploymentArtifactSearch + */ +@Data +public class DeploymentArtifactFilter { + @JsonProperty("release") + private String release; + + @JsonProperty("status") + private DeploymentArtifactStatus status; + + @JsonProperty("tag") + private String tag; +} diff --git a/mod2/catalog-service/src/main/java/org/onap/dcaegen2/platform/mod/model/deploymentartifact/DeploymentArtifactSearch.java b/mod2/catalog-service/src/main/java/org/onap/dcaegen2/platform/mod/model/deploymentartifact/DeploymentArtifactSearch.java new file mode 100644 index 0000000..9e955cd --- /dev/null +++ b/mod2/catalog-service/src/main/java/org/onap/dcaegen2/platform/mod/model/deploymentartifact/DeploymentArtifactSearch.java @@ -0,0 +1,38 @@ +/* + * ============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.dcaegen2.platform.mod.model.deploymentartifact; + +import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.Data; + +/** + * A model class to define Deployment-Artifact's searching criteria. + */ +@Data +public class DeploymentArtifactSearch { + + @JsonProperty("filter") + private DeploymentArtifactFilter filter; + + public DeploymentArtifactSearch() { + this.filter = new DeploymentArtifactFilter(); + } +} diff --git a/mod2/catalog-service/src/main/java/org/onap/dcaegen2/platform/mod/model/deploymentartifact/DeploymentArtifactStatus.java b/mod2/catalog-service/src/main/java/org/onap/dcaegen2/platform/mod/model/deploymentartifact/DeploymentArtifactStatus.java new file mode 100644 index 0000000..4ee4e0e --- /dev/null +++ b/mod2/catalog-service/src/main/java/org/onap/dcaegen2/platform/mod/model/deploymentartifact/DeploymentArtifactStatus.java @@ -0,0 +1,30 @@ +/* + * ============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.dcaegen2.platform.mod.model.deploymentartifact; + +/** + * Supported Statuses for a Deployment-Artifact + */ +public enum DeploymentArtifactStatus { + + IN_DEV, NOT_NEEDED, DEV_COMPLETE, + IN_PROD, PROD_FAILED +} diff --git a/mod2/catalog-service/src/main/java/org/onap/dcaegen2/platform/mod/model/deploymentartifact/MsInstanceInfo.java b/mod2/catalog-service/src/main/java/org/onap/dcaegen2/platform/mod/model/deploymentartifact/MsInstanceInfo.java new file mode 100644 index 0000000..665961c --- /dev/null +++ b/mod2/catalog-service/src/main/java/org/onap/dcaegen2/platform/mod/model/deploymentartifact/MsInstanceInfo.java @@ -0,0 +1,33 @@ +/* + * ============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.dcaegen2.platform.mod.model.deploymentartifact; + +import lombok.Data; + +/** + * MsInstance Reference model used in DeploymentArtifact entity + */ +@Data +public class MsInstanceInfo { + String id; + String name; + String release; +} |