2 * ============LICENSE_START=======================================================
4 * ================================================================================
5 * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
6 * ================================================================================
7 * Licensed under the Apache License, Version 2.0 (the "License");
8 * you may not use this file except in compliance with the License.
9 * You may obtain a copy of the License at
11 * http://www.apache.org/licenses/LICENSE-2.0
13 * Unless required by applicable law or agreed to in writing, software
14 * distributed under the License is distributed on an "AS IS" BASIS,
15 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 * See the License for the specific language governing permissions and
17 * limitations under the License.
18 * ============LICENSE_END=========================================================
21 package org.openecomp.sdc.action.types;
23 import com.fasterxml.jackson.annotation.JsonIgnore;
24 import org.openecomp.sdc.action.dao.types.ActionArtifactEntity;
26 import java.nio.ByteBuffer;
27 import java.util.Date;
30 public class ActionArtifact {
31 private String artifactUuId;
34 private Integer effectiveVersion;
36 private String artifactName;
37 private String artifactLabel;
38 private String artifactCategory;
39 private String artifactDescription;
40 private String artifactProtection;
41 private Date timestamp;
42 private byte[] artifact;
44 public String getArtifactUuId() {
48 public void setArtifactUuId(String artifactUuId) {
49 this.artifactUuId = artifactUuId;
52 public Integer getEffectiveVersion() {
53 return effectiveVersion;
56 public void setEffectiveVersion(Integer effectiveVersion) {
57 this.effectiveVersion = effectiveVersion;
60 public String getArtifactName() {
64 public void setArtifactName(String artifactName) {
65 this.artifactName = artifactName;
68 public String getArtifactLabel() {
72 public void setArtifactLabel(String artifactLabel) {
73 this.artifactLabel = artifactLabel;
76 public String getArtifactCategory() {
77 return artifactCategory;
80 public void setArtifactCategory(String artifactCategory) {
81 this.artifactCategory = artifactCategory;
84 public String getArtifactDescription() {
85 return artifactDescription;
88 public void setArtifactDescription(String artifactDescription) {
89 this.artifactDescription = artifactDescription;
92 public String getArtifactProtection() {
93 return artifactProtection;
96 public void setArtifactProtection(String artifactProtection) {
97 this.artifactProtection = artifactProtection;
100 public Date getTimestamp() {
104 public void setTimestamp(Date timestamp) {
105 this.timestamp = timestamp;
108 public byte[] getArtifact() {
112 public void setArtifact(byte[] artifact) {
113 this.artifact = artifact;
117 * To entity action artifact entity.
119 * @return the action artifact entity
121 public ActionArtifactEntity toEntity() {
122 ActionArtifactEntity destination = new ActionArtifactEntity();
123 destination.setArtifactUuId(this.getArtifactUuId());
124 destination.setEffectiveVersion(this.getEffectiveVersion());
125 destination.setArtifact(ByteBuffer.wrap(this.getArtifact()));
131 public boolean equals(Object obj) {
132 if (obj instanceof ActionArtifact) {
133 ActionArtifact temp = (ActionArtifact) obj;
134 if (artifactUuId.equals(temp.getArtifactUuId())) {