Class WebjetComponentAbstract

java.lang.Object
sk.iway.iwcm.components.WebjetComponentAbstract
All Implemented Interfaces:
WebjetComponentInterface
Direct Known Subclasses:
BannerApp, BasketInvoicesListApp, CalendarApp, ContentBlockApp, CookieBarApp, DateApp, DayBookApp, DisqusApp, DmailApp, DocsEmbedApp, DoubleOptInComponent, FacebookCommentsApp, FacebookLikeApp, FacebookLikeBoxApp, FileArchiveApp, GalleryApp, GdprApp, HtmlEmbedApp, InquiryApp, MediaApp, MenuApp, NewsCalendarApp, QuizApp, RatingApp, RelatedPagesApp, ReservationApp, SearchApp, SendLinkApp, SiteBrowserApp, SiteMapApp, SmartsUppApp, StatApp, TimeBookApp, UnsubscribeApp, UsrLogonController, 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
    • cacheMinutes

      public Integer cacheMinutes
  • 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(javax.servlet.http.HttpServletRequest request, javax.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, javax.servlet.http.HttpServletRequest request)
      Returns list of options for app editor in webpage
      Specified by:
      getAppOptions in interface WebjetComponentInterface
    • initAppEditor

      public void initAppEditor(ComponentRequest componentRequest, javax.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)