2 * ============LICENSE_START=======================================================
4 * ================================================================================
5 * Copyright © 2017-18 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=========================================================
20 package org.onap.aai.setup;
22 import javax.annotation.PostConstruct;
23 import java.util.List;
24 import java.util.stream.Collectors;
26 public class SchemaServiceVersions extends SchemaVersions {
27 private List<String> versions;
28 private String edgeVersion;
29 private String defaultVersion;
30 private String depthVersion;
31 private String appRootVersion;
32 private String relatedLinkVersion;
33 private String namespaceChangeVersion;
37 public void initializeFromSchemaService() {
38 versionsValue = versions.stream().map(SchemaVersion::new).collect(Collectors.toList());
39 edgeLabelVersionValue = new SchemaVersion(edgeVersion);
40 defaultVersionValue = new SchemaVersion(defaultVersion);
41 depthVersionValue = new SchemaVersion(depthVersion);
42 appRootVersionValue = new SchemaVersion(appRootVersion);
43 relatedLinkVersionValue = new SchemaVersion(relatedLinkVersion);
44 namespaceChangeVersionValue = new SchemaVersion(namespaceChangeVersion);