com.holonplatform.vaadin.navigator.internal

## Class DefaultViewConfiguration

- java.lang.Object
- - com.holonplatform.vaadin.navigator.internal.DefaultViewConfiguration

- All Implemented Interfaces:
    ViewConfiguration, Serializable, Consumer<ViewWindowConfigurator>

      public class DefaultViewConfiguration
      extends Object
      implements ViewConfiguration

  Default `ViewConfiguration` implementation.
  Since:
    5.0.0
  See Also:
    Serialized Form

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from interface com.holonplatform.vaadin.navigator.internal.ViewConfiguration

      `ViewConfiguration.ViewConfigurationException, ViewConfiguration.ViewConfigurationProvider, ViewConfiguration.ViewParameterDefinition`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `DefaultViewConfiguration()` Constructor

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `accept(ViewWindowConfigurator t)`
    `Optional<com.holonplatform.auth.annotations.Authenticate>` | `getAuthentication()` Get the optional view `Authenticate` annotation.
    `String` | `getCaption()` Get optional view caption
    `String` | `getCaptionMessageCode()` Get optional view caption translation message code
    `Collection<ViewContextField>` | `getContextInjectionFields()` View class fields which declare `ViewContext` data injection
    `List<Method>` | `getOnLeaveMethods()` Get view `OnLeave` methods
    `List<Method>` | `getOnShowMethods()` Get view `OnShow` methods
    `Collection<ViewConfiguration.ViewParameterDefinition>` | `getParameters()` Get View declared parameters
    `String` | `getParentViewName()` If `ViewConfiguration.isSubView()`, get parent View name
    `List<Method>` | `getViewWindowConfigurationMethods()` Get view `ViewWindowConfiguration` methods.
    `boolean` | `isFireOnRefresh(Method onShowMethod)` Check whether given `OnShow` method must be called also at browser page refresh
    `boolean` | `isForceInWindow()` Gets whether this view must be displayed in a Window
    `boolean` | `isSubView()` Gets whether the view class is a sub view
    `boolean` | `isSubViewContainer()` Gets whether the view class is a `SubViewContainer`
    `boolean` | `isVolatile()` Gets whether this view is volatile (not to be tracked in navigation history)
    `void` | `setAuthentication(com.holonplatform.auth.annotations.Authenticate authentication)` Set view `Authenticate` annotation.
    `void` | `setCaption(String caption)` Set view caption
    `void` | `setCaptionMessageCode(String captionMessageCode)` Set view caption translation message code
    `void` | `setContextInjectionFields(Collection<ViewContextField> contextInjectionFields)` Set view class fields which declare `ViewContext` data injection
    `void` | `setFireOnRefreshMethod(Method onShowMethod)` Set given `OnShow` method as fire on refresh
    `void` | `setForceInWindow(boolean forceInWindow)` Set this view to be displayed in a Window
    `void` | `setOnLeaveMethods(List<Method> onLeaveMethods)` Set view `OnLeave` methods
    `void` | `setOnShowMethods(List<Method> onShowMethods)` Set view `OnShow` methods
    `void` | `setParameters(Collection<ViewConfiguration.ViewParameterDefinition> parameters)` Set view parameters definitions
    `void` | `setParentViewName(String parentViewName)` Set parent view name for sub views
    `void` | `setSubViewContainer(boolean subViewContainer)` Declares view class is a `SubViewContainer`
    `void` | `setViewWindowConfigurationMethods(List<Method> viewWindowConfigurationMethods)` Set view `ViewWindowConfiguration` methods
    `void` | `setVolatile(boolean _volatile)` Set this view as volatile (not to be tracked in navigation history)
    `void` | `setWindowConfiguration(WindowView windowConfiguration)` Set view Window configuration

    - ### Methods inherited from class java.lang.Object

      `equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

    - ### Methods inherited from interface java.util.function.Consumer

      `andThen`

- - ### Constructor Detail

    - #### DefaultViewConfiguration

          public DefaultViewConfiguration()

      Constructor

  - ### Method Detail

    - #### setVolatile

          public void setVolatile(boolean _volatile)

      Set this view as volatile (not to be tracked in navigation history)
      Parameters:
        `_volatile` - `true` to set this view as volatile

    - #### setForceInWindow

          public void setForceInWindow(boolean forceInWindow)

      Set this view to be displayed in a Window
      Parameters:
        `forceInWindow` - `true` to set this view to be displayed in a Window

    - #### setParentViewName

          public void setParentViewName(String parentViewName)

      Set parent view name for sub views
      Parameters:
        `parentViewName` - Parent view name

    - #### setSubViewContainer

          public void setSubViewContainer(boolean subViewContainer)

      Declares view class is a `SubViewContainer`
      Parameters:
        `subViewContainer` - `true` if view class is a `SubViewContainer`

    - #### setCaption

          public void setCaption(String caption)

      Set view caption
      Parameters:
        `caption` - View caption

    - #### setCaptionMessageCode

          public void setCaptionMessageCode(String captionMessageCode)

      Set view caption translation message code
      Parameters:
        `captionMessageCode` - View caption translation message code

    - #### setParameters

          public void setParameters(Collection<ViewConfiguration.ViewParameterDefinition> parameters)

      Set view parameters definitions
      Parameters:
        `parameters` - the parameters definitions to set

    - #### setOnShowMethods

          public void setOnShowMethods(List<Method> onShowMethods)

      Set view `OnShow` methods
      Parameters:
        `onShowMethods` - View OnShow methods

    - #### setOnLeaveMethods

          public void setOnLeaveMethods(List<Method> onLeaveMethods)

      Set view `OnLeave` methods
      Parameters:
        `onLeaveMethods` - View OnLeave methods

    - #### setFireOnRefreshMethod

          public void setFireOnRefreshMethod(Method onShowMethod)

      Set given `OnShow` method as fire on refresh
      Parameters:
        `onShowMethod` - Method to set

    - #### setWindowConfiguration

          public void setWindowConfiguration(WindowView windowConfiguration)

      Set view Window configuration
      Parameters:
        `windowConfiguration` - View Window configuration

    - #### setViewWindowConfigurationMethods

          public void setViewWindowConfigurationMethods(List<Method> viewWindowConfigurationMethods)

      Set view `ViewWindowConfiguration` methods
      Parameters:
        `viewWindowConfigurationMethods` - View ViewWindowConfiguration methods

    - #### getViewWindowConfigurationMethods

          public List<Method> getViewWindowConfigurationMethods()

      Description copied from interface: `ViewConfiguration`
      Get view `ViewWindowConfiguration` methods.
      Specified by:
        `getViewWindowConfigurationMethods` in interface `ViewConfiguration`
      Returns:
        ViewWindowConfiguration methods in call order, or an empty list if none

    - #### setContextInjectionFields

          public void setContextInjectionFields(Collection<ViewContextField> contextInjectionFields)

      Set view class fields which declare `ViewContext` data injection
      Parameters:
        `contextInjectionFields` - Context injection fields

    - #### setAuthentication

          public void setAuthentication(com.holonplatform.auth.annotations.Authenticate authentication)

      Set view `Authenticate` annotation.
      Parameters:
        `authentication` - the Authenticate annotation to set

    - #### isVolatile

          public boolean isVolatile()

      Description copied from interface: `ViewConfiguration`
      Gets whether this view is volatile (not to be tracked in navigation history)
      Specified by:
        `isVolatile` in interface `ViewConfiguration`
      Returns:
        `true` if this view is volatile
      See Also:
        `VolatileView`

    - #### isForceInWindow

          public boolean isForceInWindow()

      Description copied from interface: `ViewConfiguration`
      Gets whether this view must be displayed in a Window
      Specified by:
        `isForceInWindow` in interface `ViewConfiguration`
      Returns:
        `true` if this view must be displayed in a Window
      See Also:
        `WindowView`

    - #### isSubView

          public boolean isSubView()

      Description copied from interface: `ViewConfiguration`
      Gets whether the view class is a sub view
      Specified by:
        `isSubView` in interface `ViewConfiguration`
      Returns:
        `true` if the view class is a sub view

    - #### isSubViewContainer

          public boolean isSubViewContainer()

      Description copied from interface: `ViewConfiguration`
      Gets whether the view class is a `SubViewContainer`
      Specified by:
        `isSubViewContainer` in interface `ViewConfiguration`
      Returns:
        `true` if the view class is a `SubViewContainer`

    - #### getParentViewName

          public String getParentViewName()

      Description copied from interface: `ViewConfiguration`
      If `ViewConfiguration.isSubView()`, get parent View name
      Specified by:
        `getParentViewName` in interface `ViewConfiguration`
      Returns:
        Parent View name, or `null` if it is not a sub view

    - #### getCaption

          public String getCaption()

      Description copied from interface: `ViewConfiguration`
      Get optional view caption
      Specified by:
        `getCaption` in interface `ViewConfiguration`
      Returns:
        View caption, or `null` if not defined
      See Also:
        `Caption`

    - #### getCaptionMessageCode

          public String getCaptionMessageCode()

      Description copied from interface: `ViewConfiguration`
      Get optional view caption translation message code
      Specified by:
        `getCaptionMessageCode` in interface `ViewConfiguration`
      Returns:
        View caption translation message code, or `null` if not defined
      See Also:
        `Caption`

    - #### getParameters

          public Collection<ViewConfiguration.ViewParameterDefinition> getParameters()

      Description copied from interface: `ViewConfiguration`
      Get View declared parameters
      Specified by:
        `getParameters` in interface `ViewConfiguration`
      Returns:
        View declared parameters, or an empty set if no parameter declared

    - #### getOnShowMethods

          public List<Method> getOnShowMethods()

      Description copied from interface: `ViewConfiguration`
      Get view `OnShow` methods
      Specified by:
        `getOnShowMethods` in interface `ViewConfiguration`
      Returns:
        OnShow methods in call order, or an empty list if none

    - #### getOnLeaveMethods

          public List<Method> getOnLeaveMethods()

      Description copied from interface: `ViewConfiguration`
      Get view `OnLeave` methods
      Specified by:
        `getOnLeaveMethods` in interface `ViewConfiguration`
      Returns:
        OnLeave methods in call order, or an empty list if none

    - #### isFireOnRefresh

          public boolean isFireOnRefresh(Method onShowMethod)

      Description copied from interface: `ViewConfiguration`
      Check whether given `OnShow` method must be called also at browser page refresh
      Specified by:
        `isFireOnRefresh` in interface `ViewConfiguration`
      Parameters:
        `onShowMethod` - Method to check
      Returns:
        `true` if method must be called also at browser page refresh

    - #### getContextInjectionFields

          public Collection<ViewContextField> getContextInjectionFields()

      Description copied from interface: `ViewConfiguration`
      View class fields which declare `ViewContext` data injection
      Specified by:
        `getContextInjectionFields` in interface `ViewConfiguration`
      Returns:
        Context inection fields, or an empty set if none

    - #### getAuthentication

          public Optional<com.holonplatform.auth.annotations.Authenticate> getAuthentication()

      Description copied from interface: `ViewConfiguration`
      Get the optional view `Authenticate` annotation.
      Specified by:
        `getAuthentication` in interface `ViewConfiguration`
      Returns:
        View `Authenticate` annotation

    - #### accept

          public void accept(ViewWindowConfigurator t)

      Specified by:
        `accept` in interface `Consumer<ViewWindowConfigurator>`

Copyright © 2019 The Holon Platform. All rights reserved.