Interface HippoFolderBean
- All Superinterfaces:
Comparable<HippoBean>
,ContentBean
,HippoBean
,HippoTranslated
,IdentifiableContentBean
,NodeAware
,ObjectConverterAware
,PageModelEntity
- All Known Subinterfaces:
HippoFacetChildNavigationBean
,HippoFacetNavigationBean
,HippoResultSetBean
This is a base interface for all beans that represent a folder should implement. When developers implement their own bean which
does not extend the standard HippoFolder bean, they should implement this interface.
-
Field Summary
-
Method Summary
Modifier and TypeMethodDescription<T> HippoDocumentIterator<T>
getDocumentIterator
(Class<T> beanMappingClass) Lazy loading iterator that fetches Documents only when asked for it.This method returns theList
ofHippoDocumentBean
s in the order they are in the repository.getDocuments
(boolean sorted) This method enables to get theList
ofHippoDocumentBean
s according theirComparable.compareTo(Object)
.getDocuments
(int from, int to) Returns a view of the portion of the list of HippoDocumentBean between the specifiedfrom
, inclusive, andto
, exclusive.
getDocuments
(int from, int to, boolean sorted) Returns a view of the portion of the list of HippoDocumentBean between the specifiedfrom
, inclusive, andto
, exclusive.
<T> List<T>
getDocuments
(Class<T> beanMappingClass) Facility method to get all documents directly below this folder that result in a HippoBean of class or subclass clazz.int
getFolders
(boolean sorted) Methods inherited from interface java.lang.Comparable
compareTo
Methods inherited from interface org.hippoecm.hst.content.beans.standard.HippoBean
equalCompare, getAvailableTranslations, getBean, getBean, getBeanByUUID, getCanonicalBean, getCanonicalPath, getCanonicalUUID, getChildBeans, getChildBeans, getChildBeansByName, getChildBeansByName, getComparePath, getContentType, getDisplayName, getEqualComparator, getLinkedBean, getLinkedBeans, getMultipleProperty, getMultipleProperty, getName, getNode, getParentBean, getPath, getProperties, getProperty, getSingleProperty, getSingleProperty, getValueProvider, isAncestor, isDescendant, isHippoDocumentBean, isHippoFolderBean, isLeaf, isSelf, isVersionedNode
Methods inherited from interface org.hippoecm.hst.content.beans.standard.HippoTranslated
getLocale, getLocaleString
Methods inherited from interface org.hippoecm.hst.content.beans.standard.IdentifiableContentBean
getIdentifier, getRepresentationId, setIdentifier
Methods inherited from interface org.hippoecm.hst.content.beans.manager.ObjectConverterAware
getObjectConverter, setObjectConverter
-
Method Details
-
getFolders
List<HippoFolderBean> getFolders()- Returns:
- the list of
HippoFolderBean
below thisHippoFolderBean
and an empty list of no folders present
-
getFolders
- Parameters:
sorted
- if true, the list of folder will be returned sorted by their defaultComparable.compareTo(Object)
- Returns:
- the sorted list of
HippoFolderBean
below thisHippoFolderBean
and an empty list if no folders present
-
getDocumentSize
int getDocumentSize()- Returns:
- the number of documents in this folder
-
getDocuments
List<HippoDocumentBean> getDocuments()This method returns theList
ofHippoDocumentBean
s in the order they are in the repository. If you need theList
to be sorted according theComparable.compareTo(Object)
, usegetDocuments(boolean)
with argtrue
note when only a subset of the documents is needed, and the total number is large, better usegetDocumentIterator(Class)
as this is a lazy proxied iterator- Returns:
- the list of
HippoDocumentBean
s below thisHippoFolderBean
and an empty list if no documents present
-
getDocuments
Returns a view of the portion of the list of HippoDocumentBean between the specifiedfrom
, inclusive, andto
, exclusive. (If from and to are equal, the returned list is empty.) note when only a subset of the documents is needed, and the total number is large, better use
getDocumentIterator(Class)
as this is a lazy proxied iterator- Parameters:
from
- (inclusive)to
- (exclusive)- Returns:
- the sublist of
HippoDocumentBean
below thisHippoFolderBean
and an empty list when original list is empty or invalid range
-
getDocuments
Returns a view of the portion of the list of HippoDocumentBean between the specifiedfrom
, inclusive, andto
, exclusive. (If from and to are equal, the returned list is empty.) note when only a subset of unsorted documents is needed, and the total number is large, better use
getDocumentIterator(Class)
as this is a lazy proxied iterator- Parameters:
from
- (inclusive)to
- (exclusive)sorted
- boolean whether list to get sublist from needs to be sorted- Returns:
- the sublist of possibly sorted of
HippoDocumentBean
below thisHippoFolderBean
and an empty list when original list is empty or invalid range
-
getDocuments
This method enables to get theList
ofHippoDocumentBean
s according theirComparable.compareTo(Object)
. If you need theList
to be ordered the way the documents are ordered in the repository, usegetDocuments()
. note when only a subset of unsorted documents is needed, and the total number is large, better usegetDocumentIterator(Class)
as this is a lazy proxied iterator- Parameters:
sorted
- indicates whether the List should be sorted- Returns:
- if
sorted
is true, the sorted list ofHippoDocumentBean
s below thisHippoFolderBean
, where the sorting is accordingComparable.compareTo(Object)
, Ifsorted
is false, the same list asgetDocuments()
is returned. An empty list is returned if no documents are present.
-
getDocuments
Facility method to get all documents directly below this folder that result in a HippoBean of class or subclass clazz. note when only a subset of the documents is needed, and the total number is large, better usegetDocumentIterator(Class)
as this is a lazy proxied iterator- Type Parameters:
T
- Any Object that implements a HippoDocumentBean- Parameters:
beanMappingClass
- a class implementingHippoDocumentBean
. This functions as a filter
- Returns:
- the list documents in this folder of type
-
getDocumentIterator
Lazy loading iterator that fetches Documents only when asked for it. This is much more efficient then all thegetDocuments()
methods (also with arguments) as they fetch all HippoDocumentBeans directly.- Type Parameters:
T
- Any Object that implements a HippoDocumentBean- Parameters:
beanMappingClass
- a class implementingHippoDocumentBean
. This functions as a filter
- Returns:
- A lazy loading iterator returning documents in this folder of type
-