org.hippoecm.hst.content.beans.standard
Class HippoFolder
java.lang.Object
org.hippoecm.hst.content.beans.standard.HippoItem
org.hippoecm.hst.content.beans.standard.HippoFolder
- All Implemented Interfaces:
- Comparable<HippoBean>, ObjectConverterAware, NodeAware, HippoBean, HippoFolderBean, HippoTranslated
- Direct Known Subclasses:
- HippoDirectory, HippoFacetNavigation, HippoFacetResult, HippoFacetSearch, HippoFixedDirectory, HippoMirror
@Node(jcrType="hippostd:folder")
public class HippoFolder
- extends HippoItem
- implements HippoFolderBean
Methods inherited from class org.hippoecm.hst.content.beans.standard.HippoItem |
attach, compareTo, detach, equalCompare, equals, getAvailableTranslationsBean, getBean, getBean, getCanonicalPath, getCanonicalUUID, getChildBeans, getChildBeans, getChildBeansByName, getChildBeansByName, getContextualBean, getContextualParentBean, getEqualComparator, getLinkedBean, getLinkedBeans, getLocalizedName, getName, getNode, getObjectConverter, getParentBean, getPath, getProperties, getProperty, getProperty, getProperty, getValueProvider, hashCode, isAncestor, isDescendant, isHippoDocumentBean, isHippoFolderBean, isLeaf, isSelf, setNode, setObjectConverter |
Methods inherited from interface org.hippoecm.hst.content.beans.standard.HippoBean |
equalCompare, getAvailableTranslationsBean, getBean, getBean, getCanonicalPath, getCanonicalUUID, getChildBeans, getChildBeans, getChildBeansByName, getChildBeansByName, getContextualBean, getContextualParentBean, getEqualComparator, getLinkedBean, getLinkedBeans, getLocalizedName, getName, getNode, getParentBean, getPath, getProperties, getProperty, getProperty, getProperty, getValueProvider, isAncestor, isDescendant, isHippoDocumentBean, isHippoFolderBean, isLeaf, isSelf |
Methods inherited from interface org.hippoecm.hst.content.beans.NodeAware |
setNode |
hippoFolders
protected ArrayList<HippoFolderBean> hippoFolders
hippoDocuments
protected ArrayList<HippoDocumentBean> hippoDocuments
HippoFolder
public HippoFolder()
getLocaleString
public String getLocaleString()
- Description copied from interface:
HippoTranslated
- Return string expression of the locale for content bean. If there is no locale found,
null
is returned
- Specified by:
getLocaleString
in interface HippoTranslated
- Returns:
- the string expression of the locale for content bean and
null
when missing
getLocale
public Locale getLocale()
- Description copied from interface:
HippoTranslated
- Returns the
Locale
for content bean. If there is no Locale
found, null
is returned
- Specified by:
getLocale
in interface HippoTranslated
- Returns:
- the
Locale
for content bean and null
when missing
getFolders
public List<HippoFolderBean> getFolders()
- Specified by:
getFolders
in interface HippoFolderBean
- Returns:
- the list of
HippoFolderBean
below this HippoFolderBean
and an empty list of no folders present
getFolders
public List<HippoFolderBean> getFolders(boolean sorted)
- Specified by:
getFolders
in interface HippoFolderBean
- Parameters:
sorted
- if true, the list of folder will be returned sorted by their default HippoBean#compareTo(HippoBean)
- Returns:
- the sorted list of
HippoFolderBean
below this HippoFolderBean
and an empty list if no folders present
getDocumentSize
public int getDocumentSize()
- Specified by:
getDocumentSize
in interface HippoFolderBean
- Returns:
- the number of documents in this folder
getDocuments
public List<HippoDocumentBean> getDocuments()
- Description copied from interface:
HippoFolderBean
- This method returns the
List
of HippoDocumentBean
s in the order they are in the repository. If you need the List
to be sorted according
the HippoDocumentBean#compareTo(HippoBean)
, use #getDocuments(boolean))
with arg true
note when only a subset of the documents is needed, and the total number is large, better use HippoFolderBean.getDocumentIterator(Class)
as this is a lazy proxied iterator
- Specified by:
getDocuments
in interface HippoFolderBean
- Returns:
- the list of
HippoDocumentBean
s below this HippoFolderBean
and an empty list if no documents present
getDocuments
public List<HippoDocumentBean> getDocuments(int from,
int to)
- Description copied from interface:
HippoFolderBean
- Returns a view of the portion of the list of HippoDocumentBean between the specified
from
, inclusive, and to, 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 HippoFolderBean.getDocumentIterator(Class)
as this is a lazy proxied iterator
- Specified by:
getDocuments
in interface HippoFolderBean
- Parameters:
from
- (inclusive)to
- (exclusive)
- Returns:
- the sublist of
HippoDocumentBean
below this HippoFolderBean
and an empty list when original list is empty or invalid range
getDocuments
public List<HippoDocumentBean> getDocuments(int from,
int to,
boolean sorted)
- Description copied from interface:
HippoFolderBean
- Returns a view of the portion of the list of HippoDocumentBean between the specified
from
, inclusive, and to, 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 HippoFolderBean.getDocumentIterator(Class)
as this is a lazy proxied iterator
- Specified by:
getDocuments
in interface HippoFolderBean
- 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 this HippoFolderBean
and an empty list when original list is empty or invalid range
getDocuments
public <T> List<T> getDocuments(Class<T> beanMappingClass)
- Description copied from interface:
HippoFolderBean
- 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 use
HippoFolderBean.getDocumentIterator(Class)
as this is a lazy proxied iterator
- Specified by:
getDocuments
in interface HippoFolderBean
- Type Parameters:
T
- Any Object that implements a HippoDocumentBean- Parameters:
beanMappingClass
- a class implementing HippoDocumentBean
. This functions as a filter
- Returns:
- the list documents in this folder of type
getDocuments
public List<HippoDocumentBean> getDocuments(boolean sorted)
- Description copied from interface:
HippoFolderBean
- This method enables to get the
List
of HippoDocumentBean
s according their HippoBean#compareTo(HippoBean)
. If you need the List
to be ordered the way the documents are ordered in the repository, use HippoFolderBean.getDocuments()
.
note when only a subset of unsorted documents is needed, and the total number is large, better use HippoFolderBean.getDocumentIterator(Class)
as this is a lazy proxied iterator
- Specified by:
getDocuments
in interface HippoFolderBean
- Parameters:
sorted
- indicates whether the List should be sorted
- Returns:
- if
sorted
is true, the sorted list of HippoDocumentBean
s below this HippoFolderBean
, where the sorting is according HippoBean#compareTo(HippoBean)
, If sorted
is false, the same list as HippoFolderBean.getDocuments()
is returned. An empty list is returned if no documents are present.
getDocumentIterator
public <T> HippoDocumentIterator<T> getDocumentIterator(Class<T> beanMappingClass)
- Description copied from interface:
HippoFolderBean
- Lazy loading iterator that fetches Documents only when asked for it. This is much more efficient then all the
HippoFolderBean.getDocuments()
methods (also with arguments) as they fetch all HippoDocumentBeans directly.
- Specified by:
getDocumentIterator
in interface HippoFolderBean
- Type Parameters:
T
- Any Object that implements a HippoDocumentBean- Parameters:
beanMappingClass
- a class implementing HippoDocumentBean
. This functions as a filter
- Returns:
- A lazy loading iterator returning documents in this folder of type
Copyright © 2008-2012 Hippo. All Rights Reserved.