Package org.opencms.ade.galleries
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 java.lang.Object
Abstract class which is used to generate the data for showing an already opened tree in the gallery dialog.
-
-
Constructor Summary
Constructors Constructor Description A_CmsTreeTabDataPreloader()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected abstract T
createEntry(CmsObject cms, CmsResource resource)
Creates a tree entry bean from a resource.protected void
findRoot(java.util.Collection<CmsResource> resources)
Finds the common root folder for a collection of resources.protected java.util.List<CmsResource>
getChildren(CmsResource resource)
Gets the children of a resource.protected java.lang.String
getCommonSite(java.util.Collection<CmsResource> resourceSet)
Gets the common site root of a set of resources.T
preloadData(CmsObject cms, java.util.Set<CmsResource> openResources, java.util.Set<CmsResource> selectedResources)
Creates the preload data for a collection of resources which correspond to "opened" tree items.
-
-
-
Constructor Detail
-
A_CmsTreeTabDataPreloader
public A_CmsTreeTabDataPreloader()
-
-
Method Detail
-
preloadData
public T preloadData(CmsObject cms, java.util.Set<CmsResource> openResources, java.util.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 useopenResources
- the resources which correspond to opened tree itemsselectedResources
- 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 contextresource
- 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(java.util.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 java.util.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 java.lang.String getCommonSite(java.util.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)
-
-