mirror of
https://github.com/opennetworkinglab/onos.git
synced 2025-11-03 17:51:26 +01:00
[ONOS-3634] Provide default category name and make url nullable
Change-Id: Id6d0404cc1e46cdd4f54f2ff64ca69313bec9281
This commit is contained in:
parent
6282c809b8
commit
01b0f595fc
@ -75,7 +75,7 @@ public class DefaultApplicationDescription implements ApplicationDescription {
|
||||
this.description = checkNotNull(description, "Description cannot be null");
|
||||
this.origin = checkNotNull(origin, "Origin cannot be null");
|
||||
this.category = checkNotNull(category, "Category cannot be null");
|
||||
this.url = checkNotNull(url, "URL cannot be null");
|
||||
this.url = url;
|
||||
this.readme = checkNotNull(readme, "Readme cannot be null");
|
||||
this.icon = icon;
|
||||
this.role = checkNotNull(role, "Role cannot be null");
|
||||
|
||||
@ -74,7 +74,7 @@ public class DefaultApplication implements Application {
|
||||
this.description = checkNotNull(description, "Description cannot be null");
|
||||
this.origin = checkNotNull(origin, "Origin cannot be null");
|
||||
this.category = checkNotNull(category, "Category cannot be null");
|
||||
this.url = checkNotNull(url, "URL cannot be null");
|
||||
this.url = url;
|
||||
this.readme = checkNotNull(readme, "Readme cannot be null");
|
||||
this.icon = icon;
|
||||
this.role = checkNotNull(role, "Role cannot be null");
|
||||
|
||||
@ -86,6 +86,8 @@ public class ApplicationArchive
|
||||
private static final String APPS = "[@apps]";
|
||||
private static final String DESCRIPTION = "description";
|
||||
|
||||
private static final String UTILITY = "utility";
|
||||
|
||||
private static final String CATEGORY = "[@category]";
|
||||
private static final String URL = "[@url]";
|
||||
|
||||
@ -293,7 +295,7 @@ public class ApplicationArchive
|
||||
String name = cfg.getString(NAME);
|
||||
Version version = Version.version(cfg.getString(VERSION));
|
||||
String origin = cfg.getString(ORIGIN);
|
||||
String category = cfg.getString(CATEGORY);
|
||||
String category = cfg.getString(CATEGORY, UTILITY);
|
||||
String url = cfg.getString(URL);
|
||||
byte[] icon = getApplicationIcon(name);
|
||||
ApplicationRole role = getRole(cfg.getString(ROLE));
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user