Class DefaultApplication

  • All Implemented Interfaces:
    Application

    public final class DefaultApplication
    extends java.lang.Object
    implements Application
    Default implementation of network control/management application descriptor.
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      static class  DefaultApplication.Builder
      Default application builder.
    • Constructor Summary

      Constructors 
      Constructor Description
      DefaultApplication​(ApplicationId appId, Version version, java.lang.String title, java.lang.String description, java.lang.String origin, java.lang.String category, java.lang.String url, java.lang.String readme, byte[] icon, ApplicationRole role, java.util.Set<Permission> permissions, java.util.Optional<java.net.URI> featuresRepo, java.util.List<java.lang.String> features, java.util.List<java.lang.String> requiredApps, java.net.URL imageUrl)
      Creates a new application descriptor using the supplied data.
    • Constructor Detail

      • DefaultApplication

        public DefaultApplication​(ApplicationId appId,
                                  Version version,
                                  java.lang.String title,
                                  java.lang.String description,
                                  java.lang.String origin,
                                  java.lang.String category,
                                  java.lang.String url,
                                  java.lang.String readme,
                                  byte[] icon,
                                  ApplicationRole role,
                                  java.util.Set<Permission> permissions,
                                  java.util.Optional<java.net.URI> featuresRepo,
                                  java.util.List<java.lang.String> features,
                                  java.util.List<java.lang.String> requiredApps,
                                  java.net.URL imageUrl)
        Creates a new application descriptor using the supplied data.
        Parameters:
        appId - application identifier
        version - application version
        title - application title
        description - application description
        origin - origin company
        category - application category
        url - application URL
        readme - application readme
        icon - application icon
        role - application role
        permissions - requested permissions
        featuresRepo - optional features repo URI
        features - application features
        requiredApps - list of required application names
        imageUrl - url of oar file
    • Method Detail

      • id

        public ApplicationId id()
        Description copied from interface: Application
        Returns the application name id.
        Specified by:
        id in interface Application
        Returns:
        application identifier
      • version

        public Version version()
        Description copied from interface: Application
        Returns the application version.
        Specified by:
        version in interface Application
        Returns:
        application version
      • title

        public java.lang.String title()
        Description copied from interface: Application
        Returns the title of the application. This should be a short, human-readable string, as opposed to the unique identifier returned by Application.id().
        Specified by:
        title in interface Application
        Returns:
        application title text
      • description

        public java.lang.String description()
        Description copied from interface: Application
        Returns description of the application.
        Specified by:
        description in interface Application
        Returns:
        application description text
      • category

        public java.lang.String category()
        Description copied from interface: Application
        Returns category of the application. The application developer can choose one of the category from the following examples to easily discern the high-level purpose of the application. (Security, Traffic Steering, Monitoring, Drivers, Provider, Utility)
        Specified by:
        category in interface Application
        Returns:
        application category text
      • url

        public java.lang.String url()
        Description copied from interface: Application
        Returns url of the application.
        Specified by:
        url in interface Application
        Returns:
        application url
      • readme

        public java.lang.String readme()
        Description copied from interface: Application
        Returns readme of the application.
        Specified by:
        readme in interface Application
        Returns:
        application readme
      • icon

        public byte[] icon()
        Description copied from interface: Application
        Returns icon of the application.
        Specified by:
        icon in interface Application
        Returns:
        application icon
      • origin

        public java.lang.String origin()
        Description copied from interface: Application
        Returns the name of the application origin, group or company.
        Specified by:
        origin in interface Application
        Returns:
        application origin
      • permissions

        public java.util.Set<Permission> permissions()
        Description copied from interface: Application
        Returns the permissions requested by the application.
        Specified by:
        permissions in interface Application
        Returns:
        requested permissions
      • featuresRepo

        public java.util.Optional<java.net.URI> featuresRepo()
        Description copied from interface: Application
        Returns the feature repository URI. Null value signifies that the application did not provide its own features repository.
        Specified by:
        featuresRepo in interface Application
        Returns:
        optional feature repo URL
      • features

        public java.util.List<java.lang.String> features()
        Description copied from interface: Application
        Returns the list of features comprising the application. At least one feature must be given.
        Specified by:
        features in interface Application
        Returns:
        application features
      • requiredApps

        public java.util.List<java.lang.String> requiredApps()
        Description copied from interface: Application
        Returns list of required application names.
        Specified by:
        requiredApps in interface Application
        Returns:
        list of application names
      • imageUrl

        public java.net.URL imageUrl()
        Description copied from interface: Application
        Returns binary image URL.
        Specified by:
        imageUrl in interface Application
        Returns:
        URL of binary image
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • equals

        public boolean equals​(java.lang.Object obj)
        Overrides:
        equals in class java.lang.Object
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • builder

        public static DefaultApplication.Builder builder​(Application application)
        Creates a new builder as a copy of an existing application.
        Parameters:
        application - existing application to copy
        Returns:
        new builder
      • builder

        public static DefaultApplication.Builder builder​(ApplicationDescription appDesc)
        Creates a new builder as a copy of an existing application description.
        Parameters:
        appDesc - existing application description
        Returns:
        new builder