org.appng.api.model

## Interface Application

- All Superinterfaces:
    Identifiable<Integer>, Identifier, Nameable, Named<Integer>, Serializable, Versionable<Date>
  All Known Subinterfaces:
    AccessibleApplication
  All Known Implementing Classes:
    ApplicationImpl, ApplicationProvider, TestBase.SimpleApplication

      public interface Application
      extends Identifier

  A `Application` is a component that adds certain functionality to the platform. It owns several `Resource`s of different types. For each `Application`, an own `ApplicationContext` is build, based upon the `Application`'s "beans.xml".
  Author:
    Matthias Müller

- - ### Method Summary

    All Methods Instance Methods Abstract Methods Deprecated Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `containsBean(String beanName)` Checks whether a bean with the given name exists for this `Application`.
    `List<ApplicationSubject>` | `getApplicationSubjects()` Returns the `ApplicationSubject`s for this `Application`
    `<T> T` | `getBean(Class<T> type)` Returns the single bean of the given type, if any.
    `Object` | `getBean(String beanName)` Returns the single bean with the given name, if any.
    `<T> T` | `getBean(String name, Class<T> type)` Retrieves the bean of the given name and type from the underlying `ApplicationContext`, if any.
    `String[]` | `getBeanNames(Class<?> type)` Returns the names for all beans of the given type.
    `FeatureProvider` | `getFeatureProvider()` Returns the `FeatureProvider` for this `Application`.
    `String` | `getMessage(Locale locale, String key, Object... args)` Retrieves a message from the underlying `MessageSource`.
    `Set<Permission>` | `getPermissions()` Returns the `Permission`s for this `Application`.
    `Properties` | `getProperties()` Returns the `Properties`s for this `Application`.
    `Resources` | `getResources()` the `Resources` for this `Application`.
    `Set<Resource>` | `getResourceSet()` Returns the `Resource`s for this `Application`.
    `Set<Role>` | `getRoles()` Returns `Role`s for this `Application`.
    `String` | `getSessionParamKey(Site site)` Returns the key to retrieve the session-parameters for this `Application` within the given `Site` from an `Environment`.
    `Map<String,String>` | `getSessionParams(Site site, Environment environment)` Retrieves the session-parameters for for this `Application` within the given `Site` from the given `Environment`.
    `boolean` | `isCoreApplication()` Deprecated. As of appNG 2.0.0, this method will be removed. It has been renamed to `isPrivileged()`.
    `boolean` | `isFileBased()` Returns `true` if this `Application` is filebased, which means it's original `Resource`s are stored on disk, `false` if the `Resource`s are stored in the database.
    `boolean` | `isHidden()` Returns `true` if this `Application` is hidden, which means it does not appear in the navigation menu.
    `boolean` | `isPrivileged()` Returns `true` if this `Application` is a privileged application, which means it has access to the platform's root context and the platform-scoped `Environment`.

    - ### Methods inherited from interface org.appng.api.model.Identifier

      `getAppNGVersion, getDisplayName, getLongDescription, getPackageVersion, getTimestamp, isInstalled, isSnapshot`

    - ### Methods inherited from interface org.appng.api.model.Nameable

      `getDescription, getName`

    - ### Methods inherited from interface org.appng.api.model.Identifiable

      `getId`

    - ### Methods inherited from interface org.appng.api.model.Versionable

      `getVersion`

