info.magnolia.module.blossom.view
Class UuidRedirectView

java.lang.Object
  extended by org.springframework.context.support.ApplicationObjectSupport
      extended by org.springframework.web.context.support.WebApplicationObjectSupport
          extended by org.springframework.web.servlet.view.AbstractView
              extended by org.springframework.web.servlet.view.AbstractUrlBasedView
                  extended by org.springframework.web.servlet.view.RedirectView
                      extended by info.magnolia.module.blossom.view.UuidRedirectView
All Implemented Interfaces:
org.springframework.beans.factory.BeanNameAware, org.springframework.beans.factory.InitializingBean, org.springframework.context.ApplicationContextAware, org.springframework.web.context.ServletContextAware, org.springframework.web.servlet.View

public class UuidRedirectView
extends org.springframework.web.servlet.view.RedirectView

View that sends a redirect based on a uuid. By default uses the website repository but any repository can be used.

Since:
1.2
See Also:
UuidRedirectViewResolver

Field Summary
 
Fields inherited from class org.springframework.web.servlet.view.AbstractView
DEFAULT_CONTENT_TYPE
 
Fields inherited from class org.springframework.context.support.ApplicationObjectSupport
logger
 
Constructor Summary
UuidRedirectView(String uuid)
           
UuidRedirectView(String repository, String uuid)
           
 
Method Summary
 String getRepository()
           
 String getUuid()
           
 void render(Map model, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
           
protected  String resolveUuidToUrl(String repository, String uuid)
           
 
Methods inherited from class org.springframework.web.servlet.view.RedirectView
appendQueryProperties, isEligibleProperty, isEligibleValue, queryProperties, renderMergedOutputModel, sendRedirect, setContextRelative, setEncodingScheme, setExposeModelAttributes, setHttp10Compatible, urlEncode
 
Methods inherited from class org.springframework.web.servlet.view.AbstractUrlBasedView
afterPropertiesSet, getUrl, isUrlRequired, setUrl, toString
 
Methods inherited from class org.springframework.web.servlet.view.AbstractView
addStaticAttribute, createRequestContext, createTemporaryOutputStream, exposeModelAsRequestAttributes, generatesDownloadContent, getAttributesMap, getBeanName, getContentType, getRequestContextAttribute, getStaticAttributes, prepareResponse, setAttributes, setAttributesCSV, setAttributesMap, setBeanName, setContentType, setRequestContextAttribute, writeToResponse
 
Methods inherited from class org.springframework.web.context.support.WebApplicationObjectSupport
getServletContext, getTempDir, getWebApplicationContext, initApplicationContext, initServletContext, isContextRequired, setServletContext
 
Methods inherited from class org.springframework.context.support.ApplicationObjectSupport
getApplicationContext, getMessageSourceAccessor, initApplicationContext, requiredContextClass, setApplicationContext
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

UuidRedirectView

public UuidRedirectView(String uuid)

UuidRedirectView

public UuidRedirectView(String repository,
                        String uuid)
Method Detail

getRepository

public String getRepository()

getUuid

public String getUuid()

render

public void render(Map model,
                   javax.servlet.http.HttpServletRequest request,
                   javax.servlet.http.HttpServletResponse response)
            throws Exception
Specified by:
render in interface org.springframework.web.servlet.View
Overrides:
render in class org.springframework.web.servlet.view.AbstractView
Throws:
Exception

resolveUuidToUrl

protected String resolveUuidToUrl(String repository,
                                  String uuid)
                           throws Exception
Throws:
Exception


Copyright © 2009-2011 Magnolia International Ltd.. All Rights Reserved.