public static final class DefaultApplication.Builder
extends java.lang.Object
Constructor and Description |
---|
Builder()
Default constructor for the builder.
|
Builder(Application application)
Updates the builder to be a copy of an existing application.
|
Builder(ApplicationDescription appDesc)
Updates the builder to be a copy of an existing application description.
|
Builder(DefaultApplication.Builder builder)
Updates the builder to be a copy of an existing builder.
|
Modifier and Type | Method and Description |
---|---|
DefaultApplication |
build()
Builds a default application object from the gathered parameters.
|
DefaultApplication.Builder |
withAppId(ApplicationId appId)
Adds an application id.
|
DefaultApplication.Builder |
withCategory(java.lang.String category)
Adds a category string.
|
DefaultApplication.Builder |
withDescription(java.lang.String description)
Adds a description string.
|
DefaultApplication.Builder |
withFeatures(java.util.List<java.lang.String> features)
Adds a features list.
|
DefaultApplication.Builder |
withFeaturesRepo(java.util.Optional<java.net.URI> featuresRepo)
Adds a URI for a features repository.
|
DefaultApplication.Builder |
withIcon(byte[] icon)
Adds an icon.
|
DefaultApplication.Builder |
withOrigin(java.lang.String origin)
Adds an origin string.
|
DefaultApplication.Builder |
withPermissions(java.util.Set<Permission> permissions)
Adds a permissions set.
|
DefaultApplication.Builder |
withReadme(java.lang.String readme)
Adds a readme string.
|
DefaultApplication.Builder |
withRequiredApps(java.util.List<java.lang.String> requiredApps)
Adds a list of required applications.
|
DefaultApplication.Builder |
withRole(ApplicationRole role)
Adds an application role.
|
DefaultApplication.Builder |
withTitle(java.lang.String title)
Adds a title string.
|
DefaultApplication.Builder |
withUrl(java.lang.String url)
Adds a URL string.
|
DefaultApplication.Builder |
withVersion(Version version)
Adds a version string.
|
public Builder()
public Builder(DefaultApplication.Builder builder)
builder
- existing builder to copypublic Builder(Application application)
application
- existing application to copypublic Builder(ApplicationDescription appDesc)
appDesc
- existing application descriptionpublic DefaultApplication.Builder withAppId(ApplicationId appId)
appId
- application idpublic DefaultApplication.Builder withVersion(Version version)
version
- version stringpublic DefaultApplication.Builder withTitle(java.lang.String title)
title
- title stringpublic DefaultApplication.Builder withDescription(java.lang.String description)
description
- description stringpublic DefaultApplication.Builder withCategory(java.lang.String category)
category
- category stringpublic DefaultApplication.Builder withUrl(java.lang.String url)
url
- url stringpublic DefaultApplication.Builder withReadme(java.lang.String readme)
readme
- readme stringpublic DefaultApplication.Builder withIcon(byte[] icon)
icon
- icon datapublic DefaultApplication.Builder withOrigin(java.lang.String origin)
origin
- origin stringpublic DefaultApplication.Builder withRole(ApplicationRole role)
role
- application rolepublic DefaultApplication.Builder withPermissions(java.util.Set<Permission> permissions)
permissions
- permissions setpublic DefaultApplication.Builder withFeaturesRepo(java.util.Optional<java.net.URI> featuresRepo)
featuresRepo
- Optional URI for a features repositorypublic DefaultApplication.Builder withFeatures(java.util.List<java.lang.String> features)
features
- features listpublic DefaultApplication.Builder withRequiredApps(java.util.List<java.lang.String> requiredApps)
requiredApps
- List of name strings of required applicationspublic DefaultApplication build()