info.magnolia.module.blossom.view
Class UuidRedirectViewResolver

java.lang.Object
  extended by info.magnolia.module.blossom.view.UuidRedirectViewResolver
All Implemented Interfaces:
org.springframework.beans.factory.InitializingBean, org.springframework.core.Ordered, org.springframework.web.servlet.ViewResolver

public class UuidRedirectViewResolver
extends Object
implements org.springframework.web.servlet.ViewResolver, org.springframework.core.Ordered, org.springframework.beans.factory.InitializingBean

Adds support for redirects based on uuids. By default supports the formats "website:uuid" and "dms:uuid" for sending redirects for the website and dms repositories. The prefixes and the repositories they map to are configurable and can be changed to support more repositories.

Since:
1.2
See Also:
UuidRedirectView

Field Summary
 
Fields inherited from interface org.springframework.core.Ordered
HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE
 
Constructor Summary
UuidRedirectViewResolver()
           
 
Method Summary
 void afterPropertiesSet()
           
 int getOrder()
           
 String[] getPrefixes()
           
 String[] getRepositories()
           
 boolean isHttp10Compatible()
           
 org.springframework.web.servlet.View resolveViewName(String viewName, Locale locale)
           
 void setHttp10Compatible(boolean http10Compatible)
           
 void setOrder(int order)
           
 void setPrefix(String prefix)
           
 void setPrefixes(String[] prefixes)
           
 void setRepositories(String[] repositories)
           
 void setRepository(String repository)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

UuidRedirectViewResolver

public UuidRedirectViewResolver()
Method Detail

getOrder

public int getOrder()
Specified by:
getOrder in interface org.springframework.core.Ordered

setOrder

public void setOrder(int order)

getRepositories

public String[] getRepositories()

setRepositories

public void setRepositories(String[] repositories)

setRepository

public void setRepository(String repository)

getPrefixes

public String[] getPrefixes()

setPrefixes

public void setPrefixes(String[] prefixes)

setPrefix

public void setPrefix(String prefix)

isHttp10Compatible

public boolean isHttp10Compatible()

setHttp10Compatible

public void setHttp10Compatible(boolean http10Compatible)

resolveViewName

public org.springframework.web.servlet.View resolveViewName(String viewName,
                                                            Locale locale)
                                                     throws Exception
Specified by:
resolveViewName in interface org.springframework.web.servlet.ViewResolver
Throws:
Exception

afterPropertiesSet

public void afterPropertiesSet()
                        throws Exception
Specified by:
afterPropertiesSet in interface org.springframework.beans.factory.InitializingBean
Throws:
Exception


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