Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1142 from OpenNMS/jira/NMS-8510
NMS-8510: Introduce TopologyLinkBuilder to relieably create links
- Loading branch information
Showing
24 changed files
with
410 additions
and
121 deletions.
There are no files selected for viewing
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
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
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
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
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
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
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
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
34 changes: 34 additions & 0 deletions
34
features/topology-map/org.opennms.features.topology.link/pom.xml
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,34 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://maven.apache.org/POM/4.0.0" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> | ||
<parent> | ||
<relativePath>../poms/compiled/</relativePath> | ||
<groupId>org.opennms.features.topology.build</groupId> | ||
<artifactId>compiled-bundle-settings</artifactId> | ||
<version>19.0.0-SNAPSHOT</version> | ||
</parent> | ||
<properties> | ||
<bundle.symbolicName>org.opennms.features.topology.link</bundle.symbolicName> | ||
<bundle.namespace>org.opennms.features.topology.link</bundle.namespace> | ||
</properties> | ||
<modelVersion>4.0.0</modelVersion> | ||
<groupId>org.opennms.features.topology</groupId> | ||
<artifactId>org.opennms.features.topology.link</artifactId> | ||
<name>${bundle.symbolicName}</name> | ||
<packaging>bundle</packaging> | ||
<dependencies> | ||
<!-- | ||
| uncomment to add all imported (non-local) bundles to your compilation classpath | ||
<dependency> | ||
<type>pom</type> | ||
<groupId>${parent.groupId}</groupId> | ||
<artifactId>provision</artifactId> | ||
<optional>true</optional> | ||
</dependency> | ||
--> | ||
<dependency> | ||
<groupId>junit</groupId> | ||
<artifactId>junit</artifactId> | ||
<scope>test</scope> | ||
</dependency> | ||
</dependencies> | ||
</project> |
66 changes: 66 additions & 0 deletions
66
...ennms.features.topology.link/src/main/java/org/opennms/features/topology/link/Layout.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,66 @@ | ||
/******************************************************************************* | ||
* This file is part of OpenNMS(R). | ||
* | ||
* Copyright (C) 2016 The OpenNMS Group, Inc. | ||
* OpenNMS(R) is Copyright (C) 1999-2016 The OpenNMS Group, Inc. | ||
* | ||
* OpenNMS(R) is a registered trademark of The OpenNMS Group, Inc. | ||
* | ||
* OpenNMS(R) is free software: you can redistribute it and/or modify | ||
* it under the terms of the GNU Affero General Public License as published | ||
* by the Free Software Foundation, either version 3 of the License, | ||
* or (at your option) any later version. | ||
* | ||
* OpenNMS(R) is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
* GNU Affero General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU Affero General Public License | ||
* along with OpenNMS(R). If not, see: | ||
* http://www.gnu.org/licenses/ | ||
* | ||
* For more information contact: | ||
* OpenNMS(R) Licensing <license@opennms.org> | ||
* http://www.opennms.org/ | ||
* http://www.opennms.com/ | ||
*******************************************************************************/ | ||
|
||
package org.opennms.features.topology.link; | ||
|
||
import java.util.Objects; | ||
|
||
/** | ||
* All known layout algorithms. | ||
*/ | ||
public enum Layout { | ||
|
||
CIRCLE("Circle Layout"), | ||
D3("D3 Layout"), | ||
FR("FR Layout"), | ||
HIERARCHY("Hierarchy Layout"), | ||
ISOM("ISOM Layout"), | ||
KK("KK Layout"), | ||
REAL("Real Ultimate Layout"), | ||
SPRING("Spring Layout"), | ||
MANUAL("Manual Layout"); | ||
|
||
private final String label; | ||
|
||
Layout(String label) { | ||
this.label = Objects.requireNonNull(label); | ||
} | ||
|
||
public String getLabel() { | ||
return label; | ||
} | ||
|
||
public static Layout createFromLabel(String label) { | ||
for (Layout eachLayout : values()) { | ||
if (eachLayout.getLabel().equals(label)) { | ||
return eachLayout; | ||
} | ||
} | ||
return null; | ||
} | ||
} |
Oops, something went wrong.