Package org.seedstack.seed
Interface Application
-
public interface ApplicationThis 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 Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description String[]getArguments()Returns the command-line arguments given to the application.org.seedstack.coffig.CoffiggetConfiguration()Get the application configuration.<T> ClassConfiguration<T>getConfiguration(Class<T> someClass)Get the configuration properties of the specified class.StringgetId()Get the organization-wide unique identifier of the application.Map<String,String>getKernelParameters()Returns the kernel parameters given to the application.StringgetName()Get the full human-readable name of the application.FilegetStorageLocation(String context)Get the application storage location.StringgetVersion()Get the version of the application.booleanisStorageEnabled()StringsubstituteWithConfiguration(String value)Substitute any ${...} expression in the given string with the configuration values.
-
-
-
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
Coffigobject 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
ClassConfigurationobject 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.
-
-