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 Object
Default application description builder.
-
-
Constructor Summary
Constructors Constructor Description Builder()
Default constructor for the builder.
-
Method Summary
-
-
-
Method Detail
-
withName
public DefaultApplicationDescription.Builder withName(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(String title)
Adds a title string.- Parameters:
title
- title string- Returns:
- builder
-
withDescription
public DefaultApplicationDescription.Builder withDescription(String description)
Adds a description string.- Parameters:
description
- description string- Returns:
- builder
-
withCategory
public DefaultApplicationDescription.Builder withCategory(String category)
Adds a category string.- Parameters:
category
- category string- Returns:
- builder
-
withUrl
public DefaultApplicationDescription.Builder withUrl(String url)
Adds a URL string.- Parameters:
url
- url string- Returns:
- builder
-
withReadme
public DefaultApplicationDescription.Builder withReadme(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(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(Set<Permission> permissions)
Adds a permissions set.- Parameters:
permissions
- permissions set- Returns:
- builder
-
withFeaturesRepo
public DefaultApplicationDescription.Builder withFeaturesRepo(URI featuresRepo)
Adds a URI for a features repository.- Parameters:
featuresRepo
- Optional URI for a features repository- Returns:
- builder
-
withFeatures
public DefaultApplicationDescription.Builder withFeatures(List<String> features)
Adds a features list.- Parameters:
features
- features list- Returns:
- builder
-
withRequiredApps
public DefaultApplicationDescription.Builder withRequiredApps(List<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
-
-