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;
29 public class ActionArtifact {
30 private String artifactUuId;
33 private Integer effectiveVersion;
35 private String artifactName;
36 private String artifactLabel;
37 private String artifactCategory;
38 private String artifactDescription;
39 private String artifactProtection;
40 private Date timestamp;
41 private byte[] artifact;
43 public String getArtifactUuId() {
47 public void setArtifactUuId(String artifactUuId) {
48 this.artifactUuId = artifactUuId;
51 public Integer getEffectiveVersion() {
52 return effectiveVersion;
55 public void setEffectiveVersion(Integer effectiveVersion) {
56 this.effectiveVersion = effectiveVersion;
59 public String getArtifactName() {
63 public void setArtifactName(String artifactName) {
64 this.artifactName = artifactName;
67 public String getArtifactLabel() {
71 public void setArtifactLabel(String artifactLabel) {
72 this.artifactLabel = artifactLabel;
75 public String getArtifactCategory() {
76 return artifactCategory;
79 public void setArtifactCategory(String artifactCategory) {
80 this.artifactCategory = artifactCategory;
83 public String getArtifactDescription() {
84 return artifactDescription;
87 public void setArtifactDescription(String artifactDescription) {
88 this.artifactDescription = artifactDescription;
91 public String getArtifactProtection() {
92 return artifactProtection;
95 public void setArtifactProtection(String artifactProtection) {
96 this.artifactProtection = artifactProtection;
99 public Date getTimestamp() {
103 public void setTimestamp(Date timestamp) {
104 this.timestamp = timestamp;
107 public byte[] getArtifact() {
111 public void setArtifact(byte[] artifact) {
112 this.artifact = artifact;
116 * To entity action artifact entity.
118 * @return the action artifact entity
120 public ActionArtifactEntity toEntity() {
121 ActionArtifactEntity destination = new ActionArtifactEntity();
122 destination.setArtifactUuId(this.getArtifactUuId());
123 destination.setEffectiveVersion(this.getEffectiveVersion());
124 destination.setArtifact(ByteBuffer.wrap(this.getArtifact()));
130 public boolean equals(Object obj) {
131 if (obj instanceof ActionArtifact) {
132 ActionArtifact temp = (ActionArtifact) obj;
133 if (artifactUuId.equals(temp.getArtifactUuId())) {