Class WebjetComponentAbstract

java.lang.Object
sk.iway.iwcm.components.WebjetComponentAbstract
All Implemented Interfaces:
WebjetComponentInterface
Direct Known Subclasses:
BannerApp, BasketInvoicesListApp, CalendarApp, Captcha, CarouselSliderApp, ContentBlockApp, CookieBarApp, DateApp, DayBookApp, DisqusApp, DmailApp, DocsEmbedApp, DoubleOptInComponent, EmoticonApp, FacebookCommentsApp, FacebookLikeApp, FacebookLikeBoxApp, FileArchiveApp, FormSimpleApp, ForumApp, GalleryApp, GdprApp, HtmlBoxApp, HtmlEmbedApp, ImpressSlideshowApp, InquiryApp, InquirySimpleApp, MapApp, MediaApp, MenuApp, MultistepFormApp, NewsApp, NewsCalendarApp, QaApp, QuizApp, RatingApp, RelatedPagesApp, ReservationApp, RestaurantMenuApp, SearchApp, SendLinkApp, SiteBrowserApp, SiteMapApp, SliderApp, SlitSliderApp, SmartsUppApp, SocialIconApp, StatApp, TestimonialsApp, TimeBookApp, UnsubscribeApp, UserApp, UsrLogonController, VideoApp, VyhladavanieApp, WeatherApp

public abstract class WebjetComponentAbstract extends Object implements WebjetComponentInterface
Base/Abstract class for WebJET app
  • Field Details

    • device

      public String device
      DEFAULT commonSettings TAB
    • showForLoggedUser

      public String showForLoggedUser
    • cacheMinutes

      public Integer cacheMinutes
    • appHideFields

      public String appHideFields
    • wrapperClass

      public String wrapperClass
    • wrapperId

      public String wrapperId
    • wrapperTitle

      public String wrapperTitle
    • wrapperAriaLabel

      public String wrapperAriaLabel
  • Constructor Details

    • WebjetComponentAbstract

      public WebjetComponentAbstract()
  • Method Details

    • init

      public void init()
      Initialization method for custom component initialization Called every time a component is inserted into the page
      Specified by:
      init in interface WebjetComponentInterface
    • init

      public void init(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response)
      Initialization method for custom component initialization Called every time a component is inserted into the page
      Specified by:
      init in interface WebjetComponentInterface
    • getAppOptions

      public Map<String,List<OptionDto>> getAppOptions(ComponentRequest componentRequest, jakarta.servlet.http.HttpServletRequest request)
      Returns list of options for app editor in webpage
      Specified by:
      getAppOptions in interface WebjetComponentInterface
    • getBaseAppOptions

      public Map<String,List<OptionDto>> getBaseAppOptions(jakarta.servlet.http.HttpServletRequest request)
      Returns base options for common fields (e.g. wrapperClass) from configuration. These are merged with subclass-specific options in ComponentsService. Supports format: "label:value" or just "value". Label can be a translation key.
    • buildWrapperDiv

      public static String[] buildWrapperDiv(String wrapperClassValue, String wrapperIdValue, String wrapperTitleValue, String wrapperAriaLabelValue)
      Build wrapper div HTML for component output. Returns null if no wrapper attributes are set.
      Parameters:
      wrapperClassValue - - wrapper CSS class value (+ separated)
      wrapperIdValue - - wrapper id value
      wrapperTitleValue - - wrapper title value
      wrapperAriaLabelValue - - wrapper aria-label value
      Returns:
      String array with [0] = opening tag, [1] = closing tag, or null if no wrapper needed
    • initAppEditor

      public void initAppEditor(ComponentRequest componentRequest, jakarta.servlet.http.HttpServletRequest request)
      Initialization method for app editor in webpage
      Specified by:
      initAppEditor in interface WebjetComponentInterface
    • addCurrentValueToOptions

      public List<OptionDto> addCurrentValueToOptions(List<OptionDto> options, String value)
      Verify, that value is in options, if not, add it
      Parameters:
      options -
      value -
    • addCurrentValueToOptions

      public List<OptionDto> addCurrentValueToOptions(List<OptionDto> options, String[] values)
      Verify, that values are in options, if not, add it
      Parameters:
      options -
      values -
      Returns:
    • addOptions

      public List<OptionDto> addOptions(List options, String labelProperty, String valueProperty, boolean includeOriginalObject)
      Add options from list type id:label, id will be converted to string and used as value for option. Use in getAppOptions method like: Map<String, List<OptionDto>> options = new HashMap<>(); options.put("groups", addOptions(MediaDB.getGroups(), "mediaGroupName", "mediaGroupId", false)); return options;
      Parameters:
      options - - list of objects
      labelProperty - - name of label property in options list
      valueProperty - - name of value property in options list
      includeOriginalObject - - if true, original object will be added to OptionDto
      Returns:
    • getViewFolder

      public String getViewFolder()
      Specified by:
      getViewFolder in interface WebjetComponentInterface
    • setViewFolder

      public void setViewFolder(String viewFolder)
    • getDevice

      public String getDevice()
    • setDevice

      public void setDevice(String device)
    • getCacheMinutes

      public Integer getCacheMinutes()
    • setCacheMinutes

      public void setCacheMinutes(Integer cacheMinutes)
    • getShowForLoggedUser

      public String getShowForLoggedUser()
    • setShowForLoggedUser

      public void setShowForLoggedUser(String showForLoggedUser)
    • getAppHideFields

      public String getAppHideFields()
    • setAppHideFields

      public void setAppHideFields(String appHideFields)
    • getWrapperClass

      public String getWrapperClass()
    • setWrapperClass

      public void setWrapperClass(String wrapperClass)
    • getWrapperId

      public String getWrapperId()
    • setWrapperId

      public void setWrapperId(String wrapperId)
    • getWrapperTitle

      public String getWrapperTitle()
    • setWrapperTitle

      public void setWrapperTitle(String wrapperTitle)
    • getWrapperAriaLabel

      public String getWrapperAriaLabel()
    • setWrapperAriaLabel

      public void setWrapperAriaLabel(String wrapperAriaLabel)