com.atlassian.confluence.core
Interface SmartListManager

All Known Implementing Classes:
V2SearchSmartListManager

public interface SmartListManager

Manager for retrieving content based on arbitrary queries. Useful when you want a list of stuff based on complex criteria, fast.

Smart lists in Confluence are analogous to Filters in JIRA, to Smart Playlists in iTunes, or Smart Folders in the OS X Finder and most modern mail clients.

Currently, the SmartListManager only provides the most basic functionality - a means of querying for content based on a ListQuery - but the feature will be expanded in the future to better match the examples given above.


Method Summary
 java.util.List getListQueryResults(ListQuery query, boolean loadObjects)
          Returns a list of those objects in the Confluence system that match the given ListQuery.
 java.lang.String getStatusMessageKey()
          The smart list manager implementations are not guarenteed to be able to provide the latest and most up to date information all of the time (eg: during a lucene re-index).
 

Method Detail

getListQueryResults

java.util.List getListQueryResults(ListQuery query,
                                   boolean loadObjects)
Returns a list of those objects in the Confluence system that match the given ListQuery.

The loadObjects parameter allows you to trade off speed against the amount of information returned. Passing false to this parameter will give you back a list of SearchResultWithExcerpt objects, containing whatever information about the matching objects can be gathered directly from the Lucene index. This is enough information for most purposes.

If you want a list of the actual hibernate objects from the database, pass true to this parameter, but be aware you're going to pay the cost of 'n' database calls to retrieve those objects.

Parameters:
query - the query to perform
loadObjects - pass true to return
Returns:
ContentEntityObjects List if loadObjects true, Map of object attributes otherwise

getStatusMessageKey

java.lang.String getStatusMessageKey()
The smart list manager implementations are not guarenteed to be able to provide the latest and most up to date information all of the time (eg: during a lucene re-index). Under such circumstances, the smart list manager will provide access to a human readable status message that can be displayed to the user.

Returns:
a key to a status message or null if there is no message.


Copyright © 2003-2011 Atlassian. All Rights Reserved.