com.arsdigita.cms
Class ItemCollection

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

public class ItemCollection
extends com.arsdigita.domain.DomainCollection

Represents a set of content items.

Version:
$Revision: #13 $ $Date: 2004/04/07 $
Author:
Michael Pih, David Lutterkort
See Also:
DomainCollection, DataCollection

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
ItemCollection(com.arsdigita.persistence.DataCollection dataCollection)
          Constructor.
 
Method Summary
 void addNameFilter(String name)
          Filter items by name and leave only those in the collection whose name equals the given value.
 void addVersionFilter(boolean live)
          Filter items by version and leave only those in the collection that are live (if true is passed in) or that are draft items (if false) is passed in.
 ContentItem getContentItem()
          Returns a ContentItem for the current position in the collection.
 Date getCreationDate()
           
 String getDisplayName()
          Return the display name for the current object.
 com.arsdigita.domain.DomainObject getDomainObject()
          Returns a DomainObject for the current position in the collection.
 BigDecimal getID()
          Return the object ID for the content item at the current position in the collection.
 String getLanguage()
          Return the language of the content item at the current position in the collection.
 Date getLastModifiedDate()
           
 String getName()
          Return the name of the content item at the current position in the collection.
 String getVersion()
          Return the version of the content item at the current position in the collection.
 
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, setRange, setReturnsLowerBound, setReturnsUpperBound, size
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ItemCollection

public ItemCollection(com.arsdigita.persistence.DataCollection dataCollection)
Constructor.

Method Detail

getDomainObject

public com.arsdigita.domain.DomainObject getDomainObject()
Returns a DomainObject for the current position in the collection.


getContentItem

public ContentItem getContentItem()
Returns a ContentItem for the current position in the collection.


getID

public BigDecimal getID()
Return the object ID for the content item at the current position in the collection.

Returns:
the object ID for the content item at the current position in the collection.

getName

public String getName()
Return the name of the content item at the current position in the collection.

Returns:
the name the content item at the current position in the collection.

getDisplayName

public String getDisplayName()
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.

Returns:
the display name of the current item

getVersion

public String getVersion()
Return the version of the content item at the current position in the collection.

Returns:
the version the content item at the current position in the collection.

getLanguage

public String getLanguage()
Return the language of the content item at the current position in the collection.

Returns:
the language the content item at the current position in the collection.

addNameFilter

public void addNameFilter(String name)
Filter items by name and leave only those in the collection whose name equals the given value.

Parameters:
name - the name for which items should be filtered.

addVersionFilter

public void addVersionFilter(boolean live)
Filter items by version and leave only those in the collection that are live (if true is passed in) or that are draft items (if false) is passed in.

Parameters:
live - true if only live items should remain in the collection, false if only draft items should remain.

getLastModifiedDate

public Date getLastModifiedDate()

getCreationDate

public Date getCreationDate()


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