info.magnolia.link
Class I18nPathTransformer

java.lang.Object
  extended by info.magnolia.link.AbsolutePathTransformer
      extended by info.magnolia.link.I18nPathTransformer
All Implemented Interfaces:
LinkTransformer

public class I18nPathTransformer
extends AbsolutePathTransformer

Creates links with the absolute path and prefixes it with selected locale if this is supported, falls back to current one otherwise.


Constructor Summary
I18nPathTransformer()
           
I18nPathTransformer(boolean addContextPath, boolean useURI2RepositoryMapping, boolean useI18N, Locale locale)
           
 
Method Summary
protected  String localizeURI(String linkStr, Locale locale)
           
 String transform(Link uuidLink)
          Transforms Link into desired output.
 
Methods inherited from class info.magnolia.link.AbsolutePathTransformer
getURI2RepositoryManager, getURISuffix, isAddContextPath, isUseI18N, isUseURI2RepositoryMapping, prefixLink, setAddContextPath, setUseI18N, setUseURI2RepositoryMapping
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

I18nPathTransformer

public I18nPathTransformer()

I18nPathTransformer

public I18nPathTransformer(boolean addContextPath,
                           boolean useURI2RepositoryMapping,
                           boolean useI18N,
                           Locale locale)
Method Detail

transform

public String transform(Link uuidLink)
Description copied from class: AbsolutePathTransformer
Transforms Link into desired output.

Specified by:
transform in interface LinkTransformer
Overrides:
transform in class AbsolutePathTransformer
Parameters:
uuidLink - Link to repository content be transformed.
Returns:
Transformed link.

localizeURI

protected String localizeURI(String linkStr,
                             Locale locale)


Copyright © 2003-2014 Magnolia International Ltd.. All Rights Reserved.