Class A_CmsTreeTabDataPreloader<T extends I_CmsGalleryTreeEntry<T>>

java.lang.Object
org.opencms.ade.galleries.A_CmsTreeTabDataPreloader<T>
Type Parameters:
T - the type of tree entry bean produced by this class

public abstract class A_CmsTreeTabDataPreloader<T extends I_CmsGalleryTreeEntry<T>> extends Object
Abstract class which is used to generate the data for showing an already opened tree in the gallery dialog.

  • Constructor Details

  • Method Details

    • preloadData

      public T preloadData(CmsObject cms, Set<CmsResource> openResources, Set<CmsResource> selectedResources) throws CmsException
      Creates the preload data for a collection of resources which correspond to "opened" tree items.

      Parameters:
      cms - the CMS context to use
      openResources - the resources which correspond to opened tree items
      selectedResources - resources which should be part of the tree, but not opened
      Returns:
      the root tree entry bean which was created
      Throws:
      CmsException - if something goes wrong
    • createEntry

      protected abstract T createEntry(CmsObject cms, CmsResource resource) throws CmsException
      Creates a tree entry bean from a resource.

      Parameters:
      cms - the current CMS context
      resource - the resource for which to create the tree entry bean
      Returns:
      the created tree entry bean
      Throws:
      CmsException - if something goes wrong
    • findRoot

      protected void findRoot(Collection<CmsResource> resources) throws CmsException
      Finds the common root folder for a collection of resources.

      Parameters:
      resources - the collection of resources
      Throws:
      CmsException - if something goes wrong
    • getChildren

      protected List<CmsResource> getChildren(CmsResource resource) throws CmsException
      Gets the children of a resource.

      Parameters:
      resource - the resource for which the children should be read
      Returns:
      the children of the resource
      Throws:
      CmsException - if something goes wrong
    • getCommonSite

      protected String getCommonSite(Collection<CmsResource> resourceSet)
      Gets the common site root of a set of resources.

      Parameters:
      resourceSet - the resources
      Returns:
      the common site root (may also be the shared folder or root folder)