magoffin.matt.ma2.web
Class ViewAlbumController
java.lang.Object
org.springframework.context.support.ApplicationObjectSupport
org.springframework.web.context.support.WebApplicationObjectSupport
org.springframework.web.servlet.support.WebContentGenerator
org.springframework.web.servlet.mvc.AbstractController
org.springframework.web.servlet.mvc.BaseCommandController
org.springframework.web.servlet.mvc.AbstractCommandController
magoffin.matt.ma2.web.AbstractCommandController
magoffin.matt.ma2.web.ViewAlbumController
- All Implemented Interfaces:
- org.springframework.context.ApplicationContextAware, org.springframework.web.servlet.mvc.Controller
public class ViewAlbumController
- extends AbstractCommandController
Controller for viewing a shared album or a virtual album by way of a
BrowseModePlugin
.
To view a normal shared album, pass the key
property on the request
of the anonymous key of the album to view. To view a child album of that shared
album, also pass the childKey
of that child album.
The default theme will be added to the view model, unless a themeId
parameter for some other theme is provided.
To view a virtual album from a browse mode (see the
BrowseModePlugin
API) you must pass the
userKey
of the owner of the shared albums and a mode
for the
browse mode being viewed. The key
parameter in this case will be set
as the PaginationCriteria.setIndexKey(String)
passed to
SearchBiz.findAlbumsForBrowsing(BrowseAlbumsCommand, PaginationCriteria, BizContext)
and the first AlbumSearchResult
returned in the results will be passed
to the view as the album to view.
- Version:
- $Revision: 54 $ $Date: 2007-11-09 21:35:10 +1300 (Fri, 09 Nov 2007) $
- Author:
- matt.magoffin
Field Summary |
static java.lang.String |
DISPLAY_ALBUM_KEY
The model key for the selected Album's anonymous key. |
static java.lang.String |
DISPLAY_ITEM_ID_KEY
The model key for the selected MediaItem's ID. |
Fields inherited from class org.springframework.web.servlet.mvc.BaseCommandController |
DEFAULT_COMMAND_NAME |
Fields inherited from class org.springframework.web.servlet.support.WebContentGenerator |
HEADER_CACHE_CONTROL, HEADER_EXPIRES, HEADER_PRAGMA, METHOD_GET, METHOD_HEAD, METHOD_POST |
Fields inherited from class org.springframework.context.support.ApplicationObjectSupport |
logger |
Methods inherited from class magoffin.matt.ma2.web.AbstractCommandController |
getDomainObjectFactory, getErrorView, getMessagesSource, getSuccessView, getSystemBiz, getWebHelper, initApplicationContext, registerCalendarEditor, setDomainObjectFactory, setErrorView, setMessagesSource, setSuccessView, setSystemBiz, setWebHelper |
Methods inherited from class org.springframework.web.servlet.mvc.AbstractCommandController |
handleRequestInternal |
Methods inherited from class org.springframework.web.servlet.mvc.BaseCommandController |
bindAndValidate, checkCommand, createBinder, createCommand, getBindingErrorProcessor, getCommand, getCommandClass, getCommandName, getMessageCodesResolver, getPropertyEditorRegistrars, getValidator, getValidators, initBinder, isValidateOnBinding, onBind, onBind, onBindAndValidate, setBindingErrorProcessor, setCommandClass, setCommandName, setMessageCodesResolver, setPropertyEditorRegistrar, setPropertyEditorRegistrars, setValidateOnBinding, setValidator, setValidators, suppressBinding, suppressValidation |
Methods inherited from class org.springframework.web.servlet.mvc.AbstractController |
handleRequest, isSynchronizeOnSession, setSynchronizeOnSession |
Methods inherited from class org.springframework.web.servlet.support.WebContentGenerator |
applyCacheSeconds, applyCacheSeconds, cacheForSeconds, cacheForSeconds, checkAndPrepare, checkAndPrepare, getCacheSeconds, getSupportedMethods, isRequireSession, isUseCacheControlHeader, isUseExpiresHeader, preventCaching, setCacheSeconds, setRequireSession, setSupportedMethods, setUseCacheControlHeader, setUseExpiresHeader |
Methods inherited from class org.springframework.web.context.support.WebApplicationObjectSupport |
getServletContext, getTempDir, getWebApplicationContext, isContextRequired |
Methods inherited from class org.springframework.context.support.ApplicationObjectSupport |
getApplicationContext, getMessageSourceAccessor, requiredContextClass, setApplicationContext |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DISPLAY_ALBUM_KEY
public static final java.lang.String DISPLAY_ALBUM_KEY
- The model key for the selected Album's anonymous key.
- See Also:
- Constant Field Values
DISPLAY_ITEM_ID_KEY
public static final java.lang.String DISPLAY_ITEM_ID_KEY
- The model key for the selected MediaItem's ID.
- See Also:
- Constant Field Values
ViewAlbumController
public ViewAlbumController()
handle
protected org.springframework.web.servlet.ModelAndView handle(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
java.lang.Object command,
org.springframework.validation.BindException errors)
throws java.lang.Exception
- Specified by:
handle
in class org.springframework.web.servlet.mvc.AbstractCommandController
- Throws:
java.lang.Exception
getMediaBiz
public MediaBiz getMediaBiz()
- Returns:
- Returns the mediaBiz.
setMediaBiz
public void setMediaBiz(MediaBiz mediaBiz)
- Parameters:
mediaBiz
- The mediaBiz to set.
getSearchBiz
public SearchBiz getSearchBiz()
- Returns:
- the searchBiz
setSearchBiz
public void setSearchBiz(SearchBiz searchBiz)
- Parameters:
searchBiz
- the searchBiz to set
getUserBiz
public UserBiz getUserBiz()
- Returns:
- the userBiz
setUserBiz
public void setUserBiz(UserBiz userBiz)
- Parameters:
userBiz
- the userBiz to set