forked from eclipse/winery
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Extend Relationship Types to specify configure interface
This change introduces the possibility in order to define "Interfaces" (in addition to Source and Target Interfaces) on Relationship Types. The new Interface is basically the implementation according to the new YAML specification. Here, one has the possibility to define a "Configure" interface with a couple of predefined operations (see spec for details). Signed-off-by: Michael Wurster <miwurster@googlemail.com>
- Loading branch information
1 parent
4691235
commit d120081
Showing
21 changed files
with
443 additions
and
277 deletions.
There are no files selected for viewing
57 changes: 57 additions & 0 deletions
57
org.eclipse.winery.model.tosca/src/main/java/org/eclipse/winery/model/tosca/TInterfaces.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
/******************************************************************************* | ||
* Copyright (c) 2018 Contributors to the Eclipse Foundation | ||
* | ||
* See the NOTICE file(s) distributed with this work for additional | ||
* information regarding copyright ownership. | ||
* | ||
* This program and the accompanying materials are made available under the | ||
* terms of the Eclipse Public License 2.0 which is available at | ||
* http://www.eclipse.org/legal/epl-2.0, or the Apache Software License 2.0 | ||
* which is available at https://www.apache.org/licenses/LICENSE-2.0. | ||
* | ||
* SPDX-License-Identifier: EPL-2.0 OR Apache-2.0 | ||
*******************************************************************************/ | ||
|
||
package org.eclipse.winery.model.tosca; | ||
|
||
import java.util.ArrayList; | ||
import java.util.List; | ||
import java.util.Objects; | ||
|
||
import javax.xml.bind.annotation.XmlAccessType; | ||
import javax.xml.bind.annotation.XmlAccessorType; | ||
import javax.xml.bind.annotation.XmlElement; | ||
import javax.xml.bind.annotation.XmlType; | ||
|
||
import org.eclipse.jdt.annotation.NonNull; | ||
|
||
@XmlAccessorType(XmlAccessType.FIELD) | ||
@XmlType(name = "", propOrder = { | ||
"_interface" | ||
}) | ||
public class TInterfaces { | ||
|
||
@XmlElement(name = "Interface", required = true) | ||
protected List<TInterface> _interface; | ||
|
||
@NonNull | ||
public List<TInterface> getInterface() { | ||
if (_interface == null) { | ||
_interface = new ArrayList<TInterface>(); | ||
} | ||
return this._interface; | ||
} | ||
|
||
@Override | ||
public boolean equals(Object o) { | ||
if (this == o) return true; | ||
if (o == null || getClass() != o.getClass()) return false; | ||
TInterfaces that = (TInterfaces) o; | ||
return Objects.equals(_interface, that._interface); | ||
} | ||
|
||
@Override | ||
public int hashCode() { | ||
return Objects.hash(_interface); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.