Class DefaultApplication.Builder

  • Enclosing class:
    DefaultApplication

    public static final class DefaultApplication.Builder
    extends java.lang.Object
    Default application builder.
    • 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

      • withTitle

        public DefaultApplication.Builder withTitle​(java.lang.String title)
        Adds a title string.
        Parameters:
        title - title string
        Returns:
        builder
      • withDescription

        public DefaultApplication.Builder withDescription​(java.lang.String description)
        Adds a description string.
        Parameters:
        description - description string
        Returns:
        builder
      • withCategory

        public DefaultApplication.Builder withCategory​(java.lang.String category)
        Adds a category string.
        Parameters:
        category - category string
        Returns:
        builder
      • withUrl

        public DefaultApplication.Builder withUrl​(java.lang.String url)
        Adds a URL string.
        Parameters:
        url - url string
        Returns:
        builder
      • withReadme

        public DefaultApplication.Builder withReadme​(java.lang.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​(java.lang.String origin)
        Adds an origin string.
        Parameters:
        origin - origin string
        Returns:
        builder
      • withPermissions

        public DefaultApplication.Builder withPermissions​(java.util.Set<Permission> permissions)
        Adds a permissions set.
        Parameters:
        permissions - permissions set
        Returns:
        builder
      • withFeaturesRepo

        public DefaultApplication.Builder withFeaturesRepo​(java.util.Optional<java.net.URI> featuresRepo)
        Adds a URI for a features repository.
        Parameters:
        featuresRepo - Optional URI for a features repository
        Returns:
        builder
      • withFeatures

        public DefaultApplication.Builder withFeatures​(java.util.List<java.lang.String> features)
        Adds a features list.
        Parameters:
        features - features list
        Returns:
        builder
      • withRequiredApps

        public DefaultApplication.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
      • withImageUrl

        public DefaultApplication.Builder withImageUrl​(java.net.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