Package org.onosproject.app
Class DefaultApplicationDescription.Builder
- java.lang.Object
-
- org.onosproject.app.DefaultApplicationDescription.Builder
-
- Enclosing class:
- DefaultApplicationDescription
public static final class DefaultApplicationDescription.Builder extends java.lang.Object
Default application description builder.
-
-
Constructor Summary
Constructors Constructor Description Builder()
Default constructor for the builder.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description DefaultApplicationDescription
build()
Builds a default application object from the gathered parameters.DefaultApplicationDescription.Builder
withCategory(java.lang.String category)
Adds a category string.DefaultApplicationDescription.Builder
withDescription(java.lang.String description)
Adds a description string.DefaultApplicationDescription.Builder
withFeatures(java.util.List<java.lang.String> features)
Adds a features list.DefaultApplicationDescription.Builder
withFeaturesRepo(java.net.URI featuresRepo)
Adds a URI for a features repository.DefaultApplicationDescription.Builder
withIcon(byte[] icon)
Adds an icon.DefaultApplicationDescription.Builder
withName(java.lang.String name)
Adds an application id.DefaultApplicationDescription.Builder
withOrigin(java.lang.String origin)
Adds an origin string.DefaultApplicationDescription.Builder
withPermissions(java.util.Set<Permission> permissions)
Adds a permissions set.DefaultApplicationDescription.Builder
withReadme(java.lang.String readme)
Adds a readme string.DefaultApplicationDescription.Builder
withRequiredApps(java.util.List<java.lang.String> requiredApps)
Adds a list of required applications.DefaultApplicationDescription.Builder
withRole(ApplicationRole role)
Adds an application role.DefaultApplicationDescription.Builder
withTitle(java.lang.String title)
Adds a title string.DefaultApplicationDescription.Builder
withUrl(java.lang.String url)
Adds a URL string.DefaultApplicationDescription.Builder
withVersion(Version version)
Adds a version string.
-
-
-
Method Detail
-
withName
public DefaultApplicationDescription.Builder withName(java.lang.String name)
Adds an application id.- Parameters:
name
- application name- Returns:
- builder
-
withVersion
public DefaultApplicationDescription.Builder withVersion(Version version)
Adds a version string.- Parameters:
version
- version string- Returns:
- builder
-
withTitle
public DefaultApplicationDescription.Builder withTitle(java.lang.String title)
Adds a title string.- Parameters:
title
- title string- Returns:
- builder
-
withDescription
public DefaultApplicationDescription.Builder withDescription(java.lang.String description)
Adds a description string.- Parameters:
description
- description string- Returns:
- builder
-
withCategory
public DefaultApplicationDescription.Builder withCategory(java.lang.String category)
Adds a category string.- Parameters:
category
- category string- Returns:
- builder
-
withUrl
public DefaultApplicationDescription.Builder withUrl(java.lang.String url)
Adds a URL string.- Parameters:
url
- url string- Returns:
- builder
-
withReadme
public DefaultApplicationDescription.Builder withReadme(java.lang.String readme)
Adds a readme string.- Parameters:
readme
- readme string- Returns:
- builder
-
withIcon
public DefaultApplicationDescription.Builder withIcon(byte[] icon)
Adds an icon.- Parameters:
icon
- icon data- Returns:
- builder
-
withOrigin
public DefaultApplicationDescription.Builder withOrigin(java.lang.String origin)
Adds an origin string.- Parameters:
origin
- origin string- Returns:
- builder
-
withRole
public DefaultApplicationDescription.Builder withRole(ApplicationRole role)
Adds an application role.- Parameters:
role
- application role- Returns:
- builder
-
withPermissions
public DefaultApplicationDescription.Builder withPermissions(java.util.Set<Permission> permissions)
Adds a permissions set.- Parameters:
permissions
- permissions set- Returns:
- builder
-
withFeaturesRepo
public DefaultApplicationDescription.Builder withFeaturesRepo(java.net.URI featuresRepo)
Adds a URI for a features repository.- Parameters:
featuresRepo
- Optional URI for a features repository- Returns:
- builder
-
withFeatures
public DefaultApplicationDescription.Builder withFeatures(java.util.List<java.lang.String> features)
Adds a features list.- Parameters:
features
- features list- Returns:
- builder
-
withRequiredApps
public DefaultApplicationDescription.Builder withRequiredApps(java.util.List<java.lang.String> requiredApps)
Adds a list of required applications.- Parameters:
requiredApps
- List of name strings of required applications- Returns:
- builder
-
build
public DefaultApplicationDescription build()
Builds a default application object from the gathered parameters.- Returns:
- new default application
-
-