Class GuiProperties

java.lang.Object
swiss.trustbroker.config.dto.GuiProperties

public class GuiProperties extends Object
GUI related configurations.
  • Constructor Details

    • GuiProperties

      public GuiProperties()
    • GuiProperties

      public GuiProperties(String images, String translations, String themeAssets, String defaultLanguage, List<GuiButtons> buttons, List<GuiFeatures> features, List<Banner> banners, Integer maxBanners, CookieProperties themeCookie, CookieProperties languageCookie, CookieProperties announcementCookie, CookieProperties claimsProviderNoticeCookie, int versionedResourceMaxAgeDay, String[] versionedResourcePaths, int taggedResourceMaxAgeSec)
      Creates a new GuiProperties instance.
      Parameters:
      images - Resource path where images used in the ClaimsProviderDefinitions are stored.
      translations - Resource path where UI language support files in JSON format are stored.
      themeAssets - Resource path where theme assets are stored.
      defaultLanguage - Default language for the UI.
      buttons - Buttons enabled for the theme.
      features - Feature enabled for the theme.
      banners - Banners.
      maxBanners - Limit the number of banners shown on HRD.
      For usability reasons, the area consumed by banners should be limited, so the number should be very small.
      themeCookie - Attributes for the cookie that stores the user's theme (if there is a theme selector).
      languageCookie - Attributes for the cookie that stores the user's selected language.
      announcementCookie - XTB can (via a plugin) support announcements to communicate with the federating user. These cookie preferences are used to customize it's client side behavior.
      claimsProviderNoticeCookie - XTB can (via a plugin) support a notice screen that can be configured, where an end user can set a cookie to not show the screen next time. These cookie preferences are used to customize it's client side behavior.
      versionedResourceMaxAgeDay - Browser caching max-age in days for resources that have resource version in the path (a hash or version number).
      These resources can be cached for a long period as any change will result in a new resource version.
      versionedResourcePaths - Paths of resources that have resource version in the path (a hash or version number).
      taggedResourceMaxAgeSec - Browser caching max-age in seconds for resources that have are tagged with an ETAG (a hash or version number).
      These resources can be cached for some time after which the ETAG has to be checked.
      Since:
      1.9.0, 1.9.0, 1.14.0, 1.10.0, 1.10.0, 1.10.0
      See Also:
  • Method Details

    • getBanner

      public Optional<Banner> getBanner(String name)
      Parameters:
      name -
      Returns:
      Banner with name if defined.
    • getGlobalBanners

      public List<Banner> getGlobalBanners()
      Returns:
      all global banners
    • hasFeature

      public boolean hasFeature(GuiFeatures feature)
      Returns:
      true if the feature is enabled.
    • builder

      public static GuiProperties.GuiPropertiesBuilder builder()
    • getImages

      public String getImages()
      Resource path where images used in the ClaimsProviderDefinitions are stored.
      See Also:
    • getTranslations

      public String getTranslations()
      Resource path where UI language support files in JSON format are stored.
    • getThemeAssets

      public String getThemeAssets()
      Resource path where theme assets are stored.
    • getDefaultLanguage

      public String getDefaultLanguage()
      Default language for the UI.
    • getButtons

      public List<GuiButtons> getButtons()
      Buttons enabled for the theme.
    • getFeatures

      public List<GuiFeatures> getFeatures()
      Feature enabled for the theme.
    • getBanners

      public List<Banner> getBanners()
      Banners.
      Since:
      1.9.0
    • getMaxBanners

      public Integer getMaxBanners()
      Limit the number of banners shown on HRD.
      For usability reasons, the area consumed by banners should be limited, so the number should be very small.
      Since:
      1.9.0
      See Also:
    • getThemeCookie

      public CookieProperties getThemeCookie()
      Attributes for the cookie that stores the user's theme (if there is a theme selector).
    • getLanguageCookie

      public CookieProperties getLanguageCookie()
      Attributes for the cookie that stores the user's selected language.
    • getAnnouncementCookie

      public CookieProperties getAnnouncementCookie()
      XTB can (via a plugin) support announcements to communicate with the federating user. These cookie preferences are used to customize it's client side behavior.
    • getClaimsProviderNoticeCookie

      public CookieProperties getClaimsProviderNoticeCookie()
      XTB can (via a plugin) support a notice screen that can be configured, where an end user can set a cookie to not show the screen next time. These cookie preferences are used to customize it's client side behavior.
      Since:
      1.14.0
    • getVersionedResourceMaxAgeDay

      public int getVersionedResourceMaxAgeDay()
      Browser caching max-age in days for resources that have resource version in the path (a hash or version number).
      These resources can be cached for a long period as any change will result in a new resource version.
      Since:
      1.10.0
    • getVersionedResourcePaths

      public String[] getVersionedResourcePaths()
      Paths of resources that have resource version in the path (a hash or version number).
      Since:
      1.10.0
    • getTaggedResourceMaxAgeSec

      public int getTaggedResourceMaxAgeSec()
      Browser caching max-age in seconds for resources that have are tagged with an ETAG (a hash or version number).
      These resources can be cached for some time after which the ETAG has to be checked.
      Since:
      1.10.0
    • setImages

      public void setImages(String images)
      Resource path where images used in the ClaimsProviderDefinitions are stored.
      See Also:
    • setTranslations

      public void setTranslations(String translations)
      Resource path where UI language support files in JSON format are stored.
    • setThemeAssets

      public void setThemeAssets(String themeAssets)
      Resource path where theme assets are stored.
    • setDefaultLanguage

      public void setDefaultLanguage(String defaultLanguage)
      Default language for the UI.
    • setButtons

      public void setButtons(List<GuiButtons> buttons)
      Buttons enabled for the theme.
    • setFeatures

      public void setFeatures(List<GuiFeatures> features)
      Feature enabled for the theme.
    • setBanners

      public void setBanners(List<Banner> banners)
      Banners.
      Since:
      1.9.0
    • setMaxBanners

      public void setMaxBanners(Integer maxBanners)
      Limit the number of banners shown on HRD.
      For usability reasons, the area consumed by banners should be limited, so the number should be very small.
      Since:
      1.9.0
      See Also:
    • setThemeCookie

      public void setThemeCookie(CookieProperties themeCookie)
      Attributes for the cookie that stores the user's theme (if there is a theme selector).
    • setLanguageCookie

      public void setLanguageCookie(CookieProperties languageCookie)
      Attributes for the cookie that stores the user's selected language.
    • setAnnouncementCookie

      public void setAnnouncementCookie(CookieProperties announcementCookie)
      XTB can (via a plugin) support announcements to communicate with the federating user. These cookie preferences are used to customize it's client side behavior.
    • setClaimsProviderNoticeCookie

      public void setClaimsProviderNoticeCookie(CookieProperties claimsProviderNoticeCookie)
      XTB can (via a plugin) support a notice screen that can be configured, where an end user can set a cookie to not show the screen next time. These cookie preferences are used to customize it's client side behavior.
      Since:
      1.14.0
    • setVersionedResourceMaxAgeDay

      public void setVersionedResourceMaxAgeDay(int versionedResourceMaxAgeDay)
      Browser caching max-age in days for resources that have resource version in the path (a hash or version number).
      These resources can be cached for a long period as any change will result in a new resource version.
      Since:
      1.10.0
    • setVersionedResourcePaths

      public void setVersionedResourcePaths(String[] versionedResourcePaths)
      Paths of resources that have resource version in the path (a hash or version number).
      Since:
      1.10.0
    • setTaggedResourceMaxAgeSec

      public void setTaggedResourceMaxAgeSec(int taggedResourceMaxAgeSec)
      Browser caching max-age in seconds for resources that have are tagged with an ETAG (a hash or version number).
      These resources can be cached for some time after which the ETAG has to be checked.
      Since:
      1.10.0
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • canEqual

      protected boolean canEqual(Object other)
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object