magoffin.matt.ma2.dao.support
Class AlbumsByDateBrowseModePlugin

java.lang.Object
  extended by magoffin.matt.ma2.support.AbstractPlugin
      extended by magoffin.matt.ma2.dao.support.AbstractJdbcBrowseModePlugin
          extended by magoffin.matt.ma2.dao.support.AlbumsByDateBrowseModePlugin
All Implemented Interfaces:
BrowseModePlugin, Plugin

public class AlbumsByDateBrowseModePlugin
extends AbstractJdbcBrowseModePlugin

Implementation of BrowseModePlugin for a "browse user albums by date".

Also supports the "album feed" mode, for returning only items shareable in feed.

Version:
$Revision: 43 $ $Date: 2007-10-21 11:10:01 +1300 (Sun, 21 Oct 2007) $
Author:
matt

Field Summary
 
Fields inherited from class magoffin.matt.ma2.support.AbstractPlugin
log
 
Constructor Summary
AlbumsByDateBrowseModePlugin()
           
 
Method Summary
 SearchResults find(BrowseAlbumsCommand command, PaginationCriteria pagination)
          Perform the search, returning SearchResults populated with AlbumSearchResult objects.
 java.lang.String[] getMessageResourceNames()
          Get a list of message resource names to register.
 java.lang.String getSqlBrowse()
           
 java.lang.String getSqlBrowseAllowBrowseWhereClause()
           
 java.lang.String getSqlBrowseAllowFeedWhereClause()
           
 java.lang.String getSqlBrowseChildOrderByClause()
           
 java.lang.String getSqlBrowseTopLevelOrderByClause()
           
 java.lang.String[] getSupportedModes()
          Get the supported modes of this plugin.
 void init()
          Manual initialization method.
protected  void init(org.springframework.context.ApplicationContext application)
          Initialization hook for subclasses.
 void setSqlBrowse(java.lang.String sqlBrowse)
           
 void setSqlBrowseAllowBrowseWhereClause(java.lang.String sqlBrowseAllowBrowseWhereClause)
           
 void setSqlBrowseAllowFeedWhereClause(java.lang.String sqlBrowseAllowFeedWhereClause)
           
 void setSqlBrowseChildOrderByClause(java.lang.String sqlBrowseChildOrderByClause)
           
 void setSqlBrowseTopLevelOrderByClause(java.lang.String sqlBrowseTopLevelOrderByClause)
           
 boolean supportsMode(java.lang.String mode)
          Test if this plugin supports a given browse mode.
 
Methods inherited from class magoffin.matt.ma2.dao.support.AbstractJdbcBrowseModePlugin
getDomainObjectFactory, getJdbcTemplate, getPluginType, getUserBiz, setDomainObjectFactory, setJdbcTemplate, setUserBiz
 
Methods inherited from class magoffin.matt.ma2.support.AbstractPlugin
getConfigName, initialize
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface magoffin.matt.ma2.plugin.Plugin
initialize
 

Constructor Detail

AlbumsByDateBrowseModePlugin

public AlbumsByDateBrowseModePlugin()
Method Detail

supportsMode

public boolean supportsMode(java.lang.String mode)
Description copied from interface: BrowseModePlugin
Test if this plugin supports a given browse mode.

Parameters:
mode - the mode to test
Returns:
boolean

init

protected void init(org.springframework.context.ApplicationContext application)
Description copied from class: AbstractPlugin
Initialization hook for subclasses.

This method will be called at the end of the AbstractPlugin.initialize(org.springframework.context.ApplicationContext) method.

Overrides:
init in class AbstractPlugin
Parameters:
application - the ApplicationContext

getMessageResourceNames

public java.lang.String[] getMessageResourceNames()
Description copied from interface: Plugin
Get a list of message resource names to register.

Returns:
the message resource names

getSupportedModes

public java.lang.String[] getSupportedModes()
Description copied from interface: BrowseModePlugin
Get the supported modes of this plugin.

Returns:
the supported modes

init

public void init()
Manual initialization method.

This is used by unit tests.


find

public SearchResults find(BrowseAlbumsCommand command,
                          PaginationCriteria pagination)
Description copied from interface: BrowseModePlugin
Perform the search, returning SearchResults populated with AlbumSearchResult objects.

Parameters:
command - the browse command
pagination - the pagination criteria
Returns:
the search results

getSqlBrowse

public java.lang.String getSqlBrowse()
Returns:
the sqlBrowse

setSqlBrowse

public void setSqlBrowse(java.lang.String sqlBrowse)
Parameters:
sqlBrowse - the sqlBrowse to set

getSqlBrowseTopLevelOrderByClause

public java.lang.String getSqlBrowseTopLevelOrderByClause()
Returns:
the sqlBrowseTopLevelOrderByClause

setSqlBrowseTopLevelOrderByClause

public void setSqlBrowseTopLevelOrderByClause(java.lang.String sqlBrowseTopLevelOrderByClause)
Parameters:
sqlBrowseTopLevelOrderByClause - the sqlBrowseTopLevelOrderByClause to set

getSqlBrowseChildOrderByClause

public java.lang.String getSqlBrowseChildOrderByClause()
Returns:
the sqlBrowseChildOrderByClause

setSqlBrowseChildOrderByClause

public void setSqlBrowseChildOrderByClause(java.lang.String sqlBrowseChildOrderByClause)
Parameters:
sqlBrowseChildOrderByClause - the sqlBrowseChildOrderByClause to set

getSqlBrowseAllowFeedWhereClause

public java.lang.String getSqlBrowseAllowFeedWhereClause()
Returns:
the sqlBrowseAllowFeedWhereClause

setSqlBrowseAllowFeedWhereClause

public void setSqlBrowseAllowFeedWhereClause(java.lang.String sqlBrowseAllowFeedWhereClause)
Parameters:
sqlBrowseAllowFeedWhereClause - the sqlBrowseAllowFeedWhereClause to set

getSqlBrowseAllowBrowseWhereClause

public java.lang.String getSqlBrowseAllowBrowseWhereClause()
Returns:
the sqlBrowseAllowBrowseWhereClause

setSqlBrowseAllowBrowseWhereClause

public void setSqlBrowseAllowBrowseWhereClause(java.lang.String sqlBrowseAllowBrowseWhereClause)
Parameters:
sqlBrowseAllowBrowseWhereClause - the sqlBrowseAllowBrowseWhereClause to set