Class HtmlPageService

java.lang.Object
fr.paris.lutece.plugins.htmlpage.service.HtmlPageService
All Implemented Interfaces:
IHtmlPageService

@ApplicationScoped public class HtmlPageService extends Object implements IHtmlPageService
HtmlPageService
  • Constructor Details

    • HtmlPageService

      public HtmlPageService()
  • Method Details

    • init

      public void init()
      Initializes the Housing service
    • getHtmlPageCache

      public HtmlPage getHtmlPageCache(int nId)
      Description copied from interface: IHtmlPageService
      Get enabled html page by id from the cache if possible, from database otherwise
      Specified by:
      getHtmlPageCache in interface IHtmlPageService
      Returns:
      htmlPage
    • getHtmlPageListCache

      public List<HtmlPage> getHtmlPageListCache()
      Description copied from interface: IHtmlPageService
      Get all enabled html pages from cache if possible, from database otherwise
      Specified by:
      getHtmlPageListCache in interface IHtmlPageService
      Returns:
      list of htmlpage
    • getEnableHtmlPage

      public HtmlPage getEnableHtmlPage(int nId)
      Description copied from interface: IHtmlPageService
      Get enabled html page by id from database
      Specified by:
      getEnableHtmlPage in interface IHtmlPageService
      Returns:
      htmlPage
    • getEnabledHtmlPageList

      public List<HtmlPage> getEnabledHtmlPageList()
      Description copied from interface: IHtmlPageService
      Get all enabled html pages from database
      Specified by:
      getEnabledHtmlPageList in interface IHtmlPageService
      Returns:
      list of htmlpage
    • create

      public HtmlPage create(HtmlPage htmlpage, fr.paris.lutece.portal.service.plugin.Plugin plugin)
      Creation of an instance of htmlpage
      Specified by:
      create in interface IHtmlPageService
      Parameters:
      htmlpage - The instance of the htmlpage which contains the informations to store
      plugin - The Plugin object
      Returns:
      The instance of htmlpage which has been created with its primary key.
    • update

      public HtmlPage update(HtmlPage htmlpage, fr.paris.lutece.portal.service.plugin.Plugin plugin)
      Update of the htmlpage which is specified in parameter
      Specified by:
      update in interface IHtmlPageService
      Parameters:
      htmlpage - The instance of the htmlpage which contains the data to store
      plugin - The Plugin object
      Returns:
      The instance of the htmlpage which has been updated
    • remove

      public void remove(HtmlPage htmlpage, fr.paris.lutece.portal.service.plugin.Plugin plugin)
      Remove the Htmlpage whose identifier is specified in parameter
      Specified by:
      remove in interface IHtmlPageService
      Parameters:
      htmlpage - The Htmlpage object to remove
      plugin - The Plugin object
    • initializedService

      public void initializedService(@Observes @Initialized(jakarta.enterprise.context.ApplicationScoped.class) jakarta.servlet.ServletContext context)
      This method observes the initialization of the ApplicationScoped context. It ensures that this CDI beans are instantiated at the application startup.

      This method is triggered automatically by CDI when the ApplicationScoped context is initialized, which typically occurs during the startup of the application server.

      Parameters:
      context - the ServletContext that is initialized. This parameter is observed and injected automatically by CDI when the ApplicationScoped context is initialized.