Package org.onosproject.core
Class DefaultApplication.Builder
- java.lang.Object
-
- org.onosproject.core.DefaultApplication.Builder
-
- Enclosing class:
- DefaultApplication
public static final class DefaultApplication.Builder extends Object
Default application builder.
-
-
Constructor Summary
Constructors Constructor Description Builder()
Default constructor for the builder.Builder(ApplicationDescription appDesc)
Updates the builder to be a copy of an existing application description.Builder(Application application)
Updates the builder to be a copy of an existing application.Builder(DefaultApplication.Builder builder)
Updates the builder to be a copy of an existing builder.
-
Method Summary
-
-
-
Constructor Detail
-
Builder
public Builder()
Default constructor for the builder.
-
Builder
public Builder(DefaultApplication.Builder builder)
Updates the builder to be a copy of an existing builder.- Parameters:
builder
- existing builder to copy
-
Builder
public Builder(Application application)
Updates the builder to be a copy of an existing application.- Parameters:
application
- existing application to copy
-
Builder
public Builder(ApplicationDescription appDesc)
Updates the builder to be a copy of an existing application description.- Parameters:
appDesc
- existing application description
-
-
Method Detail
-
withAppId
public DefaultApplication.Builder withAppId(ApplicationId appId)
Adds an application id.- Parameters:
appId
- application id- Returns:
- builder
-
withVersion
public DefaultApplication.Builder withVersion(Version version)
Adds a version string.- Parameters:
version
- version string- Returns:
- builder
-
withTitle
public DefaultApplication.Builder withTitle(String title)
Adds a title string.- Parameters:
title
- title string- Returns:
- builder
-
withDescription
public DefaultApplication.Builder withDescription(String description)
Adds a description string.- Parameters:
description
- description string- Returns:
- builder
-
withCategory
public DefaultApplication.Builder withCategory(String category)
Adds a category string.- Parameters:
category
- category string- Returns:
- builder
-
withUrl
public DefaultApplication.Builder withUrl(String url)
Adds a URL string.- Parameters:
url
- url string- Returns:
- builder
-
withReadme
public DefaultApplication.Builder withReadme(String readme)
Adds a readme string.- Parameters:
readme
- readme string- Returns:
- builder
-
withIcon
public DefaultApplication.Builder withIcon(byte[] icon)
Adds an icon.- Parameters:
icon
- icon data- Returns:
- builder
-
withOrigin
public DefaultApplication.Builder withOrigin(String origin)
Adds an origin string.- Parameters:
origin
- origin string- Returns:
- builder
-
withRole
public DefaultApplication.Builder withRole(ApplicationRole role)
Adds an application role.- Parameters:
role
- application role- Returns:
- builder
-
withPermissions
public DefaultApplication.Builder withPermissions(Set<Permission> permissions)
Adds a permissions set.- Parameters:
permissions
- permissions set- Returns:
- builder
-
withFeaturesRepo
public DefaultApplication.Builder withFeaturesRepo(Optional<URI> featuresRepo)
Adds a URI for a features repository.- Parameters:
featuresRepo
- Optional URI for a features repository- Returns:
- builder
-
withFeatures
public DefaultApplication.Builder withFeatures(List<String> features)
Adds a features list.- Parameters:
features
- features list- Returns:
- builder
-
withRequiredApps
public DefaultApplication.Builder withRequiredApps(List<String> requiredApps)
Adds a list of required applications.- Parameters:
requiredApps
- List of name strings of required applications- Returns:
- builder
-
withImageUrl
public DefaultApplication.Builder withImageUrl(URL imageUrl)
Adds a Binary Image URL.- Parameters:
imageUrl
- url of oar file- Returns:
- builder
-
build
public DefaultApplication build()
Builds a default application object from the gathered parameters.- Returns:
- new default application
-
-