Apps-- added onos.app.title property to applications.
Change-Id: Id845390ee0bee5b871c0ce9f47b2ce98fbcf26b9
diff --git a/apps/acl/pom.xml b/apps/acl/pom.xml
index d1f57f1..b5af2a3 100644
--- a/apps/acl/pom.xml
+++ b/apps/acl/pom.xml
@@ -40,6 +40,7 @@
<properties>
<onos.app.name>org.onosproject.acl</onos.app.name>
<onos.app.origin>DLUT</onos.app.origin>
+ <onos.app.title>ONOS ACL App</onos.app.title>
<onos.app.category>default</onos.app.category>
<onos.app.url>http://onosproject.org</onos.app.url>
<onos.app.readme>ONOS ACL application.</onos.app.readme>
diff --git a/apps/cip/pom.xml b/apps/cip/pom.xml
index 687de60..263b8c9 100644
--- a/apps/cip/pom.xml
+++ b/apps/cip/pom.xml
@@ -34,6 +34,7 @@
<properties>
<onos.app.name>org.onosproject.cip</onos.app.name>
<onos.app.category>default</onos.app.category>
+ <onos.app.title>Cluster IP Alias App</onos.app.title>
<onos.app.url>http://onosproject.org</onos.app.url>
<onos.app.readme>Cluster IP alias application.</onos.app.readme>
</properties>
diff --git a/apps/cordfabric/pom.xml b/apps/cordfabric/pom.xml
index 9015140..7ad3259 100644
--- a/apps/cordfabric/pom.xml
+++ b/apps/cordfabric/pom.xml
@@ -32,6 +32,7 @@
<properties>
<onos.app.name>org.onosproject.cordfabric</onos.app.name>
+ <onos.app.title>CORD Fabric App</onos.app.title>
<onos.app.category>default</onos.app.category>
<onos.app.url>http://onosproject.org</onos.app.url>
<onos.app.readme>Simple fabric application for CORD.</onos.app.readme>
diff --git a/apps/cordvtn/pom.xml b/apps/cordvtn/pom.xml
index b5c572e..783e96c 100644
--- a/apps/cordvtn/pom.xml
+++ b/apps/cordvtn/pom.xml
@@ -33,6 +33,7 @@
<properties>
<onos.app.name>org.onosproject.cordvtn</onos.app.name>
+ <onos.app.title>CORD Virtual Tenant Network</onos.app.title>
<onos.app.category>default</onos.app.category>
<onos.app.url>http://onosproject.org</onos.app.url>
<onos.app.readme>Virtual tenant network service for CORD.</onos.app.readme>
diff --git a/apps/drivermatrix/pom.xml b/apps/drivermatrix/pom.xml
index 3e5db97..9837cea 100644
--- a/apps/drivermatrix/pom.xml
+++ b/apps/drivermatrix/pom.xml
@@ -33,9 +33,10 @@
<properties>
<onos.app.name>org.onosproject.drivermatrix</onos.app.name>
+ <onos.app.title>Driver Behaviour Support Matrix</onos.app.title>
<onos.app.category>default</onos.app.category>
<onos.app.url>http://onosproject.org</onos.app.url>
- <onos.app.readme>Driver behavior support matrix.</onos.app.readme>
+ <onos.app.readme>Driver behaviour support matrix.</onos.app.readme>
</properties>
</project>
diff --git a/apps/events/pom.xml b/apps/events/pom.xml
index 643ec0f..8d00285 100644
--- a/apps/events/pom.xml
+++ b/apps/events/pom.xml
@@ -32,6 +32,7 @@
<properties>
<onos.app.name>org.onosproject.events</onos.app.name>
+ <onos.app.title>ONOS Event History App</onos.app.title>
<onos.app.category>default</onos.app.category>
<onos.app.url>http://onosproject.org</onos.app.url>
<onos.app.readme>ONOS event history display application.</onos.app.readme>
diff --git a/apps/flowanalyzer/pom.xml b/apps/flowanalyzer/pom.xml
index 8369087..686711f 100644
--- a/apps/flowanalyzer/pom.xml
+++ b/apps/flowanalyzer/pom.xml
@@ -33,6 +33,7 @@
<properties>
<onos.app.name>org.onosproject.flowanalyzer</onos.app.name>
+ <onos.app.title>Flow Space Analyzer</onos.app.title>
<onos.app.category>default</onos.app.category>
<onos.app.url>http://onosproject.org</onos.app.url>
<onos.app.readme>Simple flow space analyzer.</onos.app.readme>
diff --git a/apps/fwd/pom.xml b/apps/fwd/pom.xml
index d902ace..1b1c9be 100644
--- a/apps/fwd/pom.xml
+++ b/apps/fwd/pom.xml
@@ -33,6 +33,7 @@
<properties>
<onos.app.name>org.onosproject.fwd</onos.app.name>
+ <onos.app.title>Reactive Forwarding App</onos.app.title>
<onos.app.category>default</onos.app.category>
<onos.app.url>http://onosproject.org</onos.app.url>
<onos.app.readme>Reactive forwarding application using flow subsystem.</onos.app.readme>
diff --git a/apps/igmp/pom.xml b/apps/igmp/pom.xml
index c6d550d..90759d8 100644
--- a/apps/igmp/pom.xml
+++ b/apps/igmp/pom.xml
@@ -33,6 +33,7 @@
<properties>
<onos.app.name>org.onosproject.igmp</onos.app.name>
+ <onos.app.title>IGMP App</onos.app.title>
<onos.app.category>default</onos.app.category>
<onos.app.url>http://onosproject.org</onos.app.url>
<onos.app.readme>IGMP implementation.</onos.app.readme>
diff --git a/apps/iptopology-api/pom.xml b/apps/iptopology-api/pom.xml
index b8cf442..d6bc64e 100644
--- a/apps/iptopology-api/pom.xml
+++ b/apps/iptopology-api/pom.xml
@@ -30,6 +30,7 @@
<properties>
<onos.app.name>org.onosproject.iptopology-api</onos.app.name>
+ <onos.app.title>IP Layer Topology API</onos.app.title>
<onos.app.category>default</onos.app.category>
<onos.app.url>http://onosproject.org</onos.app.url>
<onos.app.readme>IP layer topology API.</onos.app.readme>
diff --git a/apps/metrics/pom.xml b/apps/metrics/pom.xml
index f3cdd0d..9c75b6e 100644
--- a/apps/metrics/pom.xml
+++ b/apps/metrics/pom.xml
@@ -33,9 +33,11 @@
<properties>
<onos.app.name>org.onosproject.metrics</onos.app.name>
+ <onos.app.title>Performance Metrics App</onos.app.title>
<onos.app.category>default</onos.app.category>
<onos.app.url>http://onosproject.org</onos.app.url>
- <onos.app.readme>Performance metrics collection application.
+ <onos.app.readme>
+ Performance metrics collection application.
</onos.app.readme>
</properties>
diff --git a/apps/mfwd/pom.xml b/apps/mfwd/pom.xml
index ec80266..24c763b 100644
--- a/apps/mfwd/pom.xml
+++ b/apps/mfwd/pom.xml
@@ -33,9 +33,11 @@
<properties>
<onos.app.name>org.onosproject.mfwd</onos.app.name>
+ <onos.app.title>Multicast Forwarding App</onos.app.title>
<onos.app.category>default</onos.app.category>
<onos.app.url>http://onosproject.org</onos.app.url>
- <onos.app.readme>Multicast forwarding application.
+ <onos.app.readme>
+ Multicast forwarding application.
</onos.app.readme>
</properties>
diff --git a/apps/mlb/pom.xml b/apps/mlb/pom.xml
index a300b41..cebf68d 100644
--- a/apps/mlb/pom.xml
+++ b/apps/mlb/pom.xml
@@ -33,6 +33,7 @@
<properties>
<onos.app.name>org.onosproject.mlb</onos.app.name>
+ <onos.app.title>Mastership Load Balancer App</onos.app.title>
<onos.app.category>default</onos.app.category>
<onos.app.url>http://onosproject.org</onos.app.url>
<onos.app.readme>Application that balances mastership among nodes.
diff --git a/apps/mobility/pom.xml b/apps/mobility/pom.xml
index 0f2b39e..f1b2587 100644
--- a/apps/mobility/pom.xml
+++ b/apps/mobility/pom.xml
@@ -33,9 +33,11 @@
<properties>
<onos.app.name>org.onosproject.mobility</onos.app.name>
+ <onos.app.title>Host Mobility App</onos.app.title>
<onos.app.category>default</onos.app.category>
<onos.app.url>http://onosproject.org</onos.app.url>
- <onos.app.readme>Host mobility application.
+ <onos.app.readme>
+ Host mobility application.
</onos.app.readme>
</properties>
diff --git a/apps/openstackinterface/app/pom.xml b/apps/openstackinterface/app/pom.xml
index 77715be..b3b620f 100644
--- a/apps/openstackinterface/app/pom.xml
+++ b/apps/openstackinterface/app/pom.xml
@@ -32,6 +32,7 @@
<properties>
<onos.app.name>org.onosproject.openstackinterface</onos.app.name>
+ <onos.app.title>Openstack Interface App</onos.app.title>
<onos.app.category>default</onos.app.category>
<onos.app.url>http://onosproject.org</onos.app.url>
<onos.app.readme>Openstack Interface Application.</onos.app.readme>
diff --git a/apps/openstacknetworking/app/pom.xml b/apps/openstacknetworking/app/pom.xml
index acf7e22..9e1cdd6 100644
--- a/apps/openstacknetworking/app/pom.xml
+++ b/apps/openstacknetworking/app/pom.xml
@@ -31,6 +31,7 @@
<properties>
<onos.app.name>org.onosproject.openstacknetworking</onos.app.name>
+ <onos.app.title>Openstack Networking App</onos.app.title>
<onos.app.category>default</onos.app.category>
<onos.app.url>http://onosproject.org</onos.app.url>
<onos.app.readme>Openstack Networking Application.</onos.app.readme>
diff --git a/apps/openstacknode/pom.xml b/apps/openstacknode/pom.xml
index f97f890..884619b 100644
--- a/apps/openstacknode/pom.xml
+++ b/apps/openstacknode/pom.xml
@@ -34,6 +34,7 @@
<properties>
<onos.app.name>org.onosproject.openstacknode</onos.app.name>
+ <onos.app.title>SONA Openstack Node Bootstrap App</onos.app.title>
<onos.app.category>default</onos.app.category>
<onos.app.url>http://onosproject.org</onos.app.url>
<onos.app.readme>SONA Openstack Node Bootstrap Application</onos.app.readme>
diff --git a/apps/optical/pom.xml b/apps/optical/pom.xml
index 7ca8c53..57906ae 100644
--- a/apps/optical/pom.xml
+++ b/apps/optical/pom.xml
@@ -33,6 +33,7 @@
<properties>
<onos.app.name>org.onosproject.optical</onos.app.name>
+ <onos.app.title>Packet/Optical Use-Case App</onos.app.title>
<onos.app.category>default</onos.app.category>
<onos.app.url>http://onosproject.org</onos.app.url>
<onos.app.readme>Packet/Optical use-case application.
diff --git a/apps/pathpainter/pom.xml b/apps/pathpainter/pom.xml
index ee43a50..1552415 100644
--- a/apps/pathpainter/pom.xml
+++ b/apps/pathpainter/pom.xml
@@ -33,10 +33,13 @@
<properties>
<onos.app.name>org.onosproject.pathpainter</onos.app.name>
+ <onos.app.title>Path Visualization App</onos.app.title>
<onos.app.category>default</onos.app.category>
<onos.app.url>https://wiki.onosproject.org/display/ONOS/Path+Painter+Application+GUI</onos.app.url>
+ <onos.app.title>
+ Path visualization application
+ </onos.app.title>
<onos.app.readme>
- Path visualization application.
Allows the user to visualize different types of paths between
network entities such as switches and hosts.
Selectable path types are shortest, disjoint and geographical.
diff --git a/apps/pcep-api/pom.xml b/apps/pcep-api/pom.xml
index 5d652cf..c9be816 100644
--- a/apps/pcep-api/pom.xml
+++ b/apps/pcep-api/pom.xml
@@ -30,6 +30,7 @@
<properties>
<onos.app.name>org.onosproject.pcep-api</onos.app.name>
+ <onos.app.title>PCEP Protocol API</onos.app.title>
<onos.app.category>default</onos.app.category>
<onos.app.url>http://onosproject.org</onos.app.url>
<onos.app.readme>PCEP protocol API.</onos.app.readme>
diff --git a/apps/pim/pom.xml b/apps/pim/pom.xml
index 9685aee..058be7d 100644
--- a/apps/pim/pom.xml
+++ b/apps/pim/pom.xml
@@ -33,6 +33,7 @@
<properties>
<onos.app.name>org.onosproject.pim</onos.app.name>
+ <onos.app.title>Protocol Independent Multicast Emulation</onos.app.title>
<onos.app.category>default</onos.app.category>
<onos.app.url>http://onosproject.org</onos.app.url>
<onos.app.readme>Protocol independent multicast emulation.</onos.app.readme>
diff --git a/apps/proxyarp/pom.xml b/apps/proxyarp/pom.xml
index 4dda8aa..0bd4824 100644
--- a/apps/proxyarp/pom.xml
+++ b/apps/proxyarp/pom.xml
@@ -33,6 +33,7 @@
<properties>
<onos.app.name>org.onosproject.proxyarp</onos.app.name>
+ <onos.app.title>Proxy ARP/NDP App</onos.app.title>
<onos.app.category>default</onos.app.category>
<onos.app.url>http://onosproject.org</onos.app.url>
<onos.app.readme>Proxy ARP/NDP application.</onos.app.readme>
diff --git a/apps/reactive-routing/pom.xml b/apps/reactive-routing/pom.xml
index ba43d94..e85f3ca 100644
--- a/apps/reactive-routing/pom.xml
+++ b/apps/reactive-routing/pom.xml
@@ -33,6 +33,7 @@
<properties>
<onos.app.name>org.onosproject.reactive.routing</onos.app.name>
+ <onos.app.title>SDN-IP Reactive Routing App</onos.app.title>
<onos.app.category>default</onos.app.category>
<onos.app.url>http://onosproject.org</onos.app.url>
<onos.app.readme>SDN-IP reactive routing application.</onos.app.readme>
diff --git a/apps/routing-api/pom.xml b/apps/routing-api/pom.xml
index d24580b..d1c3e0c 100644
--- a/apps/routing-api/pom.xml
+++ b/apps/routing-api/pom.xml
@@ -32,6 +32,7 @@
<properties>
<onos.app.name>org.onosproject.routing-api</onos.app.name>
+ <onos.app.title>Routing API</onos.app.title>
<onos.app.category>default</onos.app.category>
<onos.app.url>http://onosproject.org</onos.app.url>
<onos.app.readme>API for routing applications.</onos.app.readme>
diff --git a/apps/routing/pom.xml b/apps/routing/pom.xml
index b1de5f3..1fb132f 100644
--- a/apps/routing/pom.xml
+++ b/apps/routing/pom.xml
@@ -32,9 +32,10 @@
<properties>
<onos.app.name>org.onosproject.routing</onos.app.name>
+ <onos.app.title>SDN-IP Routing App</onos.app.title>
<onos.app.category>default</onos.app.category>
<onos.app.url>http://onosproject.org</onos.app.url>
- <onos.app.readme>SDN-IP reactive routing application.</onos.app.readme>
+ <onos.app.readme>SDN-IP routing application.</onos.app.readme>
</properties>
<dependencies>
diff --git a/apps/segmentrouting/pom.xml b/apps/segmentrouting/pom.xml
index 68777ef..c634de4 100644
--- a/apps/segmentrouting/pom.xml
+++ b/apps/segmentrouting/pom.xml
@@ -32,6 +32,7 @@
<properties>
<onos.app.name>org.onosproject.segmentrouting</onos.app.name>
+ <onos.app.title>Segment Routing App</onos.app.title>
<onos.app.category>default</onos.app.category>
<onos.app.url>http://onosproject.org</onos.app.url>
<onos.app.readme>Segment routing application.</onos.app.readme>
diff --git a/apps/test/demo/pom.xml b/apps/test/demo/pom.xml
index a9ab016..423d371 100644
--- a/apps/test/demo/pom.xml
+++ b/apps/test/demo/pom.xml
@@ -33,6 +33,7 @@
<properties>
<onos.app.name>org.onosproject.demo</onos.app.name>
+ <onos.app.title>Flow Throughput Demo</onos.app.title>
<onos.app.category>test</onos.app.category>
<onos.app.url>http://onosproject.org</onos.app.url>
<onos.app.readme>Flow throughput test application.</onos.app.readme>
diff --git a/apps/test/distributed-primitives/pom.xml b/apps/test/distributed-primitives/pom.xml
index 5ccf518..5915e9b 100644
--- a/apps/test/distributed-primitives/pom.xml
+++ b/apps/test/distributed-primitives/pom.xml
@@ -34,6 +34,7 @@
<properties>
<onos.app.name>org.onosproject.distributedprimitives</onos.app.name>
+ <onos.app.title>Distributed Primitives Test App</onos.app.title>
<onos.app.category>test</onos.app.category>
<onos.app.url>http://onosproject.org</onos.app.url>
<onos.app.readme>ONOS app to test distributed primitives.</onos.app.readme>
diff --git a/apps/test/election/pom.xml b/apps/test/election/pom.xml
index cca0025..b18b6c5 100644
--- a/apps/test/election/pom.xml
+++ b/apps/test/election/pom.xml
@@ -34,6 +34,7 @@
<properties>
<onos.app.name>org.onosproject.election</onos.app.name>
+ <onos.app.title>Master Election Test App</onos.app.title>
<onos.app.category>test</onos.app.category>
<onos.app.url>http://onosproject.org</onos.app.url>
<onos.app.readme>Master election test application.</onos.app.readme>
diff --git a/apps/test/intent-perf/pom.xml b/apps/test/intent-perf/pom.xml
index 1f85c02..07c81f1 100644
--- a/apps/test/intent-perf/pom.xml
+++ b/apps/test/intent-perf/pom.xml
@@ -33,6 +33,7 @@
<properties>
<onos.app.name>org.onosproject.intentperf</onos.app.name>
+ <onos.app.title>Intent Performance Test App</onos.app.title>
<onos.app.category>test</onos.app.category>
<onos.app.url>http://onosproject.org</onos.app.url>
<onos.app.readme>intent performance test application.</onos.app.readme>
diff --git a/apps/test/loadtest/pom.xml b/apps/test/loadtest/pom.xml
index e0a85a6..144f672 100644
--- a/apps/test/loadtest/pom.xml
+++ b/apps/test/loadtest/pom.xml
@@ -34,6 +34,7 @@
<properties>
<onos.app.name>org.onosproject.loadtest</onos.app.name>
+ <onos.app.title>Distributed Load Test App</onos.app.title>
<onos.app.category>test</onos.app.category>
<onos.app.url>http://onosproject.org</onos.app.url>
<onos.app.readme>Distributed consensus load test application.</onos.app.readme>
diff --git a/apps/test/messaging-perf/pom.xml b/apps/test/messaging-perf/pom.xml
index b8f3f08..2c0869a 100644
--- a/apps/test/messaging-perf/pom.xml
+++ b/apps/test/messaging-perf/pom.xml
@@ -33,6 +33,7 @@
<properties>
<onos.app.name>org.onosproject.messagingperf</onos.app.name>
+ <onos.app.title>Messaging Performance Test App</onos.app.title>
<onos.app.category>test</onos.app.category>
<onos.app.url>http://onosproject.org</onos.app.url>
<onos.app.readme>Messaging performance test application.</onos.app.readme>
diff --git a/apps/virtualbng/pom.xml b/apps/virtualbng/pom.xml
index c078823..ca16942 100644
--- a/apps/virtualbng/pom.xml
+++ b/apps/virtualbng/pom.xml
@@ -33,6 +33,7 @@
<properties>
<onos.app.name>org.onosproject.virtualbng</onos.app.name>
+ <onos.app.title>Virtual Broadband Gateway App</onos.app.title>
<onos.app.category>default</onos.app.category>
<onos.app.url>http://onosproject.org</onos.app.url>
<onos.app.readme>Virtual broadband gateway application.</onos.app.readme>
diff --git a/apps/xos-integration/pom.xml b/apps/xos-integration/pom.xml
index e9994c7..ee33f6e 100644
--- a/apps/xos-integration/pom.xml
+++ b/apps/xos-integration/pom.xml
@@ -33,6 +33,7 @@
<properties>
<onos.app.name>org.onosproject.xosintegration</onos.app.name>
+ <onos.app.title>ONOS XOS Integration App</onos.app.title>
<onos.app.category>default</onos.app.category>
<onos.app.url>http://onosproject.org</onos.app.url>
<onos.app.readme>ONOS XOS integration application.</onos.app.readme>
diff --git a/core/api/src/main/java/org/onosproject/app/ApplicationDescription.java b/core/api/src/main/java/org/onosproject/app/ApplicationDescription.java
index 1528f35..8732732 100644
--- a/core/api/src/main/java/org/onosproject/app/ApplicationDescription.java
+++ b/core/api/src/main/java/org/onosproject/app/ApplicationDescription.java
@@ -51,6 +51,13 @@
String origin();
/**
+ * Returns title of the application.
+ *
+ * @return application title text
+ */
+ String title();
+
+ /**
* Returns description of the application.
*
* @return application description text
diff --git a/core/api/src/main/java/org/onosproject/app/DefaultApplicationDescription.java b/core/api/src/main/java/org/onosproject/app/DefaultApplicationDescription.java
index 3aaca4c..1d371c4 100644
--- a/core/api/src/main/java/org/onosproject/app/DefaultApplicationDescription.java
+++ b/core/api/src/main/java/org/onosproject/app/DefaultApplicationDescription.java
@@ -35,6 +35,7 @@
private final String name;
private final Version version;
+ private final String title;
private final String description;
private final String origin;
private final String category;
@@ -52,6 +53,7 @@
*
* @param name application name
* @param version application version
+ * @param title application title
* @param description application description
* @param origin origin company
* @param category application category
@@ -64,7 +66,7 @@
* @param features application features
* @param requiredApps list of required application names
*/
- public DefaultApplicationDescription(String name, Version version,
+ public DefaultApplicationDescription(String name, Version version, String title,
String description, String origin, String category,
String url, String readme, byte[] icon,
ApplicationRole role, Set<Permission> permissions,
@@ -72,6 +74,7 @@
List<String> requiredApps) {
this.name = checkNotNull(name, "Name cannot be null");
this.version = checkNotNull(version, "Version cannot be null");
+ this.title = checkNotNull(title, "Title cannot be null");
this.description = checkNotNull(description, "Description cannot be null");
this.origin = checkNotNull(origin, "Origin cannot be null");
this.category = checkNotNull(category, "Category cannot be null");
@@ -97,6 +100,11 @@
}
@Override
+ public String title() {
+ return title;
+ }
+
+ @Override
public String description() {
return description;
}
@@ -157,6 +165,7 @@
.add("name", name)
.add("version", version)
.add("description", description)
+ .add("title", title)
.add("origin", origin)
.add("category", category)
.add("url", url)
diff --git a/core/api/src/main/java/org/onosproject/core/Application.java b/core/api/src/main/java/org/onosproject/core/Application.java
index 8700cad..04a1e09 100644
--- a/core/api/src/main/java/org/onosproject/core/Application.java
+++ b/core/api/src/main/java/org/onosproject/core/Application.java
@@ -42,6 +42,15 @@
Version version();
/**
+ * Returns the title of the application.
+ * This should be a short, human-readable string, as opposed
+ * to the unique identifier returned by {@link #id()}.
+ *
+ * @return application title text
+ */
+ String title();
+
+ /**
* Returns description of the application.
*
* @return application description text
diff --git a/core/api/src/main/java/org/onosproject/core/DefaultApplication.java b/core/api/src/main/java/org/onosproject/core/DefaultApplication.java
index 7737ef8..487e709 100644
--- a/core/api/src/main/java/org/onosproject/core/DefaultApplication.java
+++ b/core/api/src/main/java/org/onosproject/core/DefaultApplication.java
@@ -36,6 +36,7 @@
private final ApplicationId appId;
private final Version version;
+ private final String title;
private final String description;
private final String category;
private final String url;
@@ -53,6 +54,7 @@
*
* @param appId application identifier
* @param version application version
+ * @param title application title
* @param description application description
* @param origin origin company
* @param category application category
@@ -65,7 +67,7 @@
* @param features application features
* @param requiredApps list of required application names
*/
- public DefaultApplication(ApplicationId appId, Version version,
+ public DefaultApplication(ApplicationId appId, Version version, String title,
String description, String origin, String category,
String url, String readme, byte[] icon,
ApplicationRole role, Set<Permission> permissions,
@@ -73,6 +75,7 @@
List<String> requiredApps) {
this.appId = checkNotNull(appId, "ID cannot be null");
this.version = checkNotNull(version, "Version cannot be null");
+ this.title = checkNotNull(title, "Title cannot be null");
this.description = checkNotNull(description, "Description cannot be null");
this.origin = checkNotNull(origin, "Origin cannot be null");
this.category = checkNotNull(category, "Category cannot be null");
@@ -104,6 +107,11 @@
}
@Override
+ public String title() {
+ return title;
+ }
+
+ @Override
public String description() {
return description;
}
@@ -160,7 +168,7 @@
@Override
public int hashCode() {
- return Objects.hash(appId, version, description, origin, category, url,
+ return Objects.hash(appId, version, title, description, origin, category, url,
readme, role, permissions, featuresRepo, features, requiredApps);
}
@@ -173,8 +181,12 @@
return false;
}
final DefaultApplication other = (DefaultApplication) obj;
+ // TODO: review -- do ALL the fields need to be included?
+ // It is debatable whether fields like description, url, and readme,
+ // need to be included in the notion of equivalence.
return Objects.equals(this.appId, other.appId) &&
Objects.equals(this.version, other.version) &&
+ Objects.equals(this.title, other.title) &&
Objects.equals(this.description, other.description) &&
Objects.equals(this.origin, other.origin) &&
Objects.equals(this.category, other.category) &&
@@ -192,6 +204,7 @@
return toStringHelper(this)
.add("appId", appId)
.add("version", version)
+ .add("title", title)
.add("description", description)
.add("origin", origin)
.add("category", category)
diff --git a/core/api/src/test/java/org/onosproject/app/ApplicationEventTest.java b/core/api/src/test/java/org/onosproject/app/ApplicationEventTest.java
index 0d4ae4c..2edd1f0 100644
--- a/core/api/src/test/java/org/onosproject/app/ApplicationEventTest.java
+++ b/core/api/src/test/java/org/onosproject/app/ApplicationEventTest.java
@@ -32,7 +32,7 @@
public class ApplicationEventTest extends AbstractEventTest {
private Application createApp() {
- return new DefaultApplication(APP_ID, VER, DESC, ORIGIN, CATEGORY,
+ return new DefaultApplication(APP_ID, VER, TITLE, DESC, ORIGIN, CATEGORY,
URL, README, ICON, ROLE, PERMS,
Optional.of(FURL), FEATURES, APPS);
}
diff --git a/core/api/src/test/java/org/onosproject/app/DefaultApplicationDescriptionTest.java b/core/api/src/test/java/org/onosproject/app/DefaultApplicationDescriptionTest.java
index e01d4d8..7e8b6ea 100644
--- a/core/api/src/test/java/org/onosproject/app/DefaultApplicationDescriptionTest.java
+++ b/core/api/src/test/java/org/onosproject/app/DefaultApplicationDescriptionTest.java
@@ -38,6 +38,7 @@
public static final String APP_NAME = "org.foo.app";
public static final Version VER = Version.version(1, 2, "a", null);
+ public static final String TITLE = "Awesome App";
public static final String DESC = "Awesome application from Circus, Inc.";
public static final String ORIGIN = "Circus";
public static final String CATEGORY = "other";
@@ -55,11 +56,12 @@
@Test
public void basics() {
ApplicationDescription app =
- new DefaultApplicationDescription(APP_NAME, VER, DESC, ORIGIN,
+ new DefaultApplicationDescription(APP_NAME, VER, TITLE, DESC, ORIGIN,
CATEGORY, URL, README, ICON,
ROLE, PERMS, FURL, FEATURES, APPS);
assertEquals("incorrect id", APP_NAME, app.name());
assertEquals("incorrect version", VER, app.version());
+ assertEquals("incorrect title", TITLE, app.title());
assertEquals("incorrect description", DESC, app.description());
assertEquals("incorrect origin", ORIGIN, app.origin());
assertEquals("incorrect category", CATEGORY, app.category());
diff --git a/core/api/src/test/java/org/onosproject/core/DefaultApplicationTest.java b/core/api/src/test/java/org/onosproject/core/DefaultApplicationTest.java
index c0fbf9c..8e141ce 100644
--- a/core/api/src/test/java/org/onosproject/core/DefaultApplicationTest.java
+++ b/core/api/src/test/java/org/onosproject/core/DefaultApplicationTest.java
@@ -43,7 +43,7 @@
@Test
public void basics() {
- Application app = new DefaultApplication(APP_ID, VER, DESC, ORIGIN,
+ Application app = new DefaultApplication(APP_ID, VER, TITLE, DESC, ORIGIN,
CATEGORY, URL, README, ICON, ROLE,
PERMS, Optional.of(FURL), FEATURES, APPS);
assertEquals("incorrect id", APP_ID, app.id());
@@ -64,16 +64,16 @@
@Test
public void testEquality() {
- Application a1 = new DefaultApplication(APP_ID, VER, DESC, ORIGIN,
+ Application a1 = new DefaultApplication(APP_ID, VER, TITLE, DESC, ORIGIN,
CATEGORY, URL, README, ICON, ROLE,
PERMS, Optional.of(FURL), FEATURES, APPS);
- Application a2 = new DefaultApplication(APP_ID, VER, DESC, ORIGIN,
+ Application a2 = new DefaultApplication(APP_ID, VER, TITLE, DESC, ORIGIN,
CATEGORY, URL, README, ICON, ROLE,
PERMS, Optional.of(FURL), FEATURES, APPS);
- Application a3 = new DefaultApplication(APP_ID, VER, DESC, ORIGIN,
+ Application a3 = new DefaultApplication(APP_ID, VER, TITLE, DESC, ORIGIN,
CATEGORY, URL, README, ICON, ROLE,
PERMS, Optional.empty(), FEATURES, APPS);
- Application a4 = new DefaultApplication(APP_ID, VER, DESC, ORIGIN + "asd",
+ Application a4 = new DefaultApplication(APP_ID, VER, TITLE, DESC, ORIGIN + "asd",
CATEGORY, URL, README, ICON, ROLE,
PERMS, Optional.of(FURL), FEATURES, APPS);
new EqualsTester().addEqualityGroup(a1, a2)
@@ -87,7 +87,7 @@
public void immutableIcon() {
byte[] iconSourceData = ICON_ORIG.clone();
- Application app = new DefaultApplication(APP_ID, VER, DESC, ORIGIN,
+ Application app = new DefaultApplication(APP_ID, VER, TITLE, DESC, ORIGIN,
CATEGORY, URL, README, iconSourceData, ROLE,
PERMS, Optional.of(FURL), FEATURES, APPS);
@@ -128,7 +128,7 @@
// Set<Permission> p = PERMS_ORIG;
Set<Permission> p = PERMS_UNSAFE;
- Application app = new DefaultApplication(APP_ID, VER, DESC, ORIGIN,
+ Application app = new DefaultApplication(APP_ID, VER, TITLE, DESC, ORIGIN,
CATEGORY, URL, README, ICON, ROLE,
p, Optional.of(FURL), FEATURES, APPS);
@@ -170,7 +170,7 @@
// List<String> f = FEATURES_ORIG;
List<String> f = FEATURES_UNSAFE;
- Application app = new DefaultApplication(APP_ID, VER, DESC, ORIGIN,
+ Application app = new DefaultApplication(APP_ID, VER, TITLE, DESC, ORIGIN,
CATEGORY, URL, README, ICON, ROLE,
PERMS, Optional.of(FURL), f, APPS);
@@ -190,7 +190,7 @@
// List<String> ra = REQ_APPS_ORIG;
List<String> ra = REQ_APPS_UNSAFE;
- Application app = new DefaultApplication(APP_ID, VER, DESC, ORIGIN,
+ Application app = new DefaultApplication(APP_ID, VER, TITLE, DESC, ORIGIN,
CATEGORY, URL, README, ICON, ROLE,
PERMS, Optional.of(FURL), FEATURES, ra);
@@ -206,7 +206,7 @@
@Test
public void nullIcon() {
- Application app = new DefaultApplication(APP_ID, VER, DESC, ORIGIN,
+ Application app = new DefaultApplication(APP_ID, VER, TITLE, DESC, ORIGIN,
CATEGORY, URL, README, null, ROLE,
PERMS, Optional.of(FURL), FEATURES, APPS);
byte[] icon = app.icon();
diff --git a/core/common/src/main/java/org/onosproject/common/app/ApplicationArchive.java b/core/common/src/main/java/org/onosproject/common/app/ApplicationArchive.java
index 1e3f49c..3699b5d 100644
--- a/core/common/src/main/java/org/onosproject/common/app/ApplicationArchive.java
+++ b/core/common/src/main/java/org/onosproject/common/app/ApplicationArchive.java
@@ -88,6 +88,7 @@
private static final String CATEGORY = "[@category]";
private static final String URL = "[@url]";
+ private static final String TITLE = "[@title]";
private static final String ROLE = "security.role";
private static final String APP_PERMISSIONS = "security.permissions.app-perm";
@@ -294,6 +295,11 @@
String name = cfg.getString(NAME);
Version version = Version.version(cfg.getString(VERSION));
String origin = cfg.getString(ORIGIN);
+
+ String title = cfg.getString(TITLE);
+ // FIXME: title should be set as attribute to APP, but fallback for now...
+ title = title == null ? name : title;
+
String category = cfg.getString(CATEGORY, UTILITY);
String url = cfg.getString(URL);
byte[] icon = getApplicationIcon(name);
@@ -313,7 +319,7 @@
// put short description to description field
String desc = compactDescription(readme);
- return new DefaultApplicationDescription(name, version, desc, origin,
+ return new DefaultApplicationDescription(name, version, title, desc, origin,
category, url, readme, icon,
role, perms, featuresRepo,
features, requiredApps);
diff --git a/core/common/src/test/java/org/onosproject/common/app/ApplicationArchiveTest.java b/core/common/src/test/java/org/onosproject/common/app/ApplicationArchiveTest.java
index 87c6363..f7258c3 100644
--- a/core/common/src/test/java/org/onosproject/common/app/ApplicationArchiveTest.java
+++ b/core/common/src/test/java/org/onosproject/common/app/ApplicationArchiveTest.java
@@ -65,6 +65,7 @@
assertEquals("incorrect url", URL, app.url());
assertEquals("incorrect readme", README, app.readme());
+ assertEquals("incorrect title", TITLE, app.title());
assertEquals("incorrect description", DESC, app.description());
assertEquals("incorrect features URI", FURL, app.featuresRepo().get());
assertEquals("incorrect permissions", PERMS, app.permissions());
diff --git a/core/common/src/test/java/org/onosproject/store/trivial/SimpleApplicationStore.java b/core/common/src/test/java/org/onosproject/store/trivial/SimpleApplicationStore.java
index 98c18b4..5047987 100644
--- a/core/common/src/test/java/org/onosproject/store/trivial/SimpleApplicationStore.java
+++ b/core/common/src/test/java/org/onosproject/store/trivial/SimpleApplicationStore.java
@@ -49,14 +49,18 @@
*/
@Component(immediate = true)
@Service
-public class SimpleApplicationStore extends ApplicationArchive implements ApplicationStore {
+public class SimpleApplicationStore extends ApplicationArchive
+ implements ApplicationStore {
private final Logger log = getLogger(getClass());
// App inventory & states
- private final ConcurrentMap<ApplicationId, DefaultApplication> apps = new ConcurrentHashMap<>();
- private final ConcurrentMap<ApplicationId, ApplicationState> states = new ConcurrentHashMap<>();
- private final ConcurrentMap<ApplicationId, Set<Permission>> permissions = new ConcurrentHashMap<>();
+ private final ConcurrentMap<ApplicationId, DefaultApplication> apps =
+ new ConcurrentHashMap<>();
+ private final ConcurrentMap<ApplicationId, ApplicationState> states =
+ new ConcurrentHashMap<>();
+ private final ConcurrentMap<ApplicationId, Set<Permission>> permissions =
+ new ConcurrentHashMap<>();
@Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
protected ApplicationIdStore idStore;
@@ -72,13 +76,20 @@
ApplicationId appId = idStore.registerApplication(name);
ApplicationDescription appDesc = getApplicationDescription(name);
DefaultApplication app =
- new DefaultApplication(appId, appDesc.version(),
- appDesc.description(), appDesc.origin(),
- appDesc.category(), appDesc.url(),
- appDesc.readme(), appDesc.icon(),
- appDesc.role(), appDesc.permissions(),
- appDesc.featuresRepo(), appDesc.features(),
- appDesc.requiredApps());
+ new DefaultApplication(appId,
+ appDesc.version(),
+ appDesc.title(),
+ appDesc.description(),
+ appDesc.origin(),
+ appDesc.category(),
+ appDesc.url(),
+ appDesc.readme(),
+ appDesc.icon(),
+ appDesc.role(),
+ appDesc.permissions(),
+ appDesc.featuresRepo(),
+ appDesc.features(),
+ appDesc.requiredApps());
apps.put(appId, app);
states.put(appId, isActive(name) ? INSTALLED : ACTIVE);
// load app permissions
@@ -118,12 +129,20 @@
ApplicationDescription appDesc = saveApplication(appDescStream);
ApplicationId appId = idStore.registerApplication(appDesc.name());
DefaultApplication app =
- new DefaultApplication(appId, appDesc.version(), appDesc.description(),
- appDesc.origin(), appDesc.category(), appDesc.url(),
- appDesc.readme(), appDesc.icon(),
- appDesc.role(), appDesc.permissions(),
- appDesc.featuresRepo(), appDesc.features(),
- appDesc.requiredApps());
+ new DefaultApplication(appId,
+ appDesc.version(),
+ appDesc.title(),
+ appDesc.description(),
+ appDesc.origin(),
+ appDesc.category(),
+ appDesc.url(),
+ appDesc.readme(),
+ appDesc.icon(),
+ appDesc.role(),
+ appDesc.permissions(),
+ appDesc.featuresRepo(),
+ appDesc.features(),
+ appDesc.requiredApps());
apps.put(appId, app);
states.put(appId, INSTALLED);
delegate.notify(new ApplicationEvent(APP_INSTALLED, app));
diff --git a/core/common/src/test/resources/org/onosproject/common/app/app.xml b/core/common/src/test/resources/org/onosproject/common/app/app.xml
index f623722..0f84e61 100644
--- a/core/common/src/test/resources/org/onosproject/common/app/app.xml
+++ b/core/common/src/test/resources/org/onosproject/common/app/app.xml
@@ -13,8 +13,10 @@
~ See the License for the specific language governing permissions and
~ limitations under the License.
-->
-<app name="org.foo.app" origin="Circus" version="1.2.a" category="other"
- url="http://www.onosproject.org" featuresRepo="mvn:org.foo-features/1.2a/xml/features"
+<app name="org.foo.app" origin="Circus" version="1.2.a"
+ title="Awesome App" category="other"
+ url="http://www.onosproject.org"
+ featuresRepo="mvn:org.foo-features/1.2a/xml/features"
features="foo,bar">
<description>Awesome application from Circus, Inc.</description>
<security>
diff --git a/core/common/src/test/resources/org/onosproject/common/app/app.zip b/core/common/src/test/resources/org/onosproject/common/app/app.zip
index 6ee64c0..137f9df 100644
--- a/core/common/src/test/resources/org/onosproject/common/app/app.zip
+++ b/core/common/src/test/resources/org/onosproject/common/app/app.zip
Binary files differ
diff --git a/core/net/src/test/java/org/onosproject/app/impl/ApplicationManagerTest.java b/core/net/src/test/java/org/onosproject/app/impl/ApplicationManagerTest.java
index f66fb4d..13a3c4a 100644
--- a/core/net/src/test/java/org/onosproject/app/impl/ApplicationManagerTest.java
+++ b/core/net/src/test/java/org/onosproject/app/impl/ApplicationManagerTest.java
@@ -138,7 +138,7 @@
@Override
public Application create(InputStream appDescStream) {
- app = new DefaultApplication(APP_ID, VER, DESC, ORIGIN, CATEGORY,
+ app = new DefaultApplication(APP_ID, VER, TITLE, DESC, ORIGIN, CATEGORY,
URL, README, ICON, ROLE, PERMS,
Optional.of(FURL), FEATURES, ImmutableList.of());
state = INSTALLED;
diff --git a/core/store/dist/src/main/java/org/onosproject/store/app/GossipApplicationStore.java b/core/store/dist/src/main/java/org/onosproject/store/app/GossipApplicationStore.java
index 50063b2..51f759a 100644
--- a/core/store/dist/src/main/java/org/onosproject/store/app/GossipApplicationStore.java
+++ b/core/store/dist/src/main/java/org/onosproject/store/app/GossipApplicationStore.java
@@ -507,10 +507,19 @@
*/
private Application registerApp(ApplicationDescription appDesc) {
ApplicationId appId = idStore.registerApplication(appDesc.name());
- return new DefaultApplication(appId, appDesc.version(), appDesc.description(),
- appDesc.origin(), appDesc.category(), appDesc.url(),
- appDesc.readme(), appDesc.icon(), appDesc.role(),
- appDesc.permissions(), appDesc.featuresRepo(),
- appDesc.features(), appDesc.requiredApps());
+ return new DefaultApplication(appId,
+ appDesc.version(),
+ appDesc.title(),
+ appDesc.description(),
+ appDesc.origin(),
+ appDesc.category(),
+ appDesc.url(),
+ appDesc.readme(),
+ appDesc.icon(),
+ appDesc.role(),
+ appDesc.permissions(),
+ appDesc.featuresRepo(),
+ appDesc.features(),
+ appDesc.requiredApps());
}
}
diff --git a/providers/host/pom.xml b/providers/host/pom.xml
index e32488a..d47ba91 100644
--- a/providers/host/pom.xml
+++ b/providers/host/pom.xml
@@ -31,6 +31,7 @@
<properties>
<onos.app.name>org.onosproject.hostprovider</onos.app.name>
+ <onos.app.title>Host Location Provider</onos.app.title>
<onos.app.origin>ON.Lab</onos.app.origin>
<onos.app.category>default</onos.app.category>
<onos.app.url>http://onosproject.org</onos.app.url>
diff --git a/providers/lldp/pom.xml b/providers/lldp/pom.xml
index 65afe07..f7e3f1d 100644
--- a/providers/lldp/pom.xml
+++ b/providers/lldp/pom.xml
@@ -32,6 +32,7 @@
<properties>
<onos.app.name>org.onosproject.lldpprovider</onos.app.name>
+ <onos.app.title>LLDP Link Provider</onos.app.title>
<onos.app.origin>ON.Lab</onos.app.origin>
<onos.app.category>default</onos.app.category>
<onos.app.url>http://onosproject.org</onos.app.url>
diff --git a/providers/netcfghost/pom.xml b/providers/netcfghost/pom.xml
index 4990541..76bc50e 100644
--- a/providers/netcfghost/pom.xml
+++ b/providers/netcfghost/pom.xml
@@ -34,6 +34,7 @@
<properties>
<onos.app.name>org.onosproject.netcfghostprovider</onos.app.name>
+ <onos.app.title>Network Config host Provider</onos.app.title>
<onos.app.origin>ON.Lab</onos.app.origin>
<onos.app.category>default</onos.app.category>
<onos.app.url>http://onosproject.org</onos.app.url>
diff --git a/providers/netcfglinks/pom.xml b/providers/netcfglinks/pom.xml
index 9eda837..4ef71ec 100644
--- a/providers/netcfglinks/pom.xml
+++ b/providers/netcfglinks/pom.xml
@@ -34,6 +34,7 @@
<properties>
<onos.app.name>org.onosproject.netcfglinksprovider</onos.app.name>
+ <onos.app.title>Network Config Link Provider</onos.app.title>
<onos.app.origin>ON.Lab</onos.app.origin>
</properties>
diff --git a/providers/null/pom.xml b/providers/null/pom.xml
index 241ce14..d498c7f 100644
--- a/providers/null/pom.xml
+++ b/providers/null/pom.xml
@@ -33,6 +33,7 @@
<properties>
<onos.app.name>org.onosproject.null</onos.app.name>
+ <onos.app.title>Null Southbound Provider</onos.app.title>
<onos.app.origin>ON.Lab</onos.app.origin>
<onos.app.category>default</onos.app.category>
<onos.app.url>http://onosproject.org</onos.app.url>
diff --git a/providers/openflow/app/pom.xml b/providers/openflow/app/pom.xml
index 7eb5d10..58650a0 100644
--- a/providers/openflow/app/pom.xml
+++ b/providers/openflow/app/pom.xml
@@ -31,6 +31,7 @@
<properties>
<onos.app.name>org.onosproject.openflow</onos.app.name>
+ <onos.app.title>OpenFlow Southbound Meta App</onos.app.title>
<onos.app.requires>
org.onosproject.openflow-base,
org.onosproject.hostprovider,
diff --git a/providers/ovsdb/app/pom.xml b/providers/ovsdb/app/pom.xml
index 2f548e6..fa69bad 100644
--- a/providers/ovsdb/app/pom.xml
+++ b/providers/ovsdb/app/pom.xml
@@ -31,6 +31,7 @@
<properties>
<onos.app.name>org.onosproject.ovsdb</onos.app.name>
+ <onos.app.title>OVSDB Southbound Meta App</onos.app.title>
<onos.app.requires>
org.onosproject.ovsdb-base,
org.onosproject.ovsdbhostprovider
diff --git a/tools/package/archetypes/bundle/src/main/resources/archetype-resources/pom.xml b/tools/package/archetypes/bundle/src/main/resources/archetype-resources/pom.xml
index 3088353..fe3d57d 100644
--- a/tools/package/archetypes/bundle/src/main/resources/archetype-resources/pom.xml
+++ b/tools/package/archetypes/bundle/src/main/resources/archetype-resources/pom.xml
@@ -35,6 +35,7 @@
<onos.version>1.5.0-SNAPSHOT</onos.version>
<!-- Uncomment to generate ONOS app from this module.
<onos.app.name>org.foo.app</onos.app.name>
+ <onos.app.title>Foo App</onos.app.title>
<onos.app.origin>Foo, Inc.</onos.app.origin>
<onos.app.category>default</onos.app.category>
<onos.app.url>http://onosproject.org</onos.app.url>
diff --git a/tools/package/archetypes/ui/src/main/resources/archetype-resources/pom.xml b/tools/package/archetypes/ui/src/main/resources/archetype-resources/pom.xml
index b90be98..0f1b561 100644
--- a/tools/package/archetypes/ui/src/main/resources/archetype-resources/pom.xml
+++ b/tools/package/archetypes/ui/src/main/resources/archetype-resources/pom.xml
@@ -35,6 +35,7 @@
<onos.version>1.5.0-SNAPSHOT</onos.version>
<!-- Uncomment to generate ONOS app from this module.
<onos.app.name>org.foo.app</onos.app.name>
+ <onos.app.title>Foo App</onos.app.title>
<onos.app.origin>Foo, Inc.</onos.app.origin>
<onos.app.category>UI</onos.app.category>
<onos.app.url>http://onosproject.org</onos.app.url>
diff --git a/tools/package/archetypes/uitab/src/main/resources/archetype-resources/pom.xml b/tools/package/archetypes/uitab/src/main/resources/archetype-resources/pom.xml
index 9189d2b..544d5e3 100644
--- a/tools/package/archetypes/uitab/src/main/resources/archetype-resources/pom.xml
+++ b/tools/package/archetypes/uitab/src/main/resources/archetype-resources/pom.xml
@@ -36,6 +36,7 @@
<onos.version>1.5.0-SNAPSHOT</onos.version>
<!-- Uncomment to generate ONOS app from this module.
<onos.app.name>org.foo.app</onos.app.name>
+ <onos.app.title>Foo App</onos.app.title>
<onos.app.origin>Foo, Inc.</onos.app.origin>
<onos.app.category>UI</onos.app.category>
<onos.app.url>http://onosproject.org</onos.app.url>
diff --git a/tools/package/archetypes/uitopo/src/main/resources/archetype-resources/pom.xml b/tools/package/archetypes/uitopo/src/main/resources/archetype-resources/pom.xml
index 71e38d9..282787c 100644
--- a/tools/package/archetypes/uitopo/src/main/resources/archetype-resources/pom.xml
+++ b/tools/package/archetypes/uitopo/src/main/resources/archetype-resources/pom.xml
@@ -36,6 +36,7 @@
<onos.version>1.5.0-SNAPSHOT</onos.version>
<!-- Uncomment to generate ONOS app from this module.
<onos.app.name>org.foo.app</onos.app.name>
+ <onos.app.title>Foo App</onos.app.title>
<onos.app.origin>Foo, Inc.</onos.app.origin>
<onos.app.category>UI</onos.app.category>
<onos.app.url>http://onosproject.org</onos.app.url>
diff --git a/tools/package/maven-plugin/src/main/java/org/onosproject/maven/OnosAppMojo.java b/tools/package/maven-plugin/src/main/java/org/onosproject/maven/OnosAppMojo.java
index 24c876b..1b13486 100644
--- a/tools/package/maven-plugin/src/main/java/org/onosproject/maven/OnosAppMojo.java
+++ b/tools/package/maven-plugin/src/main/java/org/onosproject/maven/OnosAppMojo.java
@@ -74,6 +74,7 @@
private static final String ONOS_APP_CATEGORY = "onos.app.category";
private static final String ONOS_APP_URL = "onos.app.url";
+ private static final String ONOS_APP_TITLE = "onos.app.title";
private static final String ONOS_APP_README = "onos.app.readme";
private static final String JAR = "jar";
@@ -99,6 +100,7 @@
private String requiredApps;
private String category;
private String url;
+ private String title;
private String readme;
private String version = DEFAULT_VERSION;
private String featuresRepo = DEFAULT_FEATURES_REPO;
@@ -189,6 +191,10 @@
url = (String) project.getProperties().get(ONOS_APP_URL);
url = url != null ? url : DEFAULT_URL;
+ // if title does not exist, fall back to the name
+ title = (String) project.getProperties().get(ONOS_APP_TITLE);
+ title = title != null ? title : name;
+
// if readme does not exist, we simply fallback to use description
readme = (String) project.getProperties().get(ONOS_APP_README);
readme = readme != null ? readme : projectDescription;
@@ -387,6 +393,7 @@
.replaceAll("\\$\\{onos.app.origin\\}", origin)
.replaceAll("\\$\\{onos.app.requires\\}", requiredApps)
.replaceAll("\\$\\{onos.app.category\\}", category)
+ .replaceAll("\\$\\{onos.app.title\\}", title)
.replaceAll("\\$\\{onos.app.url\\}", url)
.replaceAll("\\$\\{project.groupId\\}", projectGroupId)
.replaceAll("\\$\\{project.artifactId\\}", projectArtifactId)
diff --git a/tools/package/maven-plugin/src/main/resources/org/onosproject/maven/app.xml b/tools/package/maven-plugin/src/main/resources/org/onosproject/maven/app.xml
index 7d2c100..6b562fb 100644
--- a/tools/package/maven-plugin/src/main/resources/org/onosproject/maven/app.xml
+++ b/tools/package/maven-plugin/src/main/resources/org/onosproject/maven/app.xml
@@ -15,7 +15,7 @@
~ limitations under the License.
-->
<app name="${onos.app.name}" origin="${onos.app.origin}" version="${project.version}"
- category="${onos.app.category}" url="${onos.app.url}"
+ title="${onos.app.title}" category="${onos.app.category}" url="${onos.app.url}"
featuresRepo="mvn:${project.groupId}/${project.artifactId}/${project.version}/xml/features"
features="${project.artifactId}" apps="${onos.app.requires}">
<description>${project.description}</description>
diff --git a/web/api/src/test/java/org/onosproject/rest/ApplicationsResourceTest.java b/web/api/src/test/java/org/onosproject/rest/ApplicationsResourceTest.java
index 3cb7c8d..ca960a0 100644
--- a/web/api/src/test/java/org/onosproject/rest/ApplicationsResourceTest.java
+++ b/web/api/src/test/java/org/onosproject/rest/ApplicationsResourceTest.java
@@ -84,26 +84,26 @@
private static final Version VER = Version.version(1, 2, "a", null);
private Application app1 =
- new DefaultApplication(id1, VER,
- "app1", "origin1", "category1", "url1",
+ new DefaultApplication(id1, VER, "title1",
+ "desc1", "origin1", "category1", "url1",
"readme1", new byte[0], ApplicationRole.ADMIN,
ImmutableSet.of(), Optional.of(FURL),
ImmutableList.of("My Feature"), ImmutableList.of());
private Application app2 =
- new DefaultApplication(id2, VER,
- "app2", "origin2", "category2", "url2",
+ new DefaultApplication(id2, VER, "title2",
+ "desc2", "origin2", "category2", "url2",
"readme2", new byte[0], ApplicationRole.ADMIN,
ImmutableSet.of(), Optional.of(FURL),
ImmutableList.of("My Feature"), ImmutableList.of());
private Application app3 =
- new DefaultApplication(id3, VER,
- "app3", "origin3", "category3", "url3",
+ new DefaultApplication(id3, VER, "title3",
+ "desc3", "origin3", "category3", "url3",
"readme3", new byte[0], ApplicationRole.ADMIN,
ImmutableSet.of(), Optional.of(FURL),
ImmutableList.of("My Feature"), ImmutableList.of());
private Application app4 =
- new DefaultApplication(id4, VER,
- "app4", "origin4", "category4", "url4",
+ new DefaultApplication(id4, VER, "title4",
+ "desc4", "origin4", "category4", "url4",
"readme4", new byte[0], ApplicationRole.ADMIN,
ImmutableSet.of(), Optional.of(FURL),
ImmutableList.of("My Feature"), ImmutableList.of());
diff --git a/web/gui/src/main/java/org/onosproject/ui/impl/ApplicationViewMessageHandler.java b/web/gui/src/main/java/org/onosproject/ui/impl/ApplicationViewMessageHandler.java
index dca882e..51e538b 100644
--- a/web/gui/src/main/java/org/onosproject/ui/impl/ApplicationViewMessageHandler.java
+++ b/web/gui/src/main/java/org/onosproject/ui/impl/ApplicationViewMessageHandler.java
@@ -54,6 +54,7 @@
private static final String VERSION = "version";
private static final String CATEGORY = "category";
private static final String ORIGIN = "origin";
+ private static final String TITLE = "title";
private static final String DESC = "desc";
private static final String URL = "url";
private static final String README = "readme";
@@ -66,7 +67,7 @@
private static final String ICON_ID_INACTIVE = "appInactive";
private static final String[] COL_IDS = {
- STATE, STATE_IID, ID, ICON, VERSION, CATEGORY, ORIGIN, DESC,
+ STATE, STATE_IID, ID, ICON, VERSION, CATEGORY, ORIGIN, TITLE, DESC,
URL, README, ROLE, REQUIRED_APPS, FEATURES, PERMISSIONS
};
@@ -118,6 +119,7 @@
.cell(VERSION, app.version())
.cell(CATEGORY, app.category())
.cell(ORIGIN, app.origin())
+ .cell(TITLE, app.title())
.cell(DESC, app.description())
.cell(URL, app.url());
}
@@ -168,6 +170,7 @@
data.put(VERSION, app.version().toString());
data.put(ROLE, app.role().toString());
data.put(CATEGORY, app.category());
+ data.put(TITLE, app.title());
data.put(ORIGIN, app.origin());
data.put(README, app.readme());
data.put(DESC, app.description());