Interface DataStorage

All Known Subinterfaces:
LayoutService

@Deprecated(forRemoval=true, since="6.5") public interface DataStorage
Deprecated, for removal: This API element is subject to removal in a future version.
use LayoutService since this is service layout and this interface name is ambiguous with storage layer
Created by The eXo Platform SAS Apr 19, 2007 This interface is used to load the PortalConfig, Page config and Navigation config from the database
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final int
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    static final String
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    static final String
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    static final String
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    static final String
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    static final String
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    static final String
    Deprecated, for removal: This API element is subject to removal in a future version.
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    create(Page page)
    Deprecated, for removal: This API element is subject to removal in a future version.
    This method should create or update the given page object
    Then broasdcast PAGE_CREATED event
    void
    Deprecated, for removal: This API element is subject to removal in a future version.
    Create a PortalConfig in database
    Then broadcast PORTAL_CONFIG_CREATED event
    <T> org.exoplatform.commons.utils.LazyPageList<T>
    find(Query<T> q, Comparator<T> sortComparator)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Return LazyPageList of object (sorted) which type and other info determined in Query object
    <T> org.exoplatform.commons.utils.ListAccess<T>
    find2(Query<T> q, Comparator<T> sortComparator)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Return ListAccess, we can retrieved array of object (sorted) in database through this.
    default List<String>
    Deprecated, for removal: This API element is subject to removal in a future version.
    since 6.4.0, use getSiteNames(SiteType, int, int) instead
    default List<String>
    Deprecated, for removal: This API element is subject to removal in a future version.
    since 6.4.0, use getSiteNames(SiteType, int, int) instead
    <S> Application<S>
    getApplicationModel(String applicationStorageId)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Retrieved Application model switch its storage identifier
    <S> String
    Deprecated, for removal: This API element is subject to removal in a future version.
    Return contentId according to each state (transient, persistent, clone)
    default Status
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    getPage(String pageId)
    Deprecated, for removal: This API element is subject to removal in a future version.
    This method should load the Page object from the database according to the pageId
    getPage(PageKey pageKey)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Retrieves Page designated by its key
    getPortalConfig(String portalName)
    Deprecated, for removal: This API element is subject to removal in a future version.
    This method should load the PortalConfig object from db according to the portalName
    getPortalConfig(String ownerType, String portalName)
    Deprecated, for removal: This API element is subject to removal in a future version.
    This method should load the PortalConfig object from db according to the portalName and ownerType
    Deprecated, for removal: This API element is subject to removal in a future version.
    Retrieves PortalConfig of designated SiteKey
    Deprecated, for removal: This API element is subject to removal in a future version.
    Return shared layout containing common layout of all sites (user, group and sites).
    getSiteNames(SiteType siteType, int offset, int limit)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Retrieves all site type names with pagination.
    <S> S
    Deprecated, for removal: This API element is subject to removal in a future version.
    Return content state.
    void
    remove(Page page)
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    void
    Deprecated, for removal: This API element is subject to removal in a future version.
    Remove the PortalConfig from the database
    Then broadcast PORTAL_CONFIG_REMOVED event
    void
    remove(PageKey pageKey)
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    save(ApplicationState<S> state, S preferences)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Save content state
    save(Page page)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Saves a page.
    void
    Deprecated, for removal: This API element is subject to removal in a future version.
    This method should update the PortalConfig object
    Then broadcast PORTAL_CONFIG_UPDATED event
    default void
    Deprecated, for removal: This API element is subject to removal in a future version.
     
  • Field Details

    • DEFAULT_LIMIT

      static final int DEFAULT_LIMIT
      Deprecated, for removal: This API element is subject to removal in a future version.
      See Also:
    • PAGE_CREATED

      static final String PAGE_CREATED
      Deprecated, for removal: This API element is subject to removal in a future version.
    • PAGE_REMOVED

      static final String PAGE_REMOVED
      Deprecated, for removal: This API element is subject to removal in a future version.
    • PAGE_UPDATED

      static final String PAGE_UPDATED
      Deprecated, for removal: This API element is subject to removal in a future version.
    • PORTAL_CONFIG_CREATED

      static final String PORTAL_CONFIG_CREATED
      Deprecated, for removal: This API element is subject to removal in a future version.
    • PORTAL_CONFIG_REMOVED

      static final String PORTAL_CONFIG_REMOVED
      Deprecated, for removal: This API element is subject to removal in a future version.
    • PORTAL_CONFIG_UPDATED

      static final String PORTAL_CONFIG_UPDATED
      Deprecated, for removal: This API element is subject to removal in a future version.
  • Method Details

    • create

      void create(PortalConfig config)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Create a PortalConfig in database
      Then broadcast PORTAL_CONFIG_CREATED event
      Parameters:
      config - PortalConfig
    • save

      void save(PortalConfig config)
      Deprecated, for removal: This API element is subject to removal in a future version.
      This method should update the PortalConfig object
      Then broadcast PORTAL_CONFIG_UPDATED event
      Parameters:
      config - PortalConfig
    • getPortalConfig

      PortalConfig getPortalConfig(String portalName)
      Deprecated, for removal: This API element is subject to removal in a future version.
      This method should load the PortalConfig object from db according to the portalName
      Parameters:
      portalName -
      Returns:
      PortalConfig
    • getPortalConfig

      PortalConfig getPortalConfig(String ownerType, String portalName)
      Deprecated, for removal: This API element is subject to removal in a future version.
      This method should load the PortalConfig object from db according to the portalName and ownerType
      Parameters:
      ownerType -
      portalName -
      Returns:
      PortalConfig
    • getPortalConfig

      PortalConfig getPortalConfig(SiteKey siteKey)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Retrieves PortalConfig of designated SiteKey
      Parameters:
      siteKey - SiteKey
      Returns:
      null if not found, else PortalConfig
    • remove

      void remove(PortalConfig config)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Remove the PortalConfig from the database
      Then broadcast PORTAL_CONFIG_REMOVED event
      Parameters:
      config - PortalConfig
    • getPage

      Page getPage(String pageId)
      Deprecated, for removal: This API element is subject to removal in a future version.
      This method should load the Page object from the database according to the pageId
      Parameters:
      pageId - - String represent id of page, it must be valid pageId (3 parts saparate by :: )
      Returns:
      Page
    • getPage

      Page getPage(PageKey pageKey)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Retrieves Page designated by its key
      Parameters:
      pageKey - PageKey
      Returns:
      Page
    • remove

      void remove(Page page)
      Deprecated, for removal: This API element is subject to removal in a future version.
    • remove

      void remove(PageKey pageKey)
      Deprecated, for removal: This API element is subject to removal in a future version.
    • create

      void create(Page page)
      Deprecated, for removal: This API element is subject to removal in a future version.
      This method should create or update the given page object
      Then broasdcast PAGE_CREATED event
      Parameters:
      page -
    • save

      List<ModelChange> save(Page page)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Saves a page. If a page with the same id already exists then a merge operation will occur, otherwise it throws IllegalStateException
      The operation returns a list of the change object that describes the changes that occured during the save operation.
      Then broadcast PAGE_UPDATED event
      Parameters:
      page - the page to save
      Returns:
      the list of model changes that occurred during the save
    • getApplicationModel

      <S> Application<S> getApplicationModel(String applicationStorageId)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Retrieved Application model switch its storage identifier
      Type Parameters:
      S - can be of type Portlet only, see ApplicationType
      Parameters:
      applicationStorageId -
      Returns:
      Application
    • getId

      <S> String getId(ApplicationState<S> state)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Return contentId according to each state (transient, persistent, clone)
      Type Parameters:
      S - can be of type Portlet only, see ApplicationType
      Parameters:
      state -
      Returns:
      ApplicationState of type Portlet
    • load

      <S> S load(ApplicationState<S> state, ApplicationType<S> type)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Return content state. If can't find, return null
      Type Parameters:
      S - can be of type Portlet only, see ApplicationType
      Parameters:
      state - - ApplicationState object
      type - - ApplicationType object
      Returns:
      Portlet
    • save

      <S> ApplicationState<S> save(ApplicationState<S> state, S preferences)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Save content state
      Type Parameters:
      S - can be of type Portlet only, see ApplicationType
      Parameters:
      state - - ApplicationState object. It must be CloneApplicationState or PersistentApplicationState object
      preferences - - object to be saved
      Returns:
      ApplicationState typed with Portlet
    • find

      <T> org.exoplatform.commons.utils.LazyPageList<T> find(Query<T> q, Comparator<T> sortComparator)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Return LazyPageList of object (sorted) which type and other info determined in Query object
      Type Parameters:
      T - could be of type Page or PortalConfig
      Parameters:
      q - - Query object
      sortComparator - Comparator used for sorting results
      Returns:
      LazyPageList
    • find2

      <T> org.exoplatform.commons.utils.ListAccess<T> find2(Query<T> q, Comparator<T> sortComparator)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Return ListAccess, we can retrieved array of object (sorted) in database through this.
      Type Parameters:
      T - could be of type Page or PortalConfig
      Parameters:
      q - - Query object
      sortComparator - - Comparator object, used to sort the result list
      Returns:
      LazyPageList
    • getSharedLayout

      Container getSharedLayout(String siteName)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Return shared layout containing common layout of all sites (user, group and sites). This will retrieve the layout from /conf/portal/portal/sharedlayout-{siteName}.xml else if not found, retrieve it from /conf/portal/portal/sharedlayout.xml
      Parameters:
      siteName -
      Returns:
      Container
    • getAllPortalNames

      @Deprecated(forRemoval=true, since="6.5") default List<String> getAllPortalNames()
      Deprecated, for removal: This API element is subject to removal in a future version.
      since 6.4.0, use getSiteNames(SiteType, int, int) instead
      Returns:
      All portal site names
    • getAllGroupNames

      @Deprecated(forRemoval=true, since="6.5") default List<String> getAllGroupNames()
      Deprecated, for removal: This API element is subject to removal in a future version.
      since 6.4.0, use getSiteNames(SiteType, int, int) instead
      Returns:
      All group site names
    • getSiteNames

      List<String> getSiteNames(SiteType siteType, int offset, int limit)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Retrieves all site type names with pagination.
      Parameters:
      siteType - SiteType
      offset - offset of the query
      limit - limit of the list to fetch
      Returns:
      List of corresponding site names, else empty list if not found
    • getImportStatus

      default Status getImportStatus()
      Deprecated, for removal: This API element is subject to removal in a future version.
    • saveImportStatus

      default void saveImportStatus(Status status)
      Deprecated, for removal: This API element is subject to removal in a future version.