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$

Field Summary
protected  String absolutSourcePath
           
 
Constructor Summary
RelativePathTransformer()
           
RelativePathTransformer(Content sourcePage, boolean useURI2RepositoryMapping, boolean useI18N)
           
RelativePathTransformer(javax.jcr.Node sourcePage, boolean useURI2RepositoryMapping, boolean useI18N)
           
RelativePathTransformer(String absoluteSourcePath, boolean useURI2RepositoryMapping, boolean useI18N)
           
 
Method Summary
 void setAbsolutSourcePath(javax.jcr.Node sourceNode)
           
 void setAbsolutSourcePath(String absolutSourcePath)
           
 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()

RelativePathTransformer

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

RelativePathTransformer

public RelativePathTransformer(javax.jcr.Node sourcePage,
                               boolean useURI2RepositoryMapping,
                               boolean useI18N)

RelativePathTransformer

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

setAbsolutSourcePath

public void setAbsolutSourcePath(javax.jcr.Node sourceNode)

setAbsolutSourcePath

public void setAbsolutSourcePath(String absolutSourcePath)

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-2013 Magnolia International Ltd.. All Rights Reserved.