- - ### Method Detail

    - #### getPermissions

          Set<Permission> getPermissions()

      Returns the `Permission`s for this `Application`.
      Returns:
        the `Permission`s

    - #### getRoles

          Set<Role> getRoles()

      Returns `Role`s for this `Application`.
      Returns:
        the `Role`s

    - #### getResources

          Resources getResources()

      the `Resources` for this `Application`.
      Returns:
        the `Resources` for this `Application`

    - #### getResourceSet

          Set<Resource> getResourceSet()

      Returns the `Resource`s for this `Application`.
      Returns:
        the `Resource`s

    - #### getProperties

          Properties getProperties()

      Returns the `Properties`s for this `Application`.
      Returns:
        the `Properties`s

    - #### getBean

          <T> T getBean(String name,
                        Class<T> type)

      Retrieves the bean of the given name and type from the underlying `ApplicationContext`, if any.
      Parameters:
        `name` - the name of the bean to retrieve
        `type` - the type of the bean to retrieve
      Returns:
        the bean with the given name of the given type, if any.

    - #### getBeanNames

          String[] getBeanNames(Class<?> type)

      Returns the names for all beans of the given type.
      Parameters:
        `type` - the type to get the bean names for
      Returns:
        the bean names

    - #### getBean

          <T> T getBean(Class<T> type)

      Returns the single bean of the given type, if any.
      Parameters:
        `type` - the type of the bean
      Returns:
        the bean of the given type, or `null` if no such bean exists.

    - #### getBean

          Object getBean(String beanName)

      Returns the single bean with the given name, if any.
      Parameters:
        `beanName` - the name of the bean
      Returns:
        the bean with the given name, or `null` if no such bean exists.

    - #### containsBean

          boolean containsBean(String beanName)

      Checks whether a bean with the given name exists for this `Application`.
      Parameters:
        `beanName` - the name of the bean to check existence
      Returns:
        `true` if such a bean exists, `false` otherwise

    - #### isFileBased

          boolean isFileBased()

      Returns `true` if this `Application` is filebased, which means it's original `Resource`s are stored on disk, `false` if the `Resource`s are stored in the database.
      Returns:
        `true` if this `Application` is filebased, `false` otherwise

    - #### isPrivileged

          boolean isPrivileged()

      Returns `true` if this `Application` is a privileged application, which means it has access to the platform's root context and the platform-scoped `Environment`.
      Returns:
        `true` if this `Application` is a privileged application, `false` otherwise

    - #### isCoreApplication

          @Deprecated
          boolean isCoreApplication()

      Deprecated. As of appNG 2.0.0, this method will be removed. It has been renamed to `isPrivileged()`.
      Returns `true` if this `Application` is a privileged application, which means it has access to the platform's root context and the platform-scoped `Environment`.
      Returns:
        `true` if this `Application` is a privileged application, `false` otherwise

    - #### isHidden

          boolean isHidden()

      Returns `true` if this `Application` is hidden, which means it does not appear in the navigation menu.
      Returns:
        `true` if this `Application` is hidden

    - #### getMessage

          String getMessage(Locale locale,
                            String key,
                            Object... args)

      Retrieves a message from the underlying `MessageSource`.
      Parameters:
        `locale` - the `Locale` for the message
        `key` - the message-key
        `args` - the arguments for the message
      Returns:
        the message
      See Also:
        `ResourceType.DICTIONARY`

    - #### getSessionParamKey

          String getSessionParamKey(Site site)

      Returns the key to retrieve the session-parameters for this `Application` within the given `Site` from an `Environment`.
      Parameters:
        `site` - the `Site` to retrieve the key for
      Returns:
        the key to retrieve the session-parameters
      See Also:
        `getSessionParams(Site, Environment)`

    - #### getSessionParams

          Map<String,String> getSessionParams(Site site,
                                              Environment environment)

      Retrieves the session-parameters for for this `Application` within the given `Site` from the given `Environment`.
      Parameters:
        `site` - the `Site` to retrieve the session parameters for
        `environment` - the current `Environment`
      Returns:
        the session-parameters for this `Application` within the given `Site`
      See Also:
        `getSessionParamKey(Site)`

    - #### getFeatureProvider

          FeatureProvider getFeatureProvider()

      Returns the `FeatureProvider` for this `Application`.
      Returns:
        the `FeatureProvider`

    - #### getApplicationSubjects

          List<ApplicationSubject> getApplicationSubjects()

      Returns the `ApplicationSubject`s for this `Application`
      Returns:
        the `ApplicationSubject`s

Copyright © 2011–2023 aiticon GmbH. All rights reserved.