info.magnolia.link
Class RelativePathTransformer

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

public class RelativePathTransformer
extends AbsolutePathTransformer

Transformer creating links relative to provided path.

Version:
$Id:$
Author:
had

Field Summary
protected  String absolutSourcePath
           
 
Constructor Summary
RelativePathTransformer(Content sourcePage, boolean useURI2RepositoryMapping, boolean useI18N)
           
RelativePathTransformer(String absoluteSourcePath, boolean useURI2RepositoryMapping, boolean useI18N)
           
 
Method Summary
 String transform(Link target)
          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
 

Field Detail

absolutSourcePath

protected String absolutSourcePath
Constructor Detail

RelativePathTransformer

public RelativePathTransformer(Content sourcePage,
                               boolean useURI2RepositoryMapping,
                               boolean useI18N)

RelativePathTransformer

public RelativePathTransformer(String absoluteSourcePath,
                               boolean useURI2RepositoryMapping,
                               boolean useI18N)
Method Detail

transform

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

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


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