|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object info.magnolia.link.LinkTransformerManager
public class LinkTransformerManager
Single point of access for all Link Transformers.
Constructor Summary | |
---|---|
LinkTransformerManager()
|
Method Summary | |
---|---|
void |
addTransformer(String key,
LinkTransformer transformer)
|
AbsolutePathTransformer |
getAbsolute()
Creates instance of absolute link transformer that will prepend the context path, will use URI2Repository mapping while constructing links and will localize the link if localization is set up. |
AbsolutePathTransformer |
getAbsolute(boolean addContextPath)
Creates instance of absolute link transformer that will optionally prepend the context path, but will always use URI2Repository mapping while constructing links and will localize the link if localization is set up. |
LinkTransformer |
getAbsoluteTransformer()
Gets registered absolute path transformer. |
LinkTransformer |
getBrowserLink(String currentPath)
Creates instance of link transformer that will transform any provided links to either absolute or relative path based on the current server configuration. |
CompleteUrlPathTransformer |
getCompleteUrl()
Creates instance of Complete URL link transformer that will create fully qualified and localized link to content denoted by Link provided to its transform method. |
LinkTransformer |
getCompleteURLTransformer()
Gets registered complete URL transformer. |
EditorLinkTransformer |
getEditorLink()
|
LinkTransformer |
getEditorTransformer()
Gets registered editor link transformer. |
LinkTransformer |
getI18nTransformer()
Gets registered complete URL transformer. |
static LinkTransformerManager |
getInstance()
Gets the current singleton instance. |
RelativePathTransformer |
getRelative(Content page)
Creates instance of Relative link transformer that will translate path to the provided Link relative to the content provided here. |
RelativePathTransformer |
getRelative(String absolutePath)
Creates instance of Relative link transformer that will translate path to the provided Link relative to path provided here. |
LinkTransformer |
getRelativeTransformer()
Gets registered relative path transformer. |
Map<String,LinkTransformer> |
getTransformers()
|
boolean |
isAddContextPathToBrowserLinks()
|
boolean |
isMakeBrowserLinksRelative()
|
void |
setAddContextPathToBrowserLinks(boolean addContextPathToBrowserLinks)
|
void |
setMakeBrowserLinksRelative(boolean makeBrowserLinksRelative)
|
void |
setTransformers(Map<String,LinkTransformer> transformers)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public LinkTransformerManager()
Method Detail |
---|
public Map<String,LinkTransformer> getTransformers()
public void setTransformers(Map<String,LinkTransformer> transformers)
public void addTransformer(String key, LinkTransformer transformer)
public boolean isAddContextPathToBrowserLinks()
public void setAddContextPathToBrowserLinks(boolean addContextPathToBrowserLinks)
public boolean isMakeBrowserLinksRelative()
public void setMakeBrowserLinksRelative(boolean makeBrowserLinksRelative)
public static LinkTransformerManager getInstance()
public LinkTransformer getAbsoluteTransformer()
public LinkTransformer getEditorTransformer()
public LinkTransformer getRelativeTransformer()
public LinkTransformer getCompleteURLTransformer()
public LinkTransformer getI18nTransformer()
public AbsolutePathTransformer getAbsolute()
public AbsolutePathTransformer getAbsolute(boolean addContextPath)
public RelativePathTransformer getRelative(Content page)
public RelativePathTransformer getRelative(String absolutePath)
public CompleteUrlPathTransformer getCompleteUrl()
public EditorLinkTransformer getEditorLink()
EditorLinkTransformer
public LinkTransformer getBrowserLink(String currentPath)
currentPath
- Path to make links relative to, if relative path translation is configured on the server.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |