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.mso.bpmn.core.domain;
\r
23 import java.io.Serializable;
\r
24 import java.util.ArrayList;
\r
25 import java.util.Arrays;
\r
26 import java.util.List;
\r
28 import org.json.JSONArray;
\r
30 import com.fasterxml.jackson.annotation.JsonIgnore;
\r
31 import com.fasterxml.jackson.annotation.JsonInclude;
\r
32 import com.fasterxml.jackson.annotation.JsonRootName;
\r
35 * Stores licensing information and is an attribute
\r
36 * of a <class>HomingSolution</class>
\r
39 @JsonRootName("license")
\r
40 @JsonInclude(JsonInclude.Include.NON_EMPTY)
\r
41 public class License extends JsonWrapper implements Serializable {
\r
43 private static final long serialVersionUID = 1L;
\r
45 StringBuilder sb = new StringBuilder();
\r
47 @JsonInclude(JsonInclude.Include.NON_EMPTY)
\r
48 private List<String> entitlementPoolList = new ArrayList<String>();
\r
49 @JsonInclude(JsonInclude.Include.NON_EMPTY)
\r
50 private List<String> licenseKeyGroupList = new ArrayList<String>();
\r
53 public List<String> getEntitlementPoolList() {
\r
54 return entitlementPoolList;
\r
57 public void setEntitlementPoolList(List<String> entitlementPoolList) {
\r
58 this.entitlementPoolList = entitlementPoolList;
\r
61 public List<String> getLicenseKeyGroupList() {
\r
62 return licenseKeyGroupList;
\r
65 public void setLicenseKeyGroupList(List<String> licenseKeyGroupList) {
\r
66 this.licenseKeyGroupList = licenseKeyGroupList;
\r
70 * This method adds a Entitlement Pool Uuid
\r
71 * to the EntitlementPoolList
\r
73 * @param the EntitlementPoolUuid
\r
75 public void addEntitlementPool(String entitlementPoolUuid) {
\r
76 entitlementPoolList.add(entitlementPoolUuid);
\r
80 * This method adds a License Key Group Uuid
\r
81 * to the LicenseKeyGroupList
\r
83 * @param the licenseKeyGroupUuid
\r
85 public void addLicenseKeyGroup(String licenseKeyGroupUuid) {
\r
86 licenseKeyGroupList.add(licenseKeyGroupUuid);
\r
90 * This method returns the licenseKeyGroupList
\r
93 * @return the strList
\r
96 public JSONArray getLicenseKeyGroupListAsString() {
\r
97 JSONArray array = new JSONArray(licenseKeyGroupList);
\r
102 * This method returns the entitlementPoolList
\r
105 * @return the strList
\r
108 public JSONArray getEntitlementPoolListAsString() {
\r
109 JSONArray array = new JSONArray(entitlementPoolList);
\r
114 * @return the serialversionuid
\r
116 public static long getSerialversionuid() {
\r
117 return serialVersionUID;
\r