com.arsdigita.cms
Class Folder.ItemCollection

java.lang.Object
  extended bycom.arsdigita.domain.DomainQuery
      extended bycom.arsdigita.domain.DomainCollection
          extended bycom.arsdigita.cms.ItemCollection
              extended bycom.arsdigita.cms.Folder.ItemCollection
All Implemented Interfaces:
com.arsdigita.persistence.DataQuery
Enclosing class:
Folder

public static class Folder.ItemCollection
extends ItemCollection

A collection of items that can be filtered to return only folders or only nonfolders.


Field Summary
 
Fields inherited from class com.arsdigita.domain.DomainCollection
m_dataCollection, versionId
 
Fields inherited from class com.arsdigita.domain.DomainQuery
m_dataQuery
 
Constructor Summary
Folder.ItemCollection(com.arsdigita.persistence.DataQuery query)
          Convenience Constructor that always sorts the collection by isFolder and ID
Folder.ItemCollection(com.arsdigita.persistence.DataQuery query, boolean bSort)
          Constructor
 
Method Summary
 void addFolderFilter(boolean v)
          Filter the collection by whether items are folders or not.
 BigDecimal getBundleID()
          Only used on CollectionS returned by getPrimaryInstance()
 Date getCreationDate()
          For performance reaons, override superclass methods and try to get the audit info without instantiating a content item.
 String getDisplayName()
          Return the display name for the current object.
 Date getLastModifiedDate()
           
 String getTypeLabel()
          Return the pretty name of the content type of the current item.
 boolean isFolder()
          Return true if the current item in the collection is a folder.
 boolean isLive()
           
 void setRange(Integer beginIndex, Integer endIndex)
          Sets the range of the dataquery.
 
Methods inherited from class com.arsdigita.cms.ItemCollection
addNameFilter, addVersionFilter, getContentItem, getDomainObject, getID, getLanguage, getName, getVersion
 
Methods inherited from class com.arsdigita.domain.DomainQuery
addEqualsFilter, addFilter, addFilter, addInSubqueryFilter, addInSubqueryFilter, addNotEqualsFilter, addNotInSubqueryFilter, addOrder, addOrderWithNull, addPath, alias, clearFilter, clearOrder, close, first, get, getFilterFactory, getParameter, getPosition, getPropertyValues, getType, hasProperty, isAfterLast, isBeforeFirst, isEmpty, isFirst, isLast, last, next, previous, removeFilter, reset, rewind, setFilter, setOrder, setParameter, setRange, setReturnsLowerBound, setReturnsUpperBound, size
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Folder.ItemCollection

public Folder.ItemCollection(com.arsdigita.persistence.DataQuery query,
                             boolean bSort)
Constructor

Parameters:
query - the Data Query to use to retrieve the collection
bSort - whether to sort the collection by isFolder and ID

Folder.ItemCollection

public Folder.ItemCollection(com.arsdigita.persistence.DataQuery query)
Convenience Constructor that always sorts the collection by isFolder and ID

Parameters:
query - the Data Query to use to retrieve the collection
Method Detail

setRange

public void setRange(Integer beginIndex,
                     Integer endIndex)
Sets the range of the dataquery. This is used by the paginator.

Parameters:
beginIndex - The start index
endIndex - The end index

getDisplayName

public String getDisplayName()
Description copied from class: ItemCollection
Return the display name for the current object. If the data collection has an attribute with name ACSObject.DISPLAY_NAME that is used. Otherwise, the underlying content item is instantiated, and its display name is returned.

Overrides:
getDisplayName in class ItemCollection
Returns:
the display name of the current item

getCreationDate

public Date getCreationDate()
For performance reaons, override superclass methods and try to get the audit info without instantiating a content item. We know this can help because the getPrimaryInstances query retrieves the audit info directly

Overrides:
getCreationDate in class ItemCollection

getLastModifiedDate

public Date getLastModifiedDate()
Overrides:
getLastModifiedDate in class ItemCollection

getTypeLabel

public String getTypeLabel()
Return the pretty name of the content type of the current item. If the current item is a folder, the string Folder is returned, otherwise the label of the item's content type.

Returns:
the pretty name of the content type of the current item.

addFolderFilter

public void addFolderFilter(boolean v)
Filter the collection by whether items are folders or not.

Parameters:
v - true if the data query should only list folders, false if the data query should only list non-folder items.

isFolder

public boolean isFolder()
Return true if the current item in the collection is a folder.

Returns:
true if the current item in the collection is a folder.

isLive

public boolean isLive()

getBundleID

public BigDecimal getBundleID()
Only used on CollectionS returned by getPrimaryInstance()



Copyright (c) 2004 Red Hat, Inc. Corporation. All Rights Reserved. Generated at July 21 2004:2352 UTC