Class LayoutServiceImpl

java.lang.Object
org.exoplatform.portal.mop.service.LayoutServiceImpl
All Implemented Interfaces:
org.exoplatform.portal.config.DataStorage, org.exoplatform.portal.mop.service.LayoutService

public class LayoutServiceImpl extends Object implements org.exoplatform.portal.mop.service.LayoutService
  • Field Summary

    Fields inherited from interface org.exoplatform.portal.config.DataStorage

    DEFAULT_LIMIT

    Fields inherited from interface org.exoplatform.portal.mop.service.LayoutService

    PAGE_CREATED, PAGE_REMOVED, PAGE_UPDATED, PORTAL_CONFIG_CREATED, PORTAL_CONFIG_REMOVED, PORTAL_CONFIG_UPDATED
  • Constructor Summary

    Constructors
    Constructor
    Description
    LayoutServiceImpl(org.exoplatform.services.listener.ListenerService listenerService, org.exoplatform.portal.mop.storage.SiteStorage siteStorage, org.exoplatform.portal.mop.storage.PageStorage pageStorage, LayoutStorage layoutStorage, org.exoplatform.commons.file.services.FileService fileService, org.exoplatform.container.PortalContainer portalContainer, org.exoplatform.container.xml.InitParams initParams)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    protected void
    broadcastEvent(String eventName, Object data)
     
    void
    create(org.exoplatform.portal.config.model.Page page)
     
    void
    create(org.exoplatform.portal.config.model.PortalConfig config)
     
    <T> org.exoplatform.commons.utils.LazyPageList<T>
    find(org.exoplatform.portal.config.Query<T> q, Comparator<T> sortComparator)
     
    <T> org.exoplatform.commons.utils.ListAccess<T>
    find2(org.exoplatform.portal.config.Query<T> q, Comparator<T> sortComparator)
     
    <T> org.exoplatform.commons.utils.LazyPageList<T>
    findLazyPageList(org.exoplatform.portal.config.Query<T> q)
     
    org.exoplatform.portal.mop.QueryResult<org.exoplatform.portal.mop.page.PageContext>
    findPages(int offset, int limit, org.exoplatform.portal.mop.SiteType siteKey, String siteName, String pageName, String pageTitle)
     
    List<org.exoplatform.portal.mop.page.PageContext>
    findPages(org.exoplatform.portal.mop.SiteKey siteKey)
     
    <S> org.exoplatform.portal.config.model.Application<S>
    getApplicationModel(String applicationStorageId)
     
     
    <S> String
    getId(org.exoplatform.portal.config.model.ApplicationState<S> state)
     
    org.exoplatform.portal.mop.importer.Status
     
    org.exoplatform.portal.config.model.Page
    getPage(long id)
     
    org.exoplatform.portal.config.model.Page
    getPage(String pageId)
     
    org.exoplatform.portal.config.model.Page
    getPage(org.exoplatform.portal.mop.page.PageKey pageKey)
     
    org.exoplatform.portal.mop.page.PageContext
    getPageContext(org.exoplatform.portal.mop.page.PageKey pageKey)
     
    org.exoplatform.portal.config.model.PortalConfig
    getPortalConfig(long siteId)
     
    org.exoplatform.portal.config.model.PortalConfig
    getPortalConfig(String portalName)
     
    org.exoplatform.portal.config.model.PortalConfig
    getPortalConfig(String ownerType, String portalName)
     
    org.exoplatform.portal.config.model.PortalConfig
    getPortalConfig(org.exoplatform.portal.mop.SiteKey siteKey)
     
    org.exoplatform.portal.config.model.Container
     
     
    getSiteNames(org.exoplatform.portal.mop.SiteType siteType, int offset, int limit)
     
    List<org.exoplatform.portal.config.model.PortalConfig>
    getSites(org.exoplatform.portal.mop.SiteFilter filter)
     
    <S> S
    load(org.exoplatform.portal.config.model.ApplicationState<S> state, org.exoplatform.portal.config.model.ApplicationType<S> type)
     
    void
    remove(org.exoplatform.portal.config.model.Page page)
     
    void
    remove(org.exoplatform.portal.config.model.PortalConfig config)
     
    void
    remove(org.exoplatform.portal.mop.page.PageKey pageKey)
     
    void
    removePages(org.exoplatform.portal.mop.SiteKey siteKey)
     
    void
     
    <S> org.exoplatform.portal.config.model.ApplicationState<S>
    save(org.exoplatform.portal.config.model.ApplicationState<S> state, S preferences)
     
    List<org.exoplatform.portal.pom.data.ModelChange>
    save(org.exoplatform.portal.config.model.Page page)
     
    void
    save(org.exoplatform.portal.config.model.PortalConfig config)
     
    void
    save(org.exoplatform.portal.mop.page.PageContext pageContext)
     
    void
    save(org.exoplatform.portal.mop.page.PageContext pageContext, org.exoplatform.portal.config.model.Page page)
     
    void
    saveImportStatus(org.exoplatform.portal.mop.importer.Status status)
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface org.exoplatform.portal.config.DataStorage

    getAllGroupNames, getAllPortalNames
  • Constructor Details

    • LayoutServiceImpl

      public LayoutServiceImpl(org.exoplatform.services.listener.ListenerService listenerService, org.exoplatform.portal.mop.storage.SiteStorage siteStorage, org.exoplatform.portal.mop.storage.PageStorage pageStorage, LayoutStorage layoutStorage, org.exoplatform.commons.file.services.FileService fileService, org.exoplatform.container.PortalContainer portalContainer, org.exoplatform.container.xml.InitParams initParams)
  • Method Details

    • create

      public void create(org.exoplatform.portal.config.model.PortalConfig config)
      Specified by:
      create in interface org.exoplatform.portal.config.DataStorage
      Specified by:
      create in interface org.exoplatform.portal.mop.service.LayoutService
    • save

      public void save(org.exoplatform.portal.config.model.PortalConfig config)
      Specified by:
      save in interface org.exoplatform.portal.config.DataStorage
      Specified by:
      save in interface org.exoplatform.portal.mop.service.LayoutService
    • remove

      public void remove(org.exoplatform.portal.config.model.PortalConfig config)
      Specified by:
      remove in interface org.exoplatform.portal.config.DataStorage
      Specified by:
      remove in interface org.exoplatform.portal.mop.service.LayoutService
    • getPortalConfig

      public org.exoplatform.portal.config.model.PortalConfig getPortalConfig(String portalName)
      Specified by:
      getPortalConfig in interface org.exoplatform.portal.config.DataStorage
      Specified by:
      getPortalConfig in interface org.exoplatform.portal.mop.service.LayoutService
    • getPortalConfig

      public org.exoplatform.portal.config.model.PortalConfig getPortalConfig(org.exoplatform.portal.mop.SiteKey siteKey)
      Specified by:
      getPortalConfig in interface org.exoplatform.portal.config.DataStorage
      Specified by:
      getPortalConfig in interface org.exoplatform.portal.mop.service.LayoutService
    • getPortalConfig

      public org.exoplatform.portal.config.model.PortalConfig getPortalConfig(long siteId)
      Specified by:
      getPortalConfig in interface org.exoplatform.portal.mop.service.LayoutService
    • getPortalConfig

      public org.exoplatform.portal.config.model.PortalConfig getPortalConfig(String ownerType, String portalName)
      Specified by:
      getPortalConfig in interface org.exoplatform.portal.config.DataStorage
      Specified by:
      getPortalConfig in interface org.exoplatform.portal.mop.service.LayoutService
    • getSiteNames

      public List<String> getSiteNames(org.exoplatform.portal.mop.SiteType siteType, int offset, int limit)
      Specified by:
      getSiteNames in interface org.exoplatform.portal.config.DataStorage
      Specified by:
      getSiteNames in interface org.exoplatform.portal.mop.service.LayoutService
    • create

      public void create(org.exoplatform.portal.config.model.Page page)
      Specified by:
      create in interface org.exoplatform.portal.config.DataStorage
      Specified by:
      create in interface org.exoplatform.portal.mop.service.LayoutService
    • save

      public List<org.exoplatform.portal.pom.data.ModelChange> save(org.exoplatform.portal.config.model.Page page)
      Specified by:
      save in interface org.exoplatform.portal.config.DataStorage
      Specified by:
      save in interface org.exoplatform.portal.mop.service.LayoutService
    • save

      public void save(org.exoplatform.portal.mop.page.PageContext pageContext, org.exoplatform.portal.config.model.Page page)
      Specified by:
      save in interface org.exoplatform.portal.mop.service.LayoutService
    • save

      public void save(org.exoplatform.portal.mop.page.PageContext pageContext)
      Specified by:
      save in interface org.exoplatform.portal.mop.service.LayoutService
    • removePages

      public void removePages(org.exoplatform.portal.mop.SiteKey siteKey)
      Specified by:
      removePages in interface org.exoplatform.portal.mop.service.LayoutService
    • remove

      public void remove(org.exoplatform.portal.mop.page.PageKey pageKey)
      Specified by:
      remove in interface org.exoplatform.portal.config.DataStorage
      Specified by:
      remove in interface org.exoplatform.portal.mop.service.LayoutService
    • remove

      public void remove(org.exoplatform.portal.config.model.Page page)
      Specified by:
      remove in interface org.exoplatform.portal.config.DataStorage
      Specified by:
      remove in interface org.exoplatform.portal.mop.service.LayoutService
    • getPage

      public org.exoplatform.portal.config.model.Page getPage(String pageId)
      Specified by:
      getPage in interface org.exoplatform.portal.config.DataStorage
      Specified by:
      getPage in interface org.exoplatform.portal.mop.service.LayoutService
    • getPage

      public org.exoplatform.portal.config.model.Page getPage(long id)
      Specified by:
      getPage in interface org.exoplatform.portal.mop.service.LayoutService
    • getPage

      public org.exoplatform.portal.config.model.Page getPage(org.exoplatform.portal.mop.page.PageKey pageKey)
      Specified by:
      getPage in interface org.exoplatform.portal.config.DataStorage
      Specified by:
      getPage in interface org.exoplatform.portal.mop.service.LayoutService
    • getPageContext

      public org.exoplatform.portal.mop.page.PageContext getPageContext(org.exoplatform.portal.mop.page.PageKey pageKey)
      Specified by:
      getPageContext in interface org.exoplatform.portal.mop.service.LayoutService
    • findPages

      public List<org.exoplatform.portal.mop.page.PageContext> findPages(org.exoplatform.portal.mop.SiteKey siteKey)
      Specified by:
      findPages in interface org.exoplatform.portal.mop.service.LayoutService
    • findPages

      public org.exoplatform.portal.mop.QueryResult<org.exoplatform.portal.mop.page.PageContext> findPages(int offset, int limit, org.exoplatform.portal.mop.SiteType siteKey, String siteName, String pageName, String pageTitle)
      Specified by:
      findPages in interface org.exoplatform.portal.mop.service.LayoutService
    • load

      public <S> S load(org.exoplatform.portal.config.model.ApplicationState<S> state, org.exoplatform.portal.config.model.ApplicationType<S> type)
      Specified by:
      load in interface org.exoplatform.portal.config.DataStorage
      Specified by:
      load in interface org.exoplatform.portal.mop.service.LayoutService
    • save

      public <S> org.exoplatform.portal.config.model.ApplicationState<S> save(org.exoplatform.portal.config.model.ApplicationState<S> state, S preferences)
      Specified by:
      save in interface org.exoplatform.portal.config.DataStorage
      Specified by:
      save in interface org.exoplatform.portal.mop.service.LayoutService
    • getId

      public <S> String getId(org.exoplatform.portal.config.model.ApplicationState<S> state)
      Specified by:
      getId in interface org.exoplatform.portal.config.DataStorage
      Specified by:
      getId in interface org.exoplatform.portal.mop.service.LayoutService
    • getApplicationModel

      public <S> org.exoplatform.portal.config.model.Application<S> getApplicationModel(String applicationStorageId)
      Specified by:
      getApplicationModel in interface org.exoplatform.portal.config.DataStorage
      Specified by:
      getApplicationModel in interface org.exoplatform.portal.mop.service.LayoutService
    • getSharedLayout

      public org.exoplatform.portal.config.model.Container getSharedLayout(String siteName)
      Specified by:
      getSharedLayout in interface org.exoplatform.portal.config.DataStorage
      Specified by:
      getSharedLayout in interface org.exoplatform.portal.mop.service.LayoutService
    • getImportStatus

      public org.exoplatform.portal.mop.importer.Status getImportStatus()
      Specified by:
      getImportStatus in interface org.exoplatform.portal.config.DataStorage
      Specified by:
      getImportStatus in interface org.exoplatform.portal.mop.service.LayoutService
    • saveImportStatus

      public void saveImportStatus(org.exoplatform.portal.mop.importer.Status status)
      Specified by:
      saveImportStatus in interface org.exoplatform.portal.config.DataStorage
      Specified by:
      saveImportStatus in interface org.exoplatform.portal.mop.service.LayoutService
    • find

      public <T> org.exoplatform.commons.utils.LazyPageList<T> find(org.exoplatform.portal.config.Query<T> q, Comparator<T> sortComparator)
      Specified by:
      find in interface org.exoplatform.portal.config.DataStorage
      Specified by:
      find in interface org.exoplatform.portal.mop.service.LayoutService
    • find2

      public <T> org.exoplatform.commons.utils.ListAccess<T> find2(org.exoplatform.portal.config.Query<T> q, Comparator<T> sortComparator)
      Specified by:
      find2 in interface org.exoplatform.portal.config.DataStorage
      Specified by:
      find2 in interface org.exoplatform.portal.mop.service.LayoutService
    • findLazyPageList

      public <T> org.exoplatform.commons.utils.LazyPageList<T> findLazyPageList(org.exoplatform.portal.config.Query<T> q)
    • getSites

      public List<org.exoplatform.portal.config.model.PortalConfig> getSites(org.exoplatform.portal.mop.SiteFilter filter)
      Specified by:
      getSites in interface org.exoplatform.portal.mop.service.LayoutService
    • getSiteBannerStream

      public InputStream getSiteBannerStream(String siteName) throws org.exoplatform.commons.exception.ObjectNotFoundException
      Specified by:
      getSiteBannerStream in interface org.exoplatform.portal.mop.service.LayoutService
      Throws:
      org.exoplatform.commons.exception.ObjectNotFoundException
    • getDefaultSiteBannerStream

      public InputStream getDefaultSiteBannerStream(String siteName)
      Specified by:
      getDefaultSiteBannerStream in interface org.exoplatform.portal.mop.service.LayoutService
    • removeSiteBanner

      public void removeSiteBanner(String siteName) throws org.exoplatform.commons.exception.ObjectNotFoundException
      Specified by:
      removeSiteBanner in interface org.exoplatform.portal.mop.service.LayoutService
      Throws:
      org.exoplatform.commons.exception.ObjectNotFoundException
    • broadcastEvent

      protected void broadcastEvent(String eventName, Object data)