|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface IContentManager
Manages current content as shown by the collection.
All long-running operations (methods not executed in handler's thread) should
periodically check for interrupted status, throwing
InterruptedException
(or other type of exception) if they are
interrupted.
Method Summary | |
---|---|
boolean |
canReturnTracks()
Checks if this manager can provide a list of tracks. |
List<String> |
getDisplayableContent()
Returns string representation of items contained in this manager. |
int |
getIndexOfPreviouslyActivatedItem(IContentManager contentManager)
When activating an item, the manager should keep track of this item so that it can return its index when going back. |
String |
getSelectedItemName()
Returns selected item as a displayable string. |
List<TrackMetadataBean> |
getTracks(Interval selection)
Computes a list of tracks. |
IContentManager |
goBack()
Returns a content manager which will handle contents after a back operation. |
boolean |
initialize(boolean isYear,
ICollection collection)
Initialize this manager and fetch the data. |
IContentManager |
itemActivated(int i)
User activated given item. |
void |
uninitialize()
This manager will not be used for a while. |
Method Detail |
---|
boolean initialize(boolean isYear, ICollection collection) throws CollectionException, InterruptedException
Initialize this manager and fetch the data. This method will not be
invoked in handler's thread. This is the first method invoked on a new
manager (or managers retrieved by goBack()
and
itemActivated(int)
methods).
The manager may be initialized multiple times with different values of
the isYear
. The manager should simply do nothing if its
previous contents does not change.
isYear
- true
if year is displayed, false
otherwise.collection
- the collection to poll data from.
CollectionException
- if the underlying collection throws an exception.
InterruptedException
- if interrupted.IContentManager goBack()
Returns a content manager which will handle contents after a back operation.
This method is run in handler's thread.
null
if the back
operation is not allowed. Returned manager instance is
uninitialized.IContentManager itemActivated(int i)
User activated given item. Return a new manager which will handle new contents.
This method is run in handler's thread.
i
- the item index.
null
if we cannot move
forward. Returned manager instance is uninitialized.void uninitialize()
List<String> getDisplayableContent()
Returns string representation of items contained in this manager.
This method is run in handler's thread.
null
, may be empty.boolean canReturnTracks()
true
if the manager is able to provide a list of
tracks.List<TrackMetadataBean> getTracks(Interval selection) throws CollectionException, InterruptedException
canReturnTracks()
returns
true
. This method is not run in handler's thread.
selection
- the selection
CollectionException
- if the underlying collection throws an exception.
InterruptedException
- if interrupted.int getIndexOfPreviouslyActivatedItem(IContentManager contentManager)
contentManager
- the other manager on the same level.
String getSelectedItemName()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |