com.centrasite.control.adapters.collection
Interface ReportCollection

All Known Implementing Classes:
BrowseTreeCollection, GridCollection, TreeCollection

public interface ReportCollection

Interface for UI collections working with ReportInterface. Provides basic operations for working with the contained ReportLine-s. The access to the collection lines is list-like (based on index). Implementors of this interface are expected to extend ApplicationDesigner collections (GRIDCollection, TREECollection etc.) so that they are usable inside adapters and layouts.

See Also:
ReportInterface, CollectionContext

Method Summary
 void add(ReportLine line)
          Adds the given line.
 void clear()
          Clears the contents of this collection by removing all lines.
 CollectionContext getCollectionContext()
          Retrieves the CollectionContext for this collection.
 ReportLine getLine(int index)
          Retrieves the line on the given index.
 com.centrasite.control.ReportInterface getReport()
          Retrieves the ReportInterface instance used by this collection.
 java.util.List<ReportLine> getReportLines()
          Retrieves all collection lines.
 int getTotalSize()
          Determines the size of the collection.
 void initWithNullItems(int size, ReportCollectionListener reportCollectionListener)
          Initializes the collection with null values and ReportCollectionListener.
 ReportLine newReportLine(com.centrasite.control.Row row)
          Creates new collection line using the given row.
 int referencesItem(com.centrasite.control.Item item, int change)
          Is the specified item referenced by this collection.
 void refreshValue(com.centrasite.control.ReportInterface report)
          Reinitialize the collection with the given ReportInterface.
 void remove(ReportLine line)
          Removes the given line.
 void replace(int oldLineIndex, ReportLine newLine)
          Replaces the line on the given index with the given line.
 void setCollectionContext(CollectionContext context)
          Sets the CollectionContext for this collection.
 void setColumnsChanged()
          Notifies that columns have changed so that this collection reinitializes its columns.
 void setReport(com.centrasite.control.ReportInterface report)
          Sets the given ReportInterface to be used by this collection.
 

Method Detail

newReportLine

ReportLine newReportLine(com.centrasite.control.Row row)
Creates new collection line using the given row.

Parameters:
row - Row instance providing access to property values.
Returns:
ReportLine

add

void add(ReportLine line)
Adds the given line.

Parameters:
line -

remove

void remove(ReportLine line)
Removes the given line.

Parameters:
line -

replace

void replace(int oldLineIndex,
             ReportLine newLine)
Replaces the line on the given index with the given line.

Parameters:
oldLineIndex - Index of the line to be replaced.
newLine - Line to be added.

getTotalSize

int getTotalSize()
Determines the size of the collection.

Returns:
The size.

getLine

ReportLine getLine(int index)
Retrieves the line on the given index.

Parameters:
index -
Returns:
ReportLine

clear

void clear()
Clears the contents of this collection by removing all lines.


getReportLines

java.util.List<ReportLine> getReportLines()
Retrieves all collection lines.

Returns:
List

getReport

com.centrasite.control.ReportInterface getReport()
Retrieves the ReportInterface instance used by this collection.

Returns:
ReportInterface

setReport

void setReport(com.centrasite.control.ReportInterface report)
Sets the given ReportInterface to be used by this collection.

Parameters:
report -

refreshValue

void refreshValue(com.centrasite.control.ReportInterface report)
Reinitialize the collection with the given ReportInterface. This includes clearing all lines, executing the report and populating the lines again.

Parameters:
report -

initWithNullItems

void initWithNullItems(int size,
                       ReportCollectionListener reportCollectionListener)
Initializes the collection with null values and ReportCollectionListener. The actual null items are implementation specific.

Parameters:
size -
reportCollectionListener -

setColumnsChanged

void setColumnsChanged()
Notifies that columns have changed so that this collection reinitializes its columns.


getCollectionContext

CollectionContext getCollectionContext()
Retrieves the CollectionContext for this collection.

Returns:
CollectionContext

setCollectionContext

void setCollectionContext(CollectionContext context)
Sets the CollectionContext for this collection.

Parameters:
context -

referencesItem

int referencesItem(com.centrasite.control.Item item,
                   int change)
Is the specified item referenced by this collection.

Parameters:
item - item to check
change - one of the constants ITEM_CREATED, ITEM_DELETED, ...
Returns:
NOT_REFERENCED, SINGLE_VALUE_PAGE_REFERENCE or MULTI_VALUE_PAGE_REFERENCE