org.hippoecm.hst.content.beans.standard.facetnavigation
Class HippoFacetNavigation

java.lang.Object
  extended by org.hippoecm.hst.content.beans.standard.HippoItem
      extended by org.hippoecm.hst.content.beans.standard.HippoFolder
          extended by org.hippoecm.hst.content.beans.standard.facetnavigation.HippoFacetNavigation
All Implemented Interfaces:
Comparable<HippoBean>, ObjectConverterAware, NodeAware, HippoBean, HippoFacetNavigationBean, HippoFolderBean, HippoTranslated
Direct Known Subclasses:
AbstractHippoFacetChildNavigation

@Node(jcrType="hippofacnav:facetnavigation")
public class HippoFacetNavigation
extends HippoFolder
implements HippoFacetNavigationBean


Nested Class Summary
 
Nested classes/interfaces inherited from class org.hippoecm.hst.content.beans.standard.HippoItem
HippoItem.ComparatorMap
 
Field Summary
 
Fields inherited from class org.hippoecm.hst.content.beans.standard.HippoFolder
hippoDocuments, hippoFolders
 
Fields inherited from class org.hippoecm.hst.content.beans.standard.HippoItem
comparePath, detached, node, objectConverter, valueProvider
 
Constructor Summary
HippoFacetNavigation()
           
 
Method Summary
 Long getChildCountsCombined()
          Return all the hippo:count values of all child HippoFacetNavigationBean combined.
 Long getCount()
          the value of the 'hippo:count' property
 List<HippoDocumentBean> getDocuments(boolean sorted)
          because there are only documents below the resultset, we can return empty list here directly
 List<HippoFolderBean> getFolders(boolean sorted)
          HippoFacetNavigation does not return the HippoResultSetBean as a folder, as this is normally a folder that is not wanted to be displayed, and can be accessed through getResultSet() already
 HippoResultSetBean getResultSet()
           
 HippoFacetNavigationBean getRootFacetNavigationBean()
           
 boolean isLeaf()
           
 
Methods inherited from class org.hippoecm.hst.content.beans.standard.HippoFolder
getDocumentIterator, getDocuments, getDocuments, getDocuments, getDocuments, getDocumentSize, getFolders, getLocale, getLocaleString
 
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, isSelf, setNode, setObjectConverter
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.hippoecm.hst.content.beans.standard.HippoFolderBean
getDocumentIterator, getDocuments, getDocuments, getDocuments, getDocuments, getDocumentSize, getFolders
 
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, isSelf
 
Methods inherited from interface org.hippoecm.hst.content.beans.NodeAware
setNode
 
Methods inherited from interface org.hippoecm.hst.content.beans.manager.ObjectConverterAware
getObjectConverter, setObjectConverter
 
Methods inherited from interface java.lang.Comparable
compareTo
 
Methods inherited from interface org.hippoecm.hst.content.beans.standard.HippoTranslated
getLocale, getLocaleString
 

Constructor Detail

HippoFacetNavigation

public HippoFacetNavigation()
Method Detail

getFolders

public List<HippoFolderBean> getFolders(boolean sorted)
HippoFacetNavigation does not return the HippoResultSetBean as a folder, as this is normally a folder that is not wanted to be displayed, and can be accessed through getResultSet() already

Specified by:
getFolders in interface HippoFolderBean
Overrides:
getFolders in class HippoFolder
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

getChildCountsCombined

public Long getChildCountsCombined()
Description copied from interface: HippoFacetNavigationBean
Return all the hippo:count values of all child HippoFacetNavigationBean combined. This count can be different from the getCount() of this HippoFacetNavigationBean because of two reasons:
  1. A document in the resultset can belong to multiple child HippoFacetNavigationBean's
  2. A document in the resultset can belong to zero child HippoFacetNavigationBean's: this happens for example when the document has a property, say 'my:date' , but its date does not belong to any of the ranges that the child HippoFacetNavigationBean represent

Specified by:
getChildCountsCombined in interface HippoFacetNavigationBean
Returns:
Return all the hippo:count values of all child HippoFacetNavigationBean combined.

getDocuments

public List<HippoDocumentBean> getDocuments(boolean sorted)
because there are only documents below the resultset, we can return empty list here directly

Specified by:
getDocuments in interface HippoFolderBean
Overrides:
getDocuments in class HippoFolder
Parameters:
sorted - indicates whether the List should be sorted
Returns:
if sorted is true, the sorted list of HippoDocumentBeans 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.

isLeaf

public boolean isLeaf()
Specified by:
isLeaf in interface HippoBean
Overrides:
isLeaf in class HippoItem
Returns:
true when the backing jcr Node has no child nodes

getCount

public Long getCount()
Description copied from interface: HippoFacetNavigationBean
the value of the 'hippo:count' property

Specified by:
getCount in interface HippoFacetNavigationBean
Returns:
Long value for the count

getResultSet

public HippoResultSetBean getResultSet()
Specified by:
getResultSet in interface HippoFacetNavigationBean
Returns:
the result set below this faceted navigation item and null is there is no resultset node, for example when the count is 0

getRootFacetNavigationBean

public HippoFacetNavigationBean getRootFacetNavigationBean()
Specified by:
getRootFacetNavigationBean in interface HippoFacetNavigationBean
Returns:
the root facetNavigationBean of this HippoFacetNavigationBean. If this HippoFacetNavigationBean is a HippoFacetChildNavigationBean it returns the root, otherwise it might return itself.


Copyright © 2008-2012 Hippo. All Rights Reserved.