Interface Application


  • public interface Application
    This class specifies an interface to the application global object. It consists of:
    • The identity of the application (human readable name, unique identifier and instance identifier),
    • The application storage location,
    • The list of available environments,
    • The name of the current detected environment,
    • The current status of debug mode (enabled or disabled).
    • Method Detail

      • getName

        String getName()
        Get the full human-readable name of the application.
        Returns:
        The name of the application.
      • getId

        String getId()
        Get the organization-wide unique identifier of the application.
        Returns:
        The identifier.
      • getVersion

        String getVersion()
        Get the version of the application.
        Returns:
        The application version.
      • getStorageLocation

        File getStorageLocation​(String context)
        Get the application storage location.
        Parameters:
        context - The storage context.
        Returns:
        The file object denoting application storage directory.
      • isStorageEnabled

        boolean isStorageEnabled()
        Returns:
        true if the local storage is enabled, false otherwise.
      • getConfiguration

        org.seedstack.coffig.Coffig getConfiguration()
        Get the application configuration.
        Returns:
        the Coffig object of the whole application configuration.
      • getConfiguration

        <T> ClassConfiguration<T> getConfiguration​(Class<T> someClass)
        Get the configuration properties of the specified class.
        Parameters:
        someClass - the class to get the configuration from.
        Returns:
        the ClassConfiguration object containing all configuration properties for the class.
      • substituteWithConfiguration

        String substituteWithConfiguration​(String value)
        Substitute any ${...} expression in the given string with the configuration values.
        Parameters:
        value - the string to substitute.
        Returns:
        the substituted string.
      • getKernelParameters

        Map<String,​String> getKernelParameters()
        Returns the kernel parameters given to the application.
        Returns:
        the kernel parameters.
      • getArguments

        String[] getArguments()
        Returns the command-line arguments given to the application.
        Returns:
        the command-line arguments